first commit

This commit is contained in:
jack
2025-11-12 16:36:38 +08:00
commit 756cb1e7d8
13 changed files with 1356 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
import httpx
content = "简单讲解一下mvc模型上下文"
key = "sk-mepewzmlykchrjosberepdvvbnrjbhoamewefnckokitveqf"
model = "THUDM/GLM-4.1V-9B-Thinking"
url = "https://api.siliconflow.cn/v1/chat/completions"
headers = {
"Authorization": f"Bearer {key}",
"Content-Type": "application/json"
}
payload = {
"model": model,
"messages": [{"role": "user", "content": content}]
}
with httpx.Client(timeout=999) as client:
response = client.post(url, headers=headers, json=payload)
if response.json()["choices"][0]["message"]["content"]:
content = response.json()["choices"][0]["message"]["content"]
content = content.split("\n")
for i in content:
print(i)
else:
print(response.json())