mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-22 18:45:19 +02:00
disable copilot response validation
This commit is contained in:
parent
b53e485404
commit
ece9ed730d
1 changed files with 3 additions and 1 deletions
|
|
@ -523,7 +523,8 @@ export async function getCopilotResponse(
|
||||||
content: json.response.replace(/^```json\n/, '').replace(/\n```$/, ''),
|
content: json.response.replace(/^```json\n/, '').replace(/\n```$/, ''),
|
||||||
});
|
});
|
||||||
|
|
||||||
// assert that msg.content is a CopilotAssistantMessage
|
/*
|
||||||
|
// validate response schema
|
||||||
assert(msg.role === 'assistant');
|
assert(msg.role === 'assistant');
|
||||||
if (msg.role === 'assistant') {
|
if (msg.role === 'assistant') {
|
||||||
for (const part of msg.content.response) {
|
for (const part of msg.content.response) {
|
||||||
|
|
@ -583,6 +584,7 @@ export async function getCopilotResponse(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return {
|
return {
|
||||||
message: msg as z.infer<typeof CopilotAssistantMessage>,
|
message: msg as z.infer<typeof CopilotAssistantMessage>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue