[PR #385] [MERGED] Fixes get_num_tokens function to return []int instead of int #1336

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

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/385
Author: @snicholas
Created: 3/5/2025
Status: Merged
Merged: 3/5/2025
Merged by: @crazywoola

Base: mainHead: Issue-384-azure-openai-text-embedding-fix


📝 Commits (2)

  • cef0673 Fixes get_num_tokens function to return []int instead of int
  • 9e3bc0a bump: version

📊 Changes

2 files changed (+7 additions, -6 deletions)

View changed files

📝 models/azure_openai/manifest.yaml (+1 -1)
📝 models/azure_openai/models/text_embedding/text_embedding.py (+6 -5)

📄 Description

Modifies the get_num_tokens function in text_embedding model to return the correct data type

Fix https://github.com/langgenius/dify/issues/14656


🔄 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/385 **Author:** [@snicholas](https://github.com/snicholas) **Created:** 3/5/2025 **Status:** ✅ Merged **Merged:** 3/5/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `Issue-384-azure-openai-text-embedding-fix` --- ### 📝 Commits (2) - [`cef0673`](https://github.com/langgenius/dify-official-plugins/commit/cef06739fa43a08340fadf5c2ed35a48f13ad6e5) Fixes get_num_tokens function to return []int instead of int - [`9e3bc0a`](https://github.com/langgenius/dify-official-plugins/commit/9e3bc0a18ee9ca6deb148f63ba7652fcb05267c4) bump: version ### 📊 Changes **2 files changed** (+7 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `models/azure_openai/manifest.yaml` (+1 -1) 📝 `models/azure_openai/models/text_embedding/text_embedding.py` (+6 -5) </details> ### 📄 Description Modifies the get_num_tokens function in text_embedding model to return the correct data type Fix https://github.com/langgenius/dify/issues/14656 --- <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:22:39 -05:00
yindo closed this issue 2026-02-16 10:22:39 -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#1336