feat: Make MAX_TOKENS and MAX_RESPONSE_SEGMENTS configurable
Added MAX_TOKENS and MAX_RESPONSE_SEGMENTS to .env.example and documentation. Updated constants to read from environment variables, allowing configuration of token and response segment limits.
This commit is contained in:
@@ -331,7 +331,7 @@ export async function chatAction({ request, userId }: ChatActionArgs) {
|
||||
|
||||
const continueMessage = async (text: string) => {
|
||||
logger.info(
|
||||
`达到最大 token 限制 (${MAX_TOKENS}): 继续消息, 还可以响应 (${MAX_RESPONSE_SEGMENTS - streamSwitches} 个分段)`,
|
||||
`达到最大 token 限制 (${DEFAULT_MODEL_DETAILS?.maxTokenAllowed || MAX_TOKENS}): 继续消息, 还可以响应 (${MAX_RESPONSE_SEGMENTS - streamSwitches} 个分段)`,
|
||||
);
|
||||
messages.push({
|
||||
id: generateId(),
|
||||
|
||||
Reference in New Issue
Block a user