初始化提交
This commit is contained in:
17
tests/test1.py
Normal file
17
tests/test1.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import requests
|
||||
|
||||
url = "http://localhost:5000/v1/chat/completions"
|
||||
headers = {
|
||||
"Authorization": "Bearer sk_ie2F3ZF2ZOt8dxwKCQglce3JTKFqYay5",
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
data = {
|
||||
"model": "deepseek-chat",
|
||||
"messages": [
|
||||
{"role": "user", "content": "给我完整的输出滕王阁序"}
|
||||
],
|
||||
"stream": False
|
||||
}
|
||||
|
||||
response = requests.post(url, headers=headers, json=data)
|
||||
print(response.json())
|
||||
Reference in New Issue
Block a user