typo fix
This commit is contained in:
@@ -319,7 +319,8 @@ openai_completion() {
|
|||||||
done < <(echo "$response_body")
|
done < <(echo "$response_body")
|
||||||
|
|
||||||
# Store accumulated content as response_body for later processing
|
# Store accumulated content as response_body for later processing
|
||||||
response_body="{\"choices\":[{\"message\":{\"content\":\"$stream_content\"}}]}"
|
# Use jq to properly escape the content string
|
||||||
|
response_body=$(jq -n --arg content "$stream_content" '{choices: [{message: {content: $content}}]}')
|
||||||
rm -f "$temp_file"
|
rm -f "$temp_file"
|
||||||
else
|
else
|
||||||
# Non-streaming mode (original behavior)
|
# Non-streaming mode (original behavior)
|
||||||
|
|||||||
Reference in New Issue
Block a user