diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0e42804 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +websockets~=13.1 +openai~=1.52.2 +fastapi~=0.115.3 \ No newline at end of file diff --git a/test/__init__.py b/test/__init__.py deleted file mode 100644 index 6d7254f..0000000 --- a/test/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -*- coding: utf-8 -*- -# @Time : 2024/10/25 下午5:18 -# @Author : 河瞬 -# @FileName: __init__.py.py -# @Software: PyCharm -# @Github : diff --git a/test.py b/test/test3.py similarity index 92% rename from test.py rename to test/test3.py index 218b2e8..bd93e46 100644 --- a/test.py +++ b/test/test3.py @@ -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/" diff --git a/test_main.http b/test_main.http deleted file mode 100644 index a2d81a9..0000000 --- a/test_main.http +++ /dev/null @@ -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 - -###