mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-09-12 12:40:42 +08:00
feat: move to overload typing for stream:true intent for sse
This commit is contained in:
@@ -1499,22 +1499,13 @@ components:
|
||||
required:
|
||||
- messages
|
||||
description: Chat completion request parameters
|
||||
ChatStreamCompletionCreateParams:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionCreateParams'
|
||||
- type: object
|
||||
properties:
|
||||
stream:
|
||||
type: boolean
|
||||
enum:
|
||||
- true
|
||||
default: true
|
||||
description: Enable streaming response
|
||||
parameters: {}
|
||||
paths:
|
||||
/chat/completions:
|
||||
post:
|
||||
operationId: createChatCompletion
|
||||
x-speakeasy-group: chat
|
||||
x-speakeasy-name-override: complete
|
||||
summary: Create a chat completion
|
||||
description: Creates a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||
tags:
|
||||
@@ -1534,57 +1525,10 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletion'
|
||||
description: Non-streaming response when stream=false
|
||||
'400':
|
||||
description: Bad request - invalid parameters
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
'401':
|
||||
description: Unauthorized - invalid API key
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
'429':
|
||||
description: Too many requests - rate limit exceeded
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
x-speakeasy-name-override: complete
|
||||
/chat/completions#stream:
|
||||
post:
|
||||
operationId: streamChatCompletion
|
||||
summary: Create a chat completion
|
||||
description: Creates a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||
tags:
|
||||
- Chat
|
||||
requestBody:
|
||||
description: Chat completion request parameters
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatStreamCompletionCreateParams'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful chat completion response
|
||||
content:
|
||||
text/event-stream:
|
||||
x-speakeasy-sse-sentinel: '[DONE]'
|
||||
schema:
|
||||
type: object
|
||||
required: [data]
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/ChatCompletionChunk'
|
||||
$ref: '#/components/schemas/ChatCompletionChunkWrapper'
|
||||
'400':
|
||||
description: Bad request - invalid parameters
|
||||
content:
|
||||
@@ -1609,4 +1553,3 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
x-speakeasy-name-override: completeStream
|
||||
|
||||
Reference in New Issue
Block a user