fix sync /chat call to agents service

This commit is contained in:
Ramnique Singh 2025-04-05 00:37:20 +05:30
parent 57693b36cc
commit a59d8c3ed3
6 changed files with 29 additions and 31 deletions

View file

@ -96,8 +96,8 @@ export async function POST(
prompts,
startAgent,
testProfile: testProfile ?? undefined,
mcpServers: project.mcpServers ?? undefined,
toolWebhookUrl: project.webhookUrl ?? undefined,
mcpServers: project.mcpServers ?? [],
toolWebhookUrl: project.webhookUrl ?? '',
};
const { messages: agenticMessages, state } = await getAgenticApiResponse(request);

View file

@ -102,8 +102,8 @@ export async function POST(
tools,
prompts,
startAgent,
mcpServers: projectSettings.mcpServers ?? undefined,
toolWebhookUrl: projectSettings.webhookUrl ?? undefined,
mcpServers: projectSettings.mcpServers ?? [],
toolWebhookUrl: projectSettings.webhookUrl ?? '',
testProfile: undefined,
};
logger.log(`Sending agentic request`);

View file

@ -55,8 +55,8 @@ export const AgenticAPIChatRequest = z.object({
prompts: z.array(WorkflowPrompt),
startAgent: z.string(),
testProfile: TestProfile.optional(),
mcpServers: z.array(MCPServer).optional(),
toolWebhookUrl: z.string().optional(),
mcpServers: z.array(MCPServer),
toolWebhookUrl: z.string(),
});
export const AgenticAPIChatResponse = z.object({