mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-16 01:15:26 -05:00
fix(executor): streaming response format (#1972)
This commit is contained in:
committed by
GitHub
parent
3a8f01f3e4
commit
6f4f8cfad2
@@ -565,7 +565,15 @@ export class BlockExecutor {
|
||||
if (responseFormat) {
|
||||
try {
|
||||
const parsed = JSON.parse(fullContent.trim())
|
||||
Object.assign(executionOutput, parsed)
|
||||
|
||||
streamingExec.execution.output = {
|
||||
...parsed,
|
||||
tokens: executionOutput.tokens,
|
||||
toolCalls: executionOutput.toolCalls,
|
||||
providerTiming: executionOutput.providerTiming,
|
||||
cost: executionOutput.cost,
|
||||
model: executionOutput.model,
|
||||
}
|
||||
return
|
||||
} catch (error) {
|
||||
logger.warn('Failed to parse streamed content for response format', { blockId, error })
|
||||
|
||||
Reference in New Issue
Block a user