[python][integrations] Add Tongyi embedding model integration#611
Merged
Sxnan merged 3 commits intoapache:mainfrom Apr 10, 2026
Merged
[python][integrations] Add Tongyi embedding model integration#611Sxnan merged 3 commits intoapache:mainfrom
Sxnan merged 3 commits intoapache:mainfrom
Conversation
Contributor
Author
|
@xintongsong @wenjin272 Could you review this PR? |
wenjin272
reviewed
Apr 8, 2026
python/flink_agents/integrations/embedding_models/tests/test_tongyi_embedding_model.py
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@wenjin272 Thanks for the comment. I updated the PR. PTAL |
wenjin272
reviewed
Apr 9, 2026
python/flink_agents/integrations/embedding_models/tongyi_embedding_model.py
Outdated
Show resolved
Hide resolved
| default_factory=lambda: os.environ.get("DASHSCOPE_API_KEY"), | ||
| description="Your DashScope API key.", | ||
| ) | ||
| request_timeout: float = Field( |
Collaborator
There was a problem hiding this comment.
It appears that request_timeout is not being used.
python/flink_agents/integrations/embedding_models/tongyi_embedding_model.py
Outdated
Show resolved
Hide resolved
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@wenjin272 Thanks for the review. All comments have been addressed. PTAL. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue: #610
Purpose of change
Add Tongyi (DashScope) embedding model integration for Alibaba Cloud's text embedding service.
This introduces:
TongyiEmbeddingModelConnection— manages the DashScope API connection with configurable API key and timeoutTongyiEmbeddingModelSetup— provides model configuration includingtext_type(query/document),dimension, andadditional_kwargsResourceName.EmbeddingModel) and Java (ResourceName.EmbeddingModel.Python)Tests
API
ResourceName.EmbeddingModel.TONGYI_EMBEDDING_MODEL_CONNECTIONandResourceName.EmbeddingModel.TONGYI_EMBEDDING_MODEL_SETUPto both Python and Java resource name registriesDocumentation
doc-neededdoc-not-neededdoc-included