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

Add dimensions option for ZhiPuAi embedding model #2057

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Assassinxc
Copy link

@Assassinxc Assassinxc commented Jan 9, 2025

Add support for ZhiPuAi embedding-3 model's dimemsions option

https://www.bigmodel.cn/dev/api/vector/embedding

image

@ilayaperumalg
Copy link
Member

@mxsl-gr Could you check this PR? Thanks!

@mxsl-gr
Copy link
Contributor

mxsl-gr commented Jan 15, 2025

@mxsl-gr Could you check this PR? Thanks!

no problem.
I had some urgent work over the past two weeks, I’ll review and test this PR this week

@@ -91,6 +91,7 @@ The prefix `spring.ai.zhipuai.embedding` is property prefix that configures the
| spring.ai.zhipuai.embedding.base-url | Optional overrides the spring.ai.zhipuai.base-url to provide embedding specific url | -
| spring.ai.zhipuai.embedding.api-key | Optional overrides the spring.ai.zhipuai.api-key to provide embedding specific api-key | -
| spring.ai.zhipuai.embedding.options.model | The model to use | embedding-2
| spring.ai.zhipuai.embedding.options.dimensions | The number of dimensions | -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it can be added to the doc: the default value is 2048 when the model is embedding-3

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I will add docs for this option.

@mxsl-gr
Copy link
Contributor

mxsl-gr commented Jan 21, 2025

the unit tests work fine, it might be helpful to add a note about the default value of dimensions in the doc

@Assassinxc Assassinxc force-pushed the add-dimensions-options-for-zhipu-embeddings branch from b6b668b to cacf381 Compare January 21, 2025 05:14
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

Successfully merging this pull request may close these issues.

3 participants