Skip to content

Commit

Permalink
🐛 fix: fix request error
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 16, 2023
1 parent 3bb29a0 commit d8bb922
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v1/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { OpenAIPluginPayload } from '../../types/plugins';
export const runtime = 'edge';

export default async (req: Request) => {
if (req.method !== 'POST') return new Response('Method Not Allowed', { status: 405 });

const { name, arguments: args } = (await req.json()) as OpenAIPluginPayload;

console.log(`检测到 functionCall: ${name}`);
Expand Down

0 comments on commit d8bb922

Please sign in to comment.