Skip to content

如何通过环境变量限定上下文的长度? #2783

Discussion options

You must be logged in to vote

那如何可以限定上下文的长度?
现在出现的问题就是上下文长度过长导致tokens消耗得很快
根据你前面的写法的话可以配置chatConfig.enableHistoryCount=true;chatConfig.historyCount=5 来配置对吗?

Replies: 9 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by arvinxx
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2769 on June 04, 2024 02:40.