Skip to content

Commit

Permalink
fix: front controller choice type error
Browse files Browse the repository at this point in the history
  • Loading branch information
sshivaditya committed Jan 10, 2025
1 parent 1006d65 commit 07cf595
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/handlers/front-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export async function delegate(context: Context) {
return;
}

const response = solution.choices[0]?.message?.content;
const response = solution.content
.filter((c) => c.type === "text")
.map((c) => c.text)
.join("\n");
if (!response) {
logger.error("Empty response from completion");
return;
Expand Down

0 comments on commit 07cf595

Please sign in to comment.