Skip to content

Conversation

eeaters
Copy link
Contributor

@eeaters eeaters commented Sep 4, 2025

  • support batch embedding
  • Make test adjustments based on the official demo

Fixes: #4232

- support batch embedding
- Make test adjustments based on the official demo

Signed-off-by: YuJie Wan <[email protected]>
@ilayaperumalg
Copy link
Member

@mxsl-gr Could you help with the review of this PR? Thanks

@mxsl-gr
Copy link
Contributor

mxsl-gr commented Sep 10, 2025

@mxsl-gr Could you help with the review of this PR? Thanks

No problem, I’ve been busy with other tasks. I’ll review it later today.


EmbeddingRequest embeddingRequest = buildEmbeddingRequest(request);
var zhipuEmbeddingRequest = zhipuEmbeddingRequest(embeddingRequest);
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems unnecessary. It might be cleaner to handle it in buildEmbeddingRequest instead of wrapping it with another request.

Copy link
Contributor Author

@eeaters eeaters Sep 11, 2025

Choose a reason for hiding this comment

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

this seems unnecessary. It might be cleaner to handle it in buildEmbeddingRequest instead of wrapping it with another request.

Influenced by the EmbeddingModelObservationContext, its context requirement mandates the use of org.springframework.ai.embedding.EmbeddingRequest;
However, the ZhiPu API uses ZhiPuAiApi.EmbeddingRequest, so they cannot be directly integrated into a single method.

so, I try to adjusting the order of the code to improve its readability.

Copy link
Contributor

Choose a reason for hiding this comment

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

you‘re right, I really forgot about that. I think that works too.

@ilayaperumalg
Copy link
Member

@eeaters Thanks for the PR! @mxsl-gr Thanks for the review. Rebased and merged as b7f231a

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

Successfully merging this pull request may close these issues.

zhipu embedding model support batch processing
3 participants