-
Notifications
You must be signed in to change notification settings - Fork 107
Description
Description
The variable data.input_type, which stores either EmbeddingInputType.DOCUMENT or EmbeddingInputType.QUERY, is not passed when executing text embedding.
data.input_type should be passed to model_instance.invoke located here:
https://github.com/langgenius/dify-plugin-sdks/blob/0.6.1/python/dify_plugin/core/plugin_executor.py#L213
Background
When implementing a custom _invoke method in the following plugin:
https://github.com/langgenius/dify-official-plugins/blob/main/models/openai_api_compatible/models/text_embedding/text_embedding.py
I attempted to check the value of input_type inside _invoke. However, input_type was always EmbeddingInputType.DOCUMENT, even when the request was actually a query.
This suggests that the correct input_type value is not being passed through to _invoke.