Datasets:
Create r2
Browse files
r2
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from huggingface_hub import InferenceClient
|
2 |
+
|
3 |
+
client = InferenceClient(
|
4 |
+
provider="fireworks-ai",
|
5 |
+
api_key="fw_3ZdA78uZG5J5SDvQCVT9qmZA",
|
6 |
+
)
|
7 |
+
|
8 |
+
stream = client.chat.completions.create(
|
9 |
+
model="deepseek-ai/DeepSeek-R1",
|
10 |
+
messages=[
|
11 |
+
{
|
12 |
+
"role": "user",
|
13 |
+
"content": "What is the capital of France?"
|
14 |
+
}
|
15 |
+
],
|
16 |
+
stream=True,
|
17 |
+
)
|
18 |
+
|
19 |
+
for chunk in stream:
|
20 |
+
print(chunk.choices[0].delta.content, end="")
|