chatglm-turbo support 3.2k token #809

Closed
opened 2026-02-21 17:28:32 -05:00 by yindo · 8 comments
Owner

Originally created by @hunter-eric on GitHub (Dec 14, 2023).

Originally assigned to: @crazywoola on GitHub.

Self Checks

Dify version

0.3.32

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image

✔️ Expected Behavior

image

Actual Behavior

image we can not change max token of chatglm-turbo
Originally created by @hunter-eric on GitHub (Dec 14, 2023). Originally assigned to: @crazywoola on GitHub. ### 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 file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). ### Dify version 0.3.32 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="556" alt="image" src="https://github.com/langgenius/dify/assets/1303119/89560ee3-ef0e-4e1d-9b11-2d793fd92b8e"> ### ✔️ Expected Behavior <img width="556" alt="image" src="https://github.com/langgenius/dify/assets/1303119/54bf1899-947b-4fc6-b2f8-9bbd5b864481"> ### ❌ Actual Behavior <img width="385" alt="image" src="https://github.com/langgenius/dify/assets/1303119/dccd5f4f-2b10-4ce8-b0e5-37871f9b1d1c"> we can not change max token of chatglm-turbo
yindo added the 🐞 bug label 2026-02-21 17:28:32 -05:00
yindo closed this issue 2026-02-21 17:28:32 -05:00
Author
Owner

@crazywoola commented on GitHub (Dec 14, 2023):

We will take a look into this issue. :)

---- Update----
The model did not provide a setting called max_token, so it shouldn't be able to display anyway. We will remove this setting later.

@crazywoola commented on GitHub (Dec 14, 2023): We will take a look into this issue. :) ---- Update---- The model did not provide a setting called `max_token`, so it shouldn't be able to display anyway. We will remove this setting later.
Author
Owner

@hunter-eric commented on GitHub (Dec 14, 2023):

We will take a look into this issue. :)

---- Update---- The model did not provide a setting called max_token, so it shouldn't be able to display anyway. We will remove this setting later.

so we have to wait the version of 0.3.4?
now the request log show that dify did not submit the content to llm model when context larger than 512token.

@hunter-eric commented on GitHub (Dec 14, 2023): > We will take a look into this issue. :) > > ---- Update---- The model did not provide a setting called `max_token`, so it shouldn't be able to display anyway. We will remove this setting later. so we have to wait the version of 0.3.4? now the request log show that dify did not submit the content to llm model when context larger than 512token.
Author
Owner

@crazywoola commented on GitHub (Dec 14, 2023):

Yes, until we fix this.

@crazywoola commented on GitHub (Dec 14, 2023): Yes, until we fix this.
Author
Owner

@crazywoola commented on GitHub (Dec 14, 2023):

I have a question about the version, we are currently using v0.3.33, And you said you are using 0.3.2? Do you mean 0.3.32?

@crazywoola commented on GitHub (Dec 14, 2023): I have a question about the version, we are currently using v0.3.33, And you said you are using 0.3.2? Do you mean 0.3.32?
Author
Owner

@hunter-eric commented on GitHub (Dec 14, 2023):

I have a question about the version, we are currently using v0.3.33, And you said you are using 0.3.2? Do you mean 0.3.32?

yes ,i mean 0.3.32. Thanks

@hunter-eric commented on GitHub (Dec 14, 2023): > I have a question about the version, we are currently using v0.3.33, And you said you are using 0.3.2? Do you mean 0.3.32? yes ,i mean 0.3.32. Thanks
Author
Owner

@crazywoola commented on GitHub (Dec 14, 2023):

This is a frontend bug, it won't affect what it will send to the llm. Because we do not have max token for chatglm_turbo. So it's a placeholder(default) value.
First image shows the 512 tokens, but actually it costs more than this one.
image

image
@crazywoola commented on GitHub (Dec 14, 2023): This is a frontend bug, it won't affect what it will send to the llm. Because we do not have max token for chatglm_turbo. So it's a placeholder(default) value. First image shows the 512 tokens, but actually it costs more than this one. <img width="421" alt="image" src="https://github.com/langgenius/dify/assets/100913391/bfe070ed-fdf9-47b2-9a1f-270b89c6d120"> <img width="453" alt="image" src="https://github.com/langgenius/dify/assets/100913391/58d0032c-36c7-448c-bc58-525e45227ea8">
Author
Owner

@WSDzju commented on GitHub (Dec 20, 2023):

This is a frontend bug, it won't affect what it will send to the llm. Because we do not have max token for chatglm_turbo. So it's a placeholder(default) value. First image shows the 512 tokens, but actually it costs more than this one. image

image

I also found the problem. In the case of gpt-3.5-turbo, the Max Token can be costomized. So the Max Token option will be added for Chatglm? I also try the lastest version 0.3.34, the option have not provided yet. BTW, the ouput length of chatglm-turbo is relatively short, although I have provided considerable context docs and prompted to give the answer as long as possible. So the situation is only related to LLM itself ?

@WSDzju commented on GitHub (Dec 20, 2023): > This is a frontend bug, it won't affect what it will send to the llm. Because we do not have max token for chatglm_turbo. So it's a placeholder(default) value. First image shows the 512 tokens, but actually it costs more than this one. <img alt="image" width="421" src="https://private-user-images.githubusercontent.com/100913391/290530422-bfe070ed-fdf9-47b2-9a1f-270b89c6d120.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDMwNTYyODgsIm5iZiI6MTcwMzA1NTk4OCwicGF0aCI6Ii8xMDA5MTMzOTEvMjkwNTMwNDIyLWJmZTA3MGVkLWZkZjktNDdiMi05YTFmLTI3MGI4OWM2ZDEyMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBSVdOSllBWDRDU1ZFSDUzQSUyRjIwMjMxMjIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDIzMTIyMFQwNzA2MjhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNzkyZjNjNjc4MmM2ZDBlYjNhODI5Mjc4ZjFjYzFlMTRiNmQ3MmUzZjhlMzhjYmMzMjlmMzIzZjgyMDg2NWUyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.cyplFR5pBf7Iina9aWO6WxYKJoFW5g3B9sW5-k_XafI"> > > <img alt="image" width="453" src="https://private-user-images.githubusercontent.com/100913391/290530369-58d0032c-36c7-448c-bc58-525e45227ea8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDMwNTYyODgsIm5iZiI6MTcwMzA1NTk4OCwicGF0aCI6Ii8xMDA5MTMzOTEvMjkwNTMwMzY5LTU4ZDAwMzJjLTM2YzctNDQ4Yy1iYzU4LTUyNWU0NTIyN2VhOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBSVdOSllBWDRDU1ZFSDUzQSUyRjIwMjMxMjIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDIzMTIyMFQwNzA2MjhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hZWE5YTdiZmIyOTJmY2RjZTcyMTJkMDRiOTg2YWQ1OTA3ZWI3ZGNhMWVhODgwYzg4ZjNmMmMxMzU2MThiYmFjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.alBJSq3GkSLYTS0_cFT0DzRYTcoJEOkNwAiExg3sLys"> I also found the problem. In the case of gpt-3.5-turbo, the Max Token can be costomized. So the Max Token option will be added for Chatglm? I also try the lastest version 0.3.34, the option have not provided yet. BTW, the ouput length of chatglm-turbo is relatively short, although I have provided considerable context docs and prompted to give the answer as long as possible. So the situation is only related to LLM itself ?
Author
Owner

@crazywoola commented on GitHub (Jan 4, 2024):

We have update the UI, and there is no max_token in ChatGLM. This should be resolved in v0.4.x

image
@crazywoola commented on GitHub (Jan 4, 2024): We have update the UI, and there is no max_token in ChatGLM. This should be resolved in v0.4.x <img width="656" alt="image" src="https://github.com/langgenius/dify/assets/100913391/6d1b76a3-fb96-42f0-9f72-b1ae86b9ed05">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#809