Fix codex image
This commit is contained in:
parent
f3e5c99e8c
commit
549223c8cf
2 changed files with 8 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -67,3 +67,4 @@ README1.md
|
||||||
deploy.sh
|
deploy.sh
|
||||||
ecosystem.config.*
|
ecosystem.config.*
|
||||||
start.sh
|
start.sh
|
||||||
|
src/mitm/server copy.js
|
||||||
|
|
|
||||||
|
|
@ -228,12 +228,17 @@ export function openaiToOpenAIResponsesRequest(model, body, stream, credentials)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert tool results
|
// Convert tool results - output must be a string for Responses API
|
||||||
if (msg.role === "tool") {
|
if (msg.role === "tool") {
|
||||||
|
const output = typeof msg.content === "string"
|
||||||
|
? msg.content
|
||||||
|
: Array.isArray(msg.content)
|
||||||
|
? msg.content.map(c => c.text || JSON.stringify(c)).join("")
|
||||||
|
: JSON.stringify(msg.content);
|
||||||
result.input.push({
|
result.input.push({
|
||||||
type: "function_call_output",
|
type: "function_call_output",
|
||||||
call_id: msg.tool_call_id,
|
call_id: msg.tool_call_id,
|
||||||
output: msg.content
|
output
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue