generated from nhcarrigan/template
feat: fuck mcp, we'll just send the json
This commit is contained in:
+2
-14
@@ -41,21 +41,10 @@ export const ai = async(
|
||||
const parsedPrompt = prompt.replace("{{username}}", username);
|
||||
|
||||
const result = await anthropic.beta.messages.create({
|
||||
betas: [ "web-search-2025-03-05", "mcp-client-2025-04-04" ],
|
||||
betas: [ "web-search-2025-03-05" ],
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- API requirement
|
||||
max_tokens: 20_000,
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- API requirement
|
||||
mcp_servers: [
|
||||
{
|
||||
name: "nhcarrigan-mcp",
|
||||
type: "url",
|
||||
url: "https://hikari.nhcarrigan.com/api/mcp",
|
||||
tool_configuration: {
|
||||
allowed_tools: ["docs"],
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
],
|
||||
messages: messages.map((message) => {
|
||||
return {
|
||||
content: message.content,
|
||||
@@ -73,8 +62,7 @@ export const ai = async(
|
||||
allowed_domains: [ "nhcarrigan.com" ],
|
||||
name: "web_search",
|
||||
type: "web_search_20250305",
|
||||
},
|
||||
|
||||
}
|
||||
],
|
||||
});
|
||||
await calculateCost(result.usage, username);
|
||||
|
||||
Reference in New Issue
Block a user