漏了一个部署用的包

This commit is contained in:
高子兴 2024-10-25 23:00:33 +08:00
parent a434ef998c
commit 46623244aa
4 changed files with 6 additions and 19 deletions

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
websockets~=13.1
openai~=1.52.2
fastapi~=0.115.3
uvicorn~=0.20.0

View File

@ -1,6 +0,0 @@
# -*- coding: utf-8 -*-
# @Time : 2024/10/25 下午5:18
# @Author : 河瞬
# @FileName: __init__.py.py
# @Software: PyCharm
# @Github :

View File

@ -1,10 +1,10 @@
import base64
import openai
with open("test.png", "rb") as f:
with open("../test.png", "rb") as f:
image_data = f.read()
image_base64 = base64.b64encode(image_data).decode('utf-8')
with open("key", "r") as f:
with open("../key", "r") as f:
key = f.read()
client = openai.OpenAI(api_key=key,
base_url="https://open.bigmodel.cn/api/paas/v4/"

View File

@ -1,11 +0,0 @@
# Test your FastAPI endpoints
GET http://127.0.0.1:8000/
Accept: application/json
###
GET http://127.0.0.1:8000/hello/User
Accept: application/json
###