Indicate no content on function result

This commit is contained in:
Cohee 2024-10-05 00:20:28 +03:00
parent 6a304e8884
commit 68376f7dd0
1 changed files with 1 additions and 1 deletions

View File

@ -733,7 +733,7 @@ async function populateChatHistory(messages, prompts, chatCompletion, type = nul
if (chatCompletion.canAfford(toolCallMessage)) {
chatCompletion.reserveBudget(toolCallMessage);
for (const invocation of invocations.slice().reverse()) {
const toolResultMessage = new Message('tool', invocation.result, invocation.id);
const toolResultMessage = new Message('tool', invocation.result || '[No content]', invocation.id);
const canAfford = chatCompletion.canAfford(toolResultMessage);
if (!canAfford) {
break;