spring-projects / spring-projects/spring-ai
希望未来可以支持自定义EmbeddingRequest的input类型
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
当前进行接口调用无法直接使用org.springframework.ai.openai.api.OpenAiApi#embeddings方法,也没有提供可以自定义的EmbeddingRequest input类型 的方法,既然EmbeddingRequest 使用的泛型,那么以后应该可以支持这样的功能,因为现在调用豆包的embedding多模态模型由于请求参数问题导致不能直接使用SpringAI的接口
curl https://ark.cn-beijing.volces.com/api/v3/embeddings/multimodal
-H "Content-Type: application/json"
-H "Authorization: Bearer $ARK_API_KEY"
-d $'{
"model": "doubao-embedding-vision-250615",
"encoding_format": "float",
"input": [
{
"type": "video_url",
"video_url": {
"url": "https://ark-project.tos-cn-beijing.volces.com/doc_video/ark_vlm_video_input.mp4"
}
},
{
"type": "image_url",
"image_url": {
"url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/tower.png"
}
},
{
"type": "text",
"text": "视频和图片里有什么"
}
]
}'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with org.springframework.ai.openai.api.OpenAiApi#embeddings and inspect how EmbeddingRequest represents its input type. Compare that request shape with the multimodal embedding payload shown in the issue, including video_url, image_url, and text entries. Done means the embeddings API can accept a customizable input type for this request without losing the existing use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- ai, api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100