Skip to content

Commit 44c732b

Browse files
authored
Merge pull request #7 from orange104/fix-stream
fix: the logic error in determining non-streaming output
2 parents 2bf3978 + 0328550 commit 44c732b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloudflare-worker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async function handleRequest(request) {
3434

3535
// 入参中如果包含了 stream=true,则表现形式为非流式输出
3636
const response = await fetch(fetchAPI, payload);
37-
if (body && body.stream && body.stream === false) {
37+
if (body && body.stream !== true) {
3838
const results = await response.json();
3939
return new Response(JSON.stringify(results), {
4040
status: response.status,

0 commit comments

Comments
 (0)