Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertex AI integration configuration #57

Open
asorian0 opened this issue Jul 17, 2024 · 1 comment
Open

Vertex AI integration configuration #57

asorian0 opened this issue Jul 17, 2024 · 1 comment

Comments

@asorian0
Copy link

asorian0 commented Jul 17, 2024

Description

While configuring Typesense to use Vertex AI it seems the property refreshToken is missing on FieldEmbedModelConfig class, so we cannot setup properly it, so it cannot connect to GCP Vertex AI API, throwing a 400 with the message: Property embed.model_config.refresh_token is missing or is not a string.

Actually, in the documentation it shows the refreshToken property being configured:

CollectionSchema collectionSchema = new CollectionSchema();
ArrayList<String> embedFrom = new ArrayList<>();
embedFrom.add("product_name");
embedFrom.add("categories");

collectionschema.name("products")
                .addFieldsItem(new Field().name("product_name").type(FieldTypes.STRING))
                .addFieldsItem(new Field().name("categories").type(FieldTypes.STRING_ARRAY))
                .addFieldsItem(new Field().name("embedding").type(FieldTypes.FLOAT_ARRAY).embed(
                  new FieldEmbed().from(embedFrom).modelConfig(new FieldEmbedModelConfig().modelName("gcp/embedding-gecko-001")
                      .accessToken("your_gcp_access_token")
                      .refreshToken("your_gcp_refresh_token") <-- this one is missing!
                      .clientId("your_gcp_app_client_id")
                      .clientSecret("your_gcp_client_secret").projectId("your_gcp_project_id")))
                ));
CollectionResponse collectionResponse = client.collections().create(collectionSchema);

Guess the OpenAPI model is not fully synced with the one used in this library.

Steps to reproduce

Follow the steps from the documentation

Expected Behavior

Typesense library is able to connect to Vertex AI to generate embeddings

Actual Behavior

Typesense library is not able to connect to Vertex AI, throwing a 400 with the message: Property embed.model_config.refresh_token is missing or is not a string.

Metadata

Typesense Version: 0.8.1

OS: MacOS Sonoma 14.5

@asorian0
Copy link
Author

asorian0 commented Sep 3, 2024

hey any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant