From ac343050a8f963a788d35243fbe271e54458a49f Mon Sep 17 00:00:00 2001 From: michael1986 Date: Tue, 2 Dec 2025 11:40:38 +0100 Subject: [PATCH] typo fix --- finish.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/finish.sh b/finish.sh index 87a9650..4304a3e 100644 --- a/finish.sh +++ b/finish.sh @@ -319,7 +319,8 @@ openai_completion() { done < <(echo "$response_body") # 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" else # Non-streaming mode (original behavior)