22285461@qq.com 5 mēneši atpakaļ
vecāks
revīzija
9c812077be
1 mainītis faili ar 0 papildinājumiem un 7 dzēšanām
  1. 0 7
      main.py

+ 0 - 7
main.py

@@ -6,7 +6,6 @@ from fastapi import FastAPI, Request
 from fastapi.encoders import jsonable_encoder
 from fastapi.responses import JSONResponse
 from openai import OpenAI
-from pydantic import BaseModel
 from starlette.middleware.cors import CORSMiddleware
 
 from DBTools import DBUserInfo, DBCustomUser
@@ -33,12 +32,6 @@ logging.basicConfig(
 )
 
 
-class Question(BaseModel):
-    user: str
-    content: str
-    stream: bool = True
-
-
 async def ai_stream(content: str):
     client = openai.OpenAI(api_key=API_KEY)
     completion = client.chat.completions.create(