fix: assistant message content must be a string
This commit is contained in:
@@ -215,14 +215,13 @@ M.update_history_messages = function(messages, using_ReAct_prompt, add_diagnosti
|
|||||||
table.insert(
|
table.insert(
|
||||||
picked_messages,
|
picked_messages,
|
||||||
1,
|
1,
|
||||||
Message:new_assistant_synthetic({
|
Message:new_assistant_synthetic(
|
||||||
type = "text",
|
string.format(
|
||||||
text = string.format(
|
|
||||||
"Tool use %s(%s)",
|
"Tool use %s(%s)",
|
||||||
tool_use_message.message.content[1].name,
|
tool_use_message.message.content[1].name,
|
||||||
vim.json.encode(tool_use_message.message.content[1].input)
|
vim.json.encode(tool_use_message.message.content[1].input)
|
||||||
),
|
)
|
||||||
})
|
)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
elseif Helpers.is_tool_use_message(msg) then
|
elseif Helpers.is_tool_use_message(msg) then
|
||||||
|
|||||||
Reference in New Issue
Block a user