浏览代码

更新db链接

22285461@qq.com 5 月之前
父节点
当前提交
9c812077be
共有 1 个文件被更改,包括 0 次插入7 次删除
  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(