Spaces:
Running
Running
| 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("****************") | |