This commit is contained in:
David Alberto Adler
2025-09-07 21:44:36 +01:00
parent f7f8677367
commit ed17d25183
17 changed files with 66 additions and 260 deletions
+4 -8
View File
@@ -16,10 +16,8 @@ with OpenRouter(
},
], stream=False, temperature=1, top_p=1)
with res as event_stream:
for event in event_stream:
# handle event
print(event, flush=True)
# Handle response
print(res)
```
</br>
@@ -44,10 +42,8 @@ async def main():
},
], stream=False, temperature=1, top_p=1)
async with res as event_stream:
async for event in event_stream:
# handle event
print(event, flush=True)
# Handle response
print(res)
asyncio.run(main())
```