Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
land007 committed May 5, 2023
1 parent 74c163e commit 3dcb7bf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ export class AppController {
@Sse()
conversation(
@Body() body: ConversationRequestBody,
@Headers('X-Openai-Api-Key') apiKey: string,
@Headers('X-Openai-Model') model: string,
@Headers() headers,
@Headers('x-openai-api-key') apiKey: string,
@Headers('x-openai-model') model: string,
@Headers('x-forwarded-for') ip: string,
//@Headers() headers,
): Observable<MessageEvent> {
const { messages, parent_message_id } = body;
const message = messages[0]?.content.parts[0] ?? '';
console.log('headers', headers); // 打印头信息
//console.log('headers', headers); // 打印头信息
console.log('ip', ip); // 打印头信息
console.log(apiKey, model); // 打印头信息
return this.appService.sendMessage(message, parent_message_id, apiKey, model);
}
Expand Down

0 comments on commit 3dcb7bf

Please sign in to comment.