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
@@ -1,8 +0,0 @@
# ChatCompletionChunkWrapper
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `data` | [models.ChatCompletionChunk](../models/chatcompletionchunk.md) | :heavy_check_mark: | Streaming chat completion chunk |
@@ -1,17 +0,0 @@
# CreateChatCompletionResponse
## Supported Types
### `models.ChatCompletion`
```python
value: models.ChatCompletion = /* values here */
```
### `Union[eventstreaming.EventStream[models.ChatCompletionChunkWrapper], eventstreaming.EventStreamAsync[models.ChatCompletionChunkWrapper]]`
```python
value: Union[eventstreaming.EventStream[models.ChatCompletionChunkWrapper], eventstreaming.EventStreamAsync[models.ChatCompletionChunkWrapper]] = /* values here */
```
+3 -5
View File
@@ -33,10 +33,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)
```
@@ -73,7 +71,7 @@ with OpenRouter(
### Response
**[models.CreateChatCompletionResponse](../../models/createchatcompletionresponse.md)**
**[models.ChatCompletion](../../models/chatcompletion.md)**
### Errors