mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
[PR #681] [MERGED] fix: PluginInvokeError with Hugging Face in Dify: Pydantic Validation Error (EmbeddingUsage expects integer instead of list) #1496
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/681
Author: @gokulavelan
Created: 4/9/2025
Status: ✅ Merged
Merged: 4/22/2025
Merged by: @crazywoola
Base:
main← Head:main📝 Commits (2)
446550afix: PluginInvokeError with Hugging Face in Dify: Pydantic Validation Error (EmbeddingUsage expects integer instead of list)b0c151cBump new version manifest.yaml - Huggingface-Hub📊 Changes
2 files changed (+3 additions, -3 deletions)
View changed files
📝
models/huggingface_hub/manifest.yaml(+1 -1)📝
models/huggingface_hub/models/text_embedding/text_embedding.py(+2 -2)📄 Description
This addresses the issue #660.
Error
dify_plugin.errors.model.InvokeError: [models] Error: 2 validation errors for EmbeddingUsage tokens Input should be a valid integer [type=int_type, input_value=[82], input_type=list] For further information visit https://errors.pydantic.dev/2.8/v/int_type total_tokens Input should be a valid integer [type=int_type, input_value=[82], input_type=list]Changes
used
tokens[0]instead oftokens🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.