Jelajahi Sumber

更新db链接

22285461@qq.com 5 bulan lalu
induk
melakukan
9c812077be
1 mengubah file dengan 0 tambahan dan 7 penghapusan
  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(