diff --git a/src/handlers/front-controller.ts b/src/handlers/front-controller.ts index 60030d18..852a51d1 100644 --- a/src/handlers/front-controller.ts +++ b/src/handlers/front-controller.ts @@ -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;