mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
Do not stringify tool_output if it is alreayd a string. (#1331)
This commit is contained in:
parent
c53e08a8b1
commit
775c2f75fc
1 changed files with 4 additions and 1 deletions
|
|
@ -650,7 +650,10 @@ class CopilotPlusChainRunner extends BaseChainRunner {
|
|||
context =
|
||||
"\n\n# Additional context:\n\n" +
|
||||
validOutputs
|
||||
.map((output) => `# ${output.tool}\n${JSON.stringify(output.output)}`)
|
||||
.map(
|
||||
(output) =>
|
||||
`<${output.tool}>\n${typeof output.output !== "string" ? JSON.stringify(output.output) : output.output}\n</${output.tool}>`
|
||||
)
|
||||
.join("\n\n");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue