mirror of
https://github.com/langgenius/dify-plugins.git
synced 2026-07-22 01:55:36 -04:00
OpenAI gpt-4.1 error #29
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?
Originally created by @throrio on GitHub (Apr 15, 2025).
Dify 1.2
Plugin OpenAI Model 0.0.18
All is correct with gpt-4o in chatbot
When i try to use 4.1 in same chatbot, i always cathed error:
2025-04-15 20:19:28,703.703 ERROR [Thread-267 (_generate_worker)] [app_generator.py:246] - Unknown Error when generating
Traceback (most recent call last):
File "/app/api/core/app/apps/chat/app_generator.py", line 226, in _generate_worker
File "/app/api/core/app/apps/chat/app_runner.py", line 69, in run
File "/app/api/core/app/apps/base_app_runner.py", line 90, in get_pre_calculate_rest_tokens
File "/app/api/core/model_manager.py", line 195, in get_llm_num_tokens
File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke
File "/app/api/core/model_runtime/model_providers/__base/large_language_model.py", line 299, in get_num_tokens
File "/app/api/core/plugin/manager/model.py", line 231, in get_llm_num_tokens
File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream
File "/app/api/core/plugin/manager/base.py", line 221, in _handle_plugin_daemon_error
core.plugin.manager.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"NotImplementedError","message":"get_num_tokens_from_messages() is not presently implemented for model cl100k_base.See https://platform.openai.com/docs/advanced-usage/managing-tokens for for information on how messages are converted to tokens."}
2025-04-15 20:19:28,735.735 ERROR [Dummy-268] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"NotImplementedError","message":"get_num_tokens_from_messages() is not presently implemented for model cl100k_base.See https://platform.openai.com/docs/advanced-usage/managing-tokens for for information on how messages are converted to tokens."}
@kurokobo commented on GitHub (Apr 15, 2025):
Duplicated: https://github.com/langgenius/dify-official-plugins/issues/721