Commit 976e1f09 by CalciumIon

fix: stream options

parent 1852fe04
......@@ -8,4 +8,4 @@ var StreamingTimeout = common.GetEnvOrDefault("STREAMING_TIMEOUT", 30)
var DifyDebug = common.GetEnvOrDefaultBool("DIFY_DEBUG", true)
// ForceStreamOption 覆盖请求参数,强制返回usage信息
var ForceStreamOption = common.GetEnvOrDefaultBool("FORCE_STREAM_OPTION", false)
var ForceStreamOption = common.GetEnvOrDefaultBool("FORCE_STREAM_OPTION", true)
......@@ -32,7 +32,7 @@ func GenerateFinalUsageResponse(id string, createAt int64, model string, usage d
Created: createAt,
Model: model,
SystemFingerprint: nil,
Choices: nil,
Choices: make([]dto.ChatCompletionsStreamResponseChoice, 0),
Usage: &usage,
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment