mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
This commit is contained in:
@@ -1,90 +0,0 @@
|
||||
overlay: 1.0.0
|
||||
x-speakeasy-jsonpath: rfc9535
|
||||
info:
|
||||
title: Overlay chat-completions-openapi.yaml => openapi.yaml
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $["components"]["schemas"]["ChatCompletion"]["properties"]["system_fingerprint"]
|
||||
update:
|
||||
type: string
|
||||
nullable: true
|
||||
description: System fingerprint
|
||||
- target: $["components"]["schemas"]["ChatCompletionChunk"]["properties"]["system_fingerprint"]
|
||||
update:
|
||||
type: string
|
||||
nullable: true
|
||||
- target: $["components"]["schemas"]
|
||||
update:
|
||||
ChatStreamCompletionCreateParams:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/ChatCompletionCreateParams"
|
||||
- type: object
|
||||
properties:
|
||||
stream:
|
||||
type: boolean
|
||||
enum:
|
||||
- true
|
||||
default: true
|
||||
description: Enable streaming response
|
||||
- target: $["paths"]["/chat/completions"]["post"]["responses"]["200"]["content"]["application/json"]["schema"]
|
||||
update:
|
||||
$ref: '#/components/schemas/ChatCompletion'
|
||||
- target: $["paths"]["/chat/completions"]["post"]["responses"]["200"]["content"]["application/json"]["schema"]
|
||||
update:
|
||||
description: Non-streaming response when stream=false
|
||||
- target: $["paths"]["/chat/completions"]["post"]["responses"]["200"]["content"]["application/json"]["schema"]["oneOf"]
|
||||
remove: true
|
||||
- target: $["paths"]["/chat/completions"]["post"]["responses"]["200"]["content"]["text/event-stream"]
|
||||
remove: true
|
||||
- target: $["paths"]
|
||||
update:
|
||||
/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'
|
||||
'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'
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ speakeasyVersion: latest
|
||||
sources:
|
||||
OpenRouter Chat Completions API:
|
||||
inputs:
|
||||
- location: .speakeasy/OAS_files/chat-completions-openapi.yaml
|
||||
- location: .speakeasy/input.openapi.yaml
|
||||
output: .speakeasy/out.openapi.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/sheldon-vaughn-test/sandbox/open-router-chat-completions-api
|
||||
|
||||
Reference in New Issue
Block a user