command/bin/bash -lc "sed -n '1,130p' src/app/api/tools/route.ts"
exit code 0
Output: import OpenAI from "openai"; const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY }); export async function POST(req: Request) { if (req.method !== "POST") { return new Response( JSON.stringify({ error: "Method not allowed, only POST requests are accepted.", }), { status: 405 } ); } const messages = await req.json(); const tools: OpenAI.Chat.Completions.ChatCompletionTool[] = [ { type: "function", function: { name: "search", description: "Search for information based on a query", parameters: { type: "object", properties: {}, }, }, }, { type: "function", function: { name: "stock", description: "Get the latest stock information for a given symbol", parameters: { type: "object", properties: { symbol: { type: "string", description: "Stock symbol to fetch data for.", }, }, required: ["symbol"], }, }, }, { type: "function", function: { name: "dictionary", description: "Get dictionary