Vertex AI integration configuration
还没有人认领这个 Issue。
评估
调研方向
Start with the FieldEmbedModelConfig model class, which should sit alongside the other generated collection-schema models, and compare its properties with the embed model_config section of the Typesense OpenAPI spec. Check whether refresh_token is in the spec and missing from the Java class, and whether the builder methods follow the same pattern as accessToken. Done when the documented refreshToken(...) call compiles and the serialized request body includes refresh_token.
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Java
- 星标
- 90
- 派生
- 39
- 平均合并
- 22 小时 26 分钟
- 30 天内合并 PR
- 1
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
typesense/typesense-java 的其他 Issue
-
Add and retrieve metadata section of Collection Model definition (on creation or fetch)可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 3/5 1-2 天 新手友好度 45/100
typesense/typesense-java#82 ·
-
难度 3/5 1-2 天 新手友好度 22/100
typesense/typesense-java#60 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 30/100
typesense/typesense-java#59 · 3 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 28/100
typesense/typesense-java#45 · 2 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
typesense/typesense-java#36 · 1 条评论 · 1 个 reaction ·
查看 typesense/typesense-java 的全部 Issue
相似的 Issue
-
documentation good first issue help wanted
难度 1/5 1 小时以内 新手友好度 90/100
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
eclipse-sw360/sw360#4849 ·
维护者通常 2 天内回复
-
[Bug]: Skip cross-field checkpointing validation rules when checkpointing is disabled可能已有人在做 @hutiefang76 今天认领。 未关闭accepted bug good first issue java
难度 2/5 1-3 小时 新手友好度 72/100
Sekelenao/Flinkboot#473 · 1 条评论 ·
维护者通常 1 天内回复
-
help wanted priority: low Review effort [1-5]: 2 status: needs-triage type: tests
难度 1/5 1-3 小时 新手友好度 86/100
carlos-emr/carlos#6433 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复