如何通过环境变量限定上下文的长度? #2783
-
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
看到源码当中, AgentConfig如果并没有enableMaxTokens则不可以开启max_tokens? agentConfig.params.max_tokens = chatConfig.enableMaxTokens
? agentConfig.params.max_tokens
: undefined; 看起来是需要在客户端开启 |
Beta Was this translation helpful? Give feedback.
-
Seeing in the source code, if AgentConfig does not have enableMaxTokens, then max_tokens cannot be enabled? agentConfig.params.max_tokens = chatConfig.enableMaxTokens
? agentConfig.params.max_tokens
: undefined; |
Beta Was this translation helpful? Give feedback.
-
试试 |
Beta Was this translation helpful? Give feedback.
-
![]() 配置上了并且重新构建了,还是没有生效@@ |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
max_token is not the length of the context... it is the maximum length of the generated text |
Beta Was this translation helpful? Give feedback.
-
那如何可以限定上下文的长度? |
Beta Was this translation helpful? Give feedback.
-
对 |
Beta Was this translation helpful? Give feedback.
那如何可以限定上下文的长度?
现在出现的问题就是上下文长度过长导致tokens消耗得很快
根据你前面的写法的话可以配置
chatConfig.enableHistoryCount=true;chatConfig.historyCount=5
来配置对吗?