Spaces:
Paused
Paused
| import os | |
| from huggingface_hub import InferenceClient | |
| client = InferenceClient( | |
| api_key=os.environ["HF"], | |
| ) | |
| stream = client.chat.completions.create( | |
| model="deepreinforce-ai/Ornith-1.0-9B:featherless-ai", | |
| messages=[ | |
| { | |
| "role": "user", | |
| "content": "What is the capital of France?" | |
| } | |
| ], | |
| stream=True, | |
| ) | |
| for chunk in stream: | |
| print(chunk.choices[0].delta.content, end="") |