Spaces:
Running
Running
File size: 457 Bytes
372d102 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
from openai import OpenAI
client = OpenAI(base_url="http://192.168.1.7:1337/")
from rubbish import x
completion = client.chat.completions.create(
model="deepseek-reasoner",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": f"Hi!"},
],
stream=True
)
for chunk in completion:
# print(chunk)
print(chunk.choices[0].delta.content,end="")
# print("****************")
|