Skip to content

fix: incorrect text_type type declaration in Alibaba Tongyi Embeddings #5147

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

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

xyspg
Copy link
Contributor

@xyspg xyspg commented Apr 18, 2024

corrects the type declaration for the text_type parameter in Alibaba Tongyi embeddings. The previous declaration incorrectly listed text as an option, which is not supported. The corrected declaration includes the intended options: query and document as shown in official docs and comment above it.

Translation for the original comment:

/**
 * Value: query or document, default value is document
 * Description: After text is converted into vectors, it can be applied to downstream tasks such as retrieval, clustering, and classification.
 * For asymmetric tasks like retrieval, to achieve better retrieval effects, it is recommended to distinguish between query text (query) and
 * document text (document). For symmetric tasks like clustering and classification, there is no need to specify,
 * and the system's default value "document" can be used.
 */

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 18, 2024
Copy link

vercel bot commented Apr 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 19, 2024 3:18am
langchainjs-docs ✅ Ready (Inspect) Visit Preview Apr 19, 2024 3:18am

@dosubot dosubot bot added auto:bug Related to a bug, vulnerability, unexpected error with an existing feature auto:documentation Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder labels Apr 18, 2024
Copy link
Member

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

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

good catch, thanks for fixing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature auto:documentation Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder lgtm PRs that are ready to be merged as-is size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants