Browse Source

更新db链接

22285461@qq.com 5 months ago
parent
commit
9c812077be
1 changed files with 0 additions and 7 deletions
  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(