feature/ai-search #2
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user