feat: Add a INFO-level log when fallback to gpt2tokenizer #7590

Closed
opened 2026-02-21 18:21:22 -05:00 by yindo · 0 comments
Owner

Originally created by @laipz8200 on GitHub (Jan 8, 2025).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

We support fallback in https://github.com/langgenius/dify/blob/0a49d3dd5274e1f37d9d05ccbc7284c64d9d20a4/api/core/model_runtime/model_providers/__base/tokenizers/gpt2_tokenzier.py#L38 now, but also need a way to notice user which tokenizer we are using.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @laipz8200 on GitHub (Jan 8, 2025). ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. We support fallback in https://github.com/langgenius/dify/blob/0a49d3dd5274e1f37d9d05ccbc7284c64d9d20a4/api/core/model_runtime/model_providers/__base/tokenizers/gpt2_tokenzier.py#L38 now, but also need a way to notice user which tokenizer we are using. ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancementgood first issue labels 2026-02-21 18:21:22 -05:00
yindo closed this issue 2026-02-21 18:21:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7590