[PR #681] [MERGED] fix: PluginInvokeError with Hugging Face in Dify: Pydantic Validation Error (EmbeddingUsage expects integer instead of list) #1496

Closed
opened 2026-02-16 10:23:06 -05:00 by yindo · 0 comments
Owner

📋 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: mainHead: main


📝 Commits (2)

  • 446550a fix: PluginInvokeError with Hugging Face in Dify: Pydantic Validation Error (EmbeddingUsage expects integer instead of list)
  • b0c151c Bump 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 of tokens


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/681 **Author:** [@gokulavelan](https://github.com/gokulavelan) **Created:** 4/9/2025 **Status:** ✅ Merged **Merged:** 4/22/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`446550a`](https://github.com/langgenius/dify-official-plugins/commit/446550a9bf294f47d0b87dd2fd85a3b76a6c616b) fix: PluginInvokeError with Hugging Face in Dify: Pydantic Validation Error (EmbeddingUsage expects integer instead of list) - [`b0c151c`](https://github.com/langgenius/dify-official-plugins/commit/b0c151c650e6bcb5f9646de9ab8af3227a1289ca) Bump new version manifest.yaml - Huggingface-Hub ### 📊 Changes **2 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `models/huggingface_hub/manifest.yaml` (+1 -1) 📝 `models/huggingface_hub/models/text_embedding/text_embedding.py` (+2 -2) </details> ### 📄 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 of `tokens` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 10:23:06 -05:00
yindo closed this issue 2026-02-16 10:23:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#1496