mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
[PR #2079] [MERGED] feat(openai_api_compatible): text embedding prefix #2246
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-official-plugins/pull/2079
Author: @utsumi-fj
Created: 11/17/2025
Status: ✅ Merged
Merged: 11/17/2025
Merged by: @crazywoola
Base:
main← Head:openai_api_compatible_text_embedding_prefix📝 Commits (2)
c6bc1a0feat(openai_api_compatible): text embedding prefixe70a15bcheck whether prefix is empty or not📊 Changes
3 files changed (+66 additions, -3 deletions)
View changed files
📝
models/openai_api_compatible/manifest.yaml(+1 -1)📝
models/openai_api_compatible/models/text_embedding/text_embedding.py(+39 -2)📝
models/openai_api_compatible/provider/openai_api_compatible.yaml(+26 -0)📄 Description
Allow configuration of document and query prefixes for text embedding in openai_api_compatible model plugin.
Related Issues or Context
Some embedding models improve accuracy when a prefix is specified. This PR makes it possible to set document and query prefixes.
Note: This pull request can be used even if the dify-plugin-sdk's bug https://github.com/langgenius/dify-plugin-sdks/issues/241 is not yet fixed. Once the bug is fixed, the functionality will behave as intended.
This PR contains Changes to LLM Models Plugin
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Dify Plugin SDK Version
dify_plugin>=0.3.0,<0.6.0is in requirements.txt (SDK docs)Environment Verification (If Any Code Changes)
Local Deployment Environment
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.