mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-01 12:40:23 +08:00
This commit is contained in:
@@ -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 */
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user