feature/ai-search #2

Open
mmintel wants to merge 153 commits from feature/ai-search into main
Showing only changes of commit d6bdd28b30 - Show all commits

View File

@@ -5,7 +5,7 @@ import { z } from 'zod';
import * as Sentry from '@sentry/nextjs';
import { generateText } from 'ai';
import { createOpenAI } from '@ai-sdk/openai';
// @ts-ignore
// @ts-expect-error - Local version of @mintel/payload-ai/tools/mcpAdapter might not have types published yet
import { createMcpTools } from '@mintel/payload-ai/tools/mcpAdapter';
export const dynamic = 'force-dynamic';
@@ -180,7 +180,7 @@ ${teamContextStr}
try {
const { tools } = await createMcpTools({
name: 'kabelfachmann',
url: mcpUrl
url: mcpUrl,
});
mcpTools = tools;
} catch (e) {
@@ -196,8 +196,8 @@ ${teamContextStr}
content: typeof m.content === 'string' ? m.content : JSON.stringify(m.content),
})),
tools: mcpTools,
// @ts-ignore
maxSteps: 3, // Allow the model to call the tool and then respond
// @ts-expect-error - maxSteps might be missing in some versions of generateText types
maxSteps: 5,
temperature: 0.3,
maxTokens: MAX_RESPONSE_TOKENS,
});