Fix compile

This commit is contained in:
Enrico Ros
2024-06-16 17:26:32 -07:00
parent 08e4016972
commit b31c891772
+7
View File
@@ -34,6 +34,13 @@ export async function runAssistantUpdatingState(conversationId: string, history:
const onMessageUpdated = (incrementalMessage: Partial<DMessage>) => {
cHandler.messageEdit(assistantMessageId, incrementalMessage, false);
};
let instructions: VChatMessageIn[];
try {
instructions = history.map((m): VChatMessageIn => ({ role: m.role, content: messageSingleTextOrThrow(m) /* BIG FIXME */ }));
} catch (error) {
console.error('runAssistantUpdatingState: error:', error, history);
throw error;
}
const messageStatus = await streamAssistantMessage(
assistantLlmId,
instructions,