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:
+99
-51
@@ -1,12 +1,12 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: 232c6d4f-b0fd-4172-8f1b-e2421566e9b4
|
id: 232c6d4f-b0fd-4172-8f1b-e2421566e9b4
|
||||||
management:
|
management:
|
||||||
docChecksum: 3b6b1c16df754c251634311623cd5995
|
docChecksum: f7eafe8edffbaf9ef5bb835b345c5a9e
|
||||||
docVersion: 1.0.0
|
docVersion: 1.0.0
|
||||||
speakeasyVersion: 1.611.1
|
speakeasyVersion: 1.611.1
|
||||||
generationVersion: 2.694.1
|
generationVersion: 2.694.1
|
||||||
releaseVersion: 0.3.3
|
releaseVersion: 0.4.1
|
||||||
configChecksum: 6887da24cc6e150f7e0b5ab6d9e6f2f5
|
configChecksum: 613707bdc6463db5dce971bc9cb430bb
|
||||||
repoURL: https://github.com/speakeasy-sdks/openrouter-python-sdk.git
|
repoURL: https://github.com/speakeasy-sdks/openrouter-python-sdk.git
|
||||||
installationURL: https://github.com/speakeasy-sdks/openrouter-python-sdk.git
|
installationURL: https://github.com/speakeasy-sdks/openrouter-python-sdk.git
|
||||||
features:
|
features:
|
||||||
@@ -25,7 +25,6 @@ features:
|
|||||||
globalSecurityCallbacks: 1.0.0
|
globalSecurityCallbacks: 1.0.0
|
||||||
globalSecurityFlattening: 1.0.0
|
globalSecurityFlattening: 1.0.0
|
||||||
globalServerURLs: 3.1.1
|
globalServerURLs: 3.1.1
|
||||||
groups: 3.0.0
|
|
||||||
methodArguments: 1.0.2
|
methodArguments: 1.0.2
|
||||||
nameOverrides: 3.0.1
|
nameOverrides: 3.0.1
|
||||||
nullables: 1.0.1
|
nullables: 1.0.1
|
||||||
@@ -44,7 +43,6 @@ generatedFiles:
|
|||||||
- USAGE.md
|
- USAGE.md
|
||||||
- docs/errors/chatcompletionerror.md
|
- docs/errors/chatcompletionerror.md
|
||||||
- docs/models/annotationdetail.md
|
- docs/models/annotationdetail.md
|
||||||
- docs/models/audio.md
|
|
||||||
- docs/models/chatcompletion.md
|
- docs/models/chatcompletion.md
|
||||||
- docs/models/chatcompletionassistantmessageparam.md
|
- docs/models/chatcompletionassistantmessageparam.md
|
||||||
- docs/models/chatcompletionassistantmessageparamcontent.md
|
- docs/models/chatcompletionassistantmessageparamcontent.md
|
||||||
@@ -71,6 +69,50 @@ generatedFiles:
|
|||||||
- docs/models/chatcompletioncontentparttext.md
|
- docs/models/chatcompletioncontentparttext.md
|
||||||
- docs/models/chatcompletioncontentparttexttype.md
|
- docs/models/chatcompletioncontentparttexttype.md
|
||||||
- docs/models/chatcompletioncreateparams.md
|
- docs/models/chatcompletioncreateparams.md
|
||||||
|
- docs/models/chatcompletioncreateparamsaudio.md
|
||||||
|
- docs/models/chatcompletioncreateparamscompletion.md
|
||||||
|
- docs/models/chatcompletioncreateparamsdatacollection.md
|
||||||
|
- docs/models/chatcompletioncreateparamseffort.md
|
||||||
|
- docs/models/chatcompletioncreateparamsengine.md
|
||||||
|
- docs/models/chatcompletioncreateparamsidchainofthought.md
|
||||||
|
- docs/models/chatcompletioncreateparamsidfileparser.md
|
||||||
|
- docs/models/chatcompletioncreateparamsidmoderation.md
|
||||||
|
- docs/models/chatcompletioncreateparamsidweb.md
|
||||||
|
- docs/models/chatcompletioncreateparamsignoreenum.md
|
||||||
|
- docs/models/chatcompletioncreateparamsignoreunion.md
|
||||||
|
- docs/models/chatcompletioncreateparamsimage.md
|
||||||
|
- docs/models/chatcompletioncreateparamsjsonschema.md
|
||||||
|
- docs/models/chatcompletioncreateparamsmaxprice.md
|
||||||
|
- docs/models/chatcompletioncreateparamsonlyenum.md
|
||||||
|
- docs/models/chatcompletioncreateparamsonlyunion.md
|
||||||
|
- docs/models/chatcompletioncreateparamsorderenum.md
|
||||||
|
- docs/models/chatcompletioncreateparamsorderunion.md
|
||||||
|
- docs/models/chatcompletioncreateparamspdf.md
|
||||||
|
- docs/models/chatcompletioncreateparamspdfengine.md
|
||||||
|
- docs/models/chatcompletioncreateparamspluginchainofthought.md
|
||||||
|
- docs/models/chatcompletioncreateparamspluginfileparser.md
|
||||||
|
- docs/models/chatcompletioncreateparamspluginmoderation.md
|
||||||
|
- docs/models/chatcompletioncreateparamspluginunion.md
|
||||||
|
- docs/models/chatcompletioncreateparamspluginweb.md
|
||||||
|
- docs/models/chatcompletioncreateparamsprompt.md
|
||||||
|
- docs/models/chatcompletioncreateparamsprovider.md
|
||||||
|
- docs/models/chatcompletioncreateparamsquantization.md
|
||||||
|
- docs/models/chatcompletioncreateparamsreasoning.md
|
||||||
|
- docs/models/chatcompletioncreateparamsreasoningeffort.md
|
||||||
|
- docs/models/chatcompletioncreateparamsrequest.md
|
||||||
|
- docs/models/chatcompletioncreateparamsresponseformatgrammar.md
|
||||||
|
- docs/models/chatcompletioncreateparamsresponseformatjsonobject.md
|
||||||
|
- docs/models/chatcompletioncreateparamsresponseformatjsonschema.md
|
||||||
|
- docs/models/chatcompletioncreateparamsresponseformatpython.md
|
||||||
|
- docs/models/chatcompletioncreateparamsresponseformattext.md
|
||||||
|
- docs/models/chatcompletioncreateparamsresponseformatunion.md
|
||||||
|
- docs/models/chatcompletioncreateparamssort.md
|
||||||
|
- docs/models/chatcompletioncreateparamsstop.md
|
||||||
|
- docs/models/chatcompletioncreateparamsstreamoptions.md
|
||||||
|
- docs/models/chatcompletioncreateparamstypegrammar.md
|
||||||
|
- docs/models/chatcompletioncreateparamstypejsonobject.md
|
||||||
|
- docs/models/chatcompletioncreateparamstypejsonschema.md
|
||||||
|
- docs/models/chatcompletioncreateparamstypepython.md
|
||||||
- docs/models/chatcompletioncreateparamstypetext.md
|
- docs/models/chatcompletioncreateparamstypetext.md
|
||||||
- docs/models/chatcompletionmessage.md
|
- docs/models/chatcompletionmessage.md
|
||||||
- docs/models/chatcompletionmessageparam.md
|
- docs/models/chatcompletionmessageparam.md
|
||||||
@@ -100,7 +142,52 @@ generatedFiles:
|
|||||||
- docs/models/chatcompletionusermessageparam.md
|
- docs/models/chatcompletionusermessageparam.md
|
||||||
- docs/models/chatcompletionusermessageparamcontent.md
|
- docs/models/chatcompletionusermessageparamcontent.md
|
||||||
- docs/models/chatcompletionusermessageparamrole.md
|
- docs/models/chatcompletionusermessageparamrole.md
|
||||||
- docs/models/completion.md
|
- docs/models/chatstreamcompletioncreateparams.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsaudio.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamscompletion.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsdatacollection.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamseffort.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsengine.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsidchainofthought.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsidfileparser.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsidmoderation.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsidweb.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsignoreenum.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsignoreunion.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsimage.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsjsonschema.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsmaxprice.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsonlyenum.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsonlyunion.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsorderenum.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsorderunion.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamspdf.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamspdfengine.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamspluginchainofthought.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamspluginfileparser.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamspluginmoderation.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamspluginunion.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamspluginweb.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsprompt.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsprovider.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsquantization.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsreasoning.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsreasoningeffort.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsrequest.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsresponseformatgrammar.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsresponseformatjsonobject.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsresponseformatjsonschema.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsresponseformatpython.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsresponseformattext.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsresponseformatunion.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamssort.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsstop.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamsstreamoptions.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamstypegrammar.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamstypejsonobject.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamstypejsonschema.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamstypepython.md
|
||||||
|
- docs/models/chatstreamcompletioncreateparamstypetext.md
|
||||||
- docs/models/completiontokensdetails.md
|
- docs/models/completiontokensdetails.md
|
||||||
- docs/models/completionusage.md
|
- docs/models/completionusage.md
|
||||||
- docs/models/contentimageurl.md
|
- docs/models/contentimageurl.md
|
||||||
@@ -108,42 +195,15 @@ generatedFiles:
|
|||||||
- docs/models/contenttypeimageurl.md
|
- docs/models/contenttypeimageurl.md
|
||||||
- docs/models/contenttypetext.md
|
- docs/models/contenttypetext.md
|
||||||
- docs/models/createchatcompletionresponse.md
|
- docs/models/createchatcompletionresponse.md
|
||||||
- docs/models/datacollection.md
|
|
||||||
- docs/models/detail.md
|
- docs/models/detail.md
|
||||||
- docs/models/effort.md
|
|
||||||
- docs/models/engine.md
|
|
||||||
- docs/models/error.md
|
- docs/models/error.md
|
||||||
- docs/models/file.md
|
- docs/models/file.md
|
||||||
- docs/models/fileannotationdetail.md
|
- docs/models/fileannotationdetail.md
|
||||||
- docs/models/fileannotationdetailcontentunion.md
|
- docs/models/fileannotationdetailcontentunion.md
|
||||||
- docs/models/fileannotationdetailimageurl.md
|
- docs/models/fileannotationdetailimageurl.md
|
||||||
- docs/models/idchainofthought.md
|
|
||||||
- docs/models/idfileparser.md
|
|
||||||
- docs/models/idmoderation.md
|
|
||||||
- docs/models/idweb.md
|
|
||||||
- docs/models/ignore.md
|
|
||||||
- docs/models/ignoreenum.md
|
|
||||||
- docs/models/image.md
|
|
||||||
- docs/models/inputaudio.md
|
- docs/models/inputaudio.md
|
||||||
- docs/models/jsonschema.md
|
|
||||||
- docs/models/maxprice.md
|
|
||||||
- docs/models/only.md
|
|
||||||
- docs/models/onlyenum.md
|
|
||||||
- docs/models/order.md
|
|
||||||
- docs/models/orderenum.md
|
|
||||||
- docs/models/parameters.md
|
- docs/models/parameters.md
|
||||||
- docs/models/pdf.md
|
|
||||||
- docs/models/pdfengine.md
|
|
||||||
- docs/models/plugin.md
|
|
||||||
- docs/models/pluginchainofthought.md
|
|
||||||
- docs/models/pluginfileparser.md
|
|
||||||
- docs/models/pluginmoderation.md
|
|
||||||
- docs/models/pluginweb.md
|
|
||||||
- docs/models/prompt.md
|
|
||||||
- docs/models/prompttokensdetails.md
|
- docs/models/prompttokensdetails.md
|
||||||
- docs/models/provider.md
|
|
||||||
- docs/models/quantization.md
|
|
||||||
- docs/models/reasoning.md
|
|
||||||
- docs/models/reasoningdetail.md
|
- docs/models/reasoningdetail.md
|
||||||
- docs/models/reasoningdetailencrypted.md
|
- docs/models/reasoningdetailencrypted.md
|
||||||
- docs/models/reasoningdetailencryptedformat.md
|
- docs/models/reasoningdetailencryptedformat.md
|
||||||
@@ -154,25 +214,11 @@ generatedFiles:
|
|||||||
- docs/models/reasoningdetailtext.md
|
- docs/models/reasoningdetailtext.md
|
||||||
- docs/models/reasoningdetailtextformat.md
|
- docs/models/reasoningdetailtextformat.md
|
||||||
- docs/models/reasoningdetailtexttype.md
|
- docs/models/reasoningdetailtexttype.md
|
||||||
- docs/models/reasoningeffort.md
|
|
||||||
- docs/models/request.md
|
|
||||||
- docs/models/responseformat.md
|
|
||||||
- docs/models/responseformatgrammar.md
|
|
||||||
- docs/models/responseformatjsonobject.md
|
|
||||||
- docs/models/responseformatjsonschema.md
|
|
||||||
- docs/models/responseformatjsonschemaschema.md
|
- docs/models/responseformatjsonschemaschema.md
|
||||||
- docs/models/responseformatpython.md
|
|
||||||
- docs/models/responseformattext.md
|
|
||||||
- docs/models/security.md
|
- docs/models/security.md
|
||||||
- docs/models/sort.md
|
- docs/models/streamchatcompletionresponsebody.md
|
||||||
- docs/models/stop.md
|
|
||||||
- docs/models/streamoptions.md
|
|
||||||
- docs/models/toplogprob.md
|
- docs/models/toplogprob.md
|
||||||
- docs/models/typefile.md
|
- docs/models/typefile.md
|
||||||
- docs/models/typegrammar.md
|
|
||||||
- docs/models/typejsonobject.md
|
|
||||||
- docs/models/typejsonschema.md
|
|
||||||
- docs/models/typepython.md
|
|
||||||
- docs/models/urlcitation.md
|
- docs/models/urlcitation.md
|
||||||
- docs/models/urlcitationannotationdetail.md
|
- docs/models/urlcitationannotationdetail.md
|
||||||
- docs/models/urlcitationannotationdetailtype.md
|
- docs/models/urlcitationannotationdetailtype.md
|
||||||
@@ -225,6 +271,7 @@ generatedFiles:
|
|||||||
- src/openrouter/models/chatcompletiontoolchoiceoption.py
|
- src/openrouter/models/chatcompletiontoolchoiceoption.py
|
||||||
- src/openrouter/models/chatcompletiontoolmessageparam.py
|
- src/openrouter/models/chatcompletiontoolmessageparam.py
|
||||||
- src/openrouter/models/chatcompletionusermessageparam.py
|
- src/openrouter/models/chatcompletionusermessageparam.py
|
||||||
|
- src/openrouter/models/chatstreamcompletioncreateparams.py
|
||||||
- src/openrouter/models/completionusage.py
|
- src/openrouter/models/completionusage.py
|
||||||
- src/openrouter/models/createchatcompletionop.py
|
- src/openrouter/models/createchatcompletionop.py
|
||||||
- src/openrouter/models/fileannotationdetail.py
|
- src/openrouter/models/fileannotationdetail.py
|
||||||
@@ -234,6 +281,7 @@ generatedFiles:
|
|||||||
- src/openrouter/models/reasoningdetailtext.py
|
- src/openrouter/models/reasoningdetailtext.py
|
||||||
- src/openrouter/models/responseformatjsonschemaschema.py
|
- src/openrouter/models/responseformatjsonschemaschema.py
|
||||||
- src/openrouter/models/security.py
|
- src/openrouter/models/security.py
|
||||||
|
- src/openrouter/models/streamchatcompletionop.py
|
||||||
- src/openrouter/models/urlcitationannotationdetail.py
|
- src/openrouter/models/urlcitationannotationdetail.py
|
||||||
- src/openrouter/py.typed
|
- src/openrouter/py.typed
|
||||||
- src/openrouter/sdk.py
|
- src/openrouter/sdk.py
|
||||||
@@ -272,10 +320,10 @@ examples:
|
|||||||
streamChatCompletion:
|
streamChatCompletion:
|
||||||
speakeasy-default-stream-chat-completion:
|
speakeasy-default-stream-chat-completion:
|
||||||
requestBody:
|
requestBody:
|
||||||
application/json: {"messages": [{"role": "user", "content": "Hello, how are you?"}], "stream": true, "temperature": 1, "top_p": 1}
|
application/json: {"stream": false, "messages": [{"role": "user", "content": "Hello, how are you?"}], "temperature": 1, "top_p": 1}
|
||||||
responses:
|
responses:
|
||||||
"400":
|
"400":
|
||||||
application/json: {"error": {"code": "<value>", "message": "<value>", "param": "<value>", "type": "<value>"}}
|
application/json: {"error": {"code": null, "message": "<value>"}}
|
||||||
"500":
|
"500":
|
||||||
application/json: {"error": {"code": "<value>", "message": "<value>", "param": "<value>", "type": "<value>"}}
|
application/json: {"error": {"code": null, "message": "<value>"}}
|
||||||
examplesVersion: 1.0.2
|
examplesVersion: 1.0.2
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ generation:
|
|||||||
generateNewTests: true
|
generateNewTests: true
|
||||||
skipResponseBodyAssertions: false
|
skipResponseBodyAssertions: false
|
||||||
python:
|
python:
|
||||||
version: 0.3.3
|
version: 0.4.1
|
||||||
additionalDependencies:
|
additionalDependencies:
|
||||||
dev: {}
|
dev: {}
|
||||||
main: {}
|
main: {}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ components:
|
|||||||
required: [data]
|
required: [data]
|
||||||
properties:
|
properties:
|
||||||
data:
|
data:
|
||||||
$ref: '#/components/schemas/ChatCompletionChunk'
|
$ref: "#/components/schemas/ChatCompletionChunk"
|
||||||
ChatCompletionMessageToolCall:
|
ChatCompletionMessageToolCall:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -147,15 +147,15 @@ components:
|
|||||||
description: Text reasoning detail
|
description: Text reasoning detail
|
||||||
ReasoningDetail:
|
ReasoningDetail:
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/ReasoningDetailSummary'
|
- $ref: "#/components/schemas/ReasoningDetailSummary"
|
||||||
- $ref: '#/components/schemas/ReasoningDetailEncrypted'
|
- $ref: "#/components/schemas/ReasoningDetailEncrypted"
|
||||||
- $ref: '#/components/schemas/ReasoningDetailText'
|
- $ref: "#/components/schemas/ReasoningDetailText"
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: type
|
propertyName: type
|
||||||
mapping:
|
mapping:
|
||||||
reasoning.summary: '#/components/schemas/ReasoningDetailSummary'
|
reasoning.summary: "#/components/schemas/ReasoningDetailSummary"
|
||||||
reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted'
|
reasoning.encrypted: "#/components/schemas/ReasoningDetailEncrypted"
|
||||||
reasoning.text: '#/components/schemas/ReasoningDetailText'
|
reasoning.text: "#/components/schemas/ReasoningDetailText"
|
||||||
description: Reasoning detail information
|
description: Reasoning detail information
|
||||||
FileAnnotationDetail:
|
FileAnnotationDetail:
|
||||||
type: object
|
type: object
|
||||||
@@ -240,13 +240,13 @@ components:
|
|||||||
description: URL citation annotation
|
description: URL citation annotation
|
||||||
AnnotationDetail:
|
AnnotationDetail:
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/FileAnnotationDetail'
|
- $ref: "#/components/schemas/FileAnnotationDetail"
|
||||||
- $ref: '#/components/schemas/URLCitationAnnotationDetail'
|
- $ref: "#/components/schemas/URLCitationAnnotationDetail"
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: type
|
propertyName: type
|
||||||
mapping:
|
mapping:
|
||||||
file: '#/components/schemas/FileAnnotationDetail'
|
file: "#/components/schemas/FileAnnotationDetail"
|
||||||
url_citation: '#/components/schemas/URLCitationAnnotationDetail'
|
url_citation: "#/components/schemas/URLCitationAnnotationDetail"
|
||||||
description: Annotation information
|
description: Annotation information
|
||||||
ChatCompletionMessage:
|
ChatCompletionMessage:
|
||||||
type: object
|
type: object
|
||||||
@@ -270,17 +270,17 @@ components:
|
|||||||
tool_calls:
|
tool_calls:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionMessageToolCall'
|
$ref: "#/components/schemas/ChatCompletionMessageToolCall"
|
||||||
description: Tool calls made by the assistant
|
description: Tool calls made by the assistant
|
||||||
reasoning_details:
|
reasoning_details:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ReasoningDetail'
|
$ref: "#/components/schemas/ReasoningDetail"
|
||||||
description: Reasoning details delta to send reasoning details back to upstream
|
description: Reasoning details delta to send reasoning details back to upstream
|
||||||
annotations:
|
annotations:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/AnnotationDetail'
|
$ref: "#/components/schemas/AnnotationDetail"
|
||||||
description: Annotations delta to send annotations back to upstream
|
description: Annotations delta to send annotations back to upstream
|
||||||
required:
|
required:
|
||||||
- role
|
- role
|
||||||
@@ -335,13 +335,13 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
|
$ref: "#/components/schemas/ChatCompletionTokenLogprob"
|
||||||
description: Log probabilities for content tokens
|
description: Log probabilities for content tokens
|
||||||
refusal:
|
refusal:
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
|
$ref: "#/components/schemas/ChatCompletionTokenLogprob"
|
||||||
description: Log probabilities for refusal tokens
|
description: Log probabilities for refusal tokens
|
||||||
required:
|
required:
|
||||||
- content
|
- content
|
||||||
@@ -364,9 +364,9 @@ components:
|
|||||||
type: number
|
type: number
|
||||||
description: Choice index
|
description: Choice index
|
||||||
message:
|
message:
|
||||||
$ref: '#/components/schemas/ChatCompletionMessage'
|
$ref: "#/components/schemas/ChatCompletionMessage"
|
||||||
logprobs:
|
logprobs:
|
||||||
$ref: '#/components/schemas/ChatCompletionTokenLogprobs'
|
$ref: "#/components/schemas/ChatCompletionTokenLogprobs"
|
||||||
required:
|
required:
|
||||||
- finish_reason
|
- finish_reason
|
||||||
- index
|
- index
|
||||||
@@ -424,7 +424,7 @@ components:
|
|||||||
choices:
|
choices:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionChoice'
|
$ref: "#/components/schemas/ChatCompletionChoice"
|
||||||
description: List of completion choices
|
description: List of completion choices
|
||||||
created:
|
created:
|
||||||
type: number
|
type: number
|
||||||
@@ -441,7 +441,7 @@ components:
|
|||||||
description: System fingerprint
|
description: System fingerprint
|
||||||
nullable: true
|
nullable: true
|
||||||
usage:
|
usage:
|
||||||
$ref: '#/components/schemas/CompletionUsage'
|
$ref: "#/components/schemas/CompletionUsage"
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- choices
|
- choices
|
||||||
@@ -522,24 +522,24 @@ components:
|
|||||||
tool_calls:
|
tool_calls:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionChunkChoiceDeltaToolCall'
|
$ref: "#/components/schemas/ChatCompletionChunkChoiceDeltaToolCall"
|
||||||
description: Tool calls delta
|
description: Tool calls delta
|
||||||
reasoning_details:
|
reasoning_details:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ReasoningDetail'
|
$ref: "#/components/schemas/ReasoningDetail"
|
||||||
description: Reasoning details delta to send reasoning details back to upstream
|
description: Reasoning details delta to send reasoning details back to upstream
|
||||||
annotations:
|
annotations:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/AnnotationDetail'
|
$ref: "#/components/schemas/AnnotationDetail"
|
||||||
description: Annotations delta to send annotations back to upstream
|
description: Annotations delta to send annotations back to upstream
|
||||||
description: Delta changes in streaming response
|
description: Delta changes in streaming response
|
||||||
ChatCompletionChunkChoice:
|
ChatCompletionChunkChoice:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
delta:
|
delta:
|
||||||
$ref: '#/components/schemas/ChatCompletionChunkChoiceDelta'
|
$ref: "#/components/schemas/ChatCompletionChunkChoiceDelta"
|
||||||
finish_reason:
|
finish_reason:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
@@ -552,7 +552,7 @@ components:
|
|||||||
index:
|
index:
|
||||||
type: number
|
type: number
|
||||||
logprobs:
|
logprobs:
|
||||||
$ref: '#/components/schemas/ChatCompletionTokenLogprobs'
|
$ref: "#/components/schemas/ChatCompletionTokenLogprobs"
|
||||||
required:
|
required:
|
||||||
- delta
|
- delta
|
||||||
- finish_reason
|
- finish_reason
|
||||||
@@ -566,7 +566,7 @@ components:
|
|||||||
choices:
|
choices:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionChunkChoice'
|
$ref: "#/components/schemas/ChatCompletionChunkChoice"
|
||||||
created:
|
created:
|
||||||
type: number
|
type: number
|
||||||
model:
|
model:
|
||||||
@@ -579,7 +579,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
usage:
|
usage:
|
||||||
$ref: '#/components/schemas/CompletionUsage'
|
$ref: "#/components/schemas/CompletionUsage"
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- choices
|
- choices
|
||||||
@@ -621,7 +621,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
description: 'URL of the image (data: URLs supported)'
|
description: "URL of the image (data: URLs supported)"
|
||||||
detail:
|
detail:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
@@ -668,15 +668,15 @@ components:
|
|||||||
description: Audio input content part
|
description: Audio input content part
|
||||||
ChatCompletionContentPart:
|
ChatCompletionContentPart:
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/ChatCompletionContentPartText'
|
- $ref: "#/components/schemas/ChatCompletionContentPartText"
|
||||||
- $ref: '#/components/schemas/ChatCompletionContentPartImage'
|
- $ref: "#/components/schemas/ChatCompletionContentPartImage"
|
||||||
- $ref: '#/components/schemas/ChatCompletionContentPartAudio'
|
- $ref: "#/components/schemas/ChatCompletionContentPartAudio"
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: type
|
propertyName: type
|
||||||
mapping:
|
mapping:
|
||||||
text: '#/components/schemas/ChatCompletionContentPartText'
|
text: "#/components/schemas/ChatCompletionContentPartText"
|
||||||
image_url: '#/components/schemas/ChatCompletionContentPartImage'
|
image_url: "#/components/schemas/ChatCompletionContentPartImage"
|
||||||
input_audio: '#/components/schemas/ChatCompletionContentPartAudio'
|
input_audio: "#/components/schemas/ChatCompletionContentPartAudio"
|
||||||
description: Content part for chat completion messages
|
description: Content part for chat completion messages
|
||||||
ChatCompletionSystemMessageParam:
|
ChatCompletionSystemMessageParam:
|
||||||
type: object
|
type: object
|
||||||
@@ -690,7 +690,7 @@ components:
|
|||||||
- type: string
|
- type: string
|
||||||
- type: array
|
- type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionContentPartText'
|
$ref: "#/components/schemas/ChatCompletionContentPartText"
|
||||||
description: System message content
|
description: System message content
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
@@ -711,7 +711,7 @@ components:
|
|||||||
- type: string
|
- type: string
|
||||||
- type: array
|
- type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||||
description: User message content
|
description: User message content
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
@@ -732,7 +732,7 @@ components:
|
|||||||
- type: string
|
- type: string
|
||||||
- type: array
|
- type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||||
- nullable: true
|
- nullable: true
|
||||||
description: Assistant message content
|
description: Assistant message content
|
||||||
name:
|
name:
|
||||||
@@ -741,7 +741,7 @@ components:
|
|||||||
tool_calls:
|
tool_calls:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionMessageToolCall'
|
$ref: "#/components/schemas/ChatCompletionMessageToolCall"
|
||||||
description: Tool calls made by the assistant
|
description: Tool calls made by the assistant
|
||||||
refusal:
|
refusal:
|
||||||
type: string
|
type: string
|
||||||
@@ -762,7 +762,7 @@ components:
|
|||||||
- type: string
|
- type: string
|
||||||
- type: array
|
- type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||||
description: Tool response content
|
description: Tool response content
|
||||||
tool_call_id:
|
tool_call_id:
|
||||||
type: string
|
type: string
|
||||||
@@ -774,17 +774,17 @@ components:
|
|||||||
description: Tool response message
|
description: Tool response message
|
||||||
ChatCompletionMessageParam:
|
ChatCompletionMessageParam:
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/ChatCompletionSystemMessageParam'
|
- $ref: "#/components/schemas/ChatCompletionSystemMessageParam"
|
||||||
- $ref: '#/components/schemas/ChatCompletionUserMessageParam'
|
- $ref: "#/components/schemas/ChatCompletionUserMessageParam"
|
||||||
- $ref: '#/components/schemas/ChatCompletionAssistantMessageParam'
|
- $ref: "#/components/schemas/ChatCompletionAssistantMessageParam"
|
||||||
- $ref: '#/components/schemas/ChatCompletionToolMessageParam'
|
- $ref: "#/components/schemas/ChatCompletionToolMessageParam"
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: role
|
propertyName: role
|
||||||
mapping:
|
mapping:
|
||||||
system: '#/components/schemas/ChatCompletionSystemMessageParam'
|
system: "#/components/schemas/ChatCompletionSystemMessageParam"
|
||||||
user: '#/components/schemas/ChatCompletionUserMessageParam'
|
user: "#/components/schemas/ChatCompletionUserMessageParam"
|
||||||
assistant: '#/components/schemas/ChatCompletionAssistantMessageParam'
|
assistant: "#/components/schemas/ChatCompletionAssistantMessageParam"
|
||||||
tool: '#/components/schemas/ChatCompletionToolMessageParam'
|
tool: "#/components/schemas/ChatCompletionToolMessageParam"
|
||||||
description: Chat completion message with role-based discrimination
|
description: Chat completion message with role-based discrimination
|
||||||
ChatCompletionTool:
|
ChatCompletionTool:
|
||||||
type: object
|
type: object
|
||||||
@@ -848,7 +848,7 @@ components:
|
|||||||
- type: string
|
- type: string
|
||||||
enum:
|
enum:
|
||||||
- required
|
- required
|
||||||
- $ref: '#/components/schemas/ChatCompletionNamedToolChoice'
|
- $ref: "#/components/schemas/ChatCompletionNamedToolChoice"
|
||||||
description: Tool choice configuration
|
description: Tool choice configuration
|
||||||
ChatCompletionStreamOptions:
|
ChatCompletionStreamOptions:
|
||||||
type: object
|
type: object
|
||||||
@@ -867,7 +867,7 @@ components:
|
|||||||
messages:
|
messages:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionMessageParam'
|
$ref: "#/components/schemas/ChatCompletionMessageParam"
|
||||||
minItems: 1
|
minItems: 1
|
||||||
description: List of messages for the conversation
|
description: List of messages for the conversation
|
||||||
example:
|
example:
|
||||||
@@ -980,7 +980,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Schema description for the model
|
description: Schema description for the model
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ResponseFormatJsonSchemaSchema'
|
$ref: "#/components/schemas/ResponseFormatJsonSchemaSchema"
|
||||||
strict:
|
strict:
|
||||||
type: boolean
|
type: boolean
|
||||||
nullable: true
|
nullable: true
|
||||||
@@ -1034,7 +1034,7 @@ components:
|
|||||||
description: Enable streaming response
|
description: Enable streaming response
|
||||||
stream_options:
|
stream_options:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/ChatCompletionStreamOptions'
|
- $ref: "#/components/schemas/ChatCompletionStreamOptions"
|
||||||
- nullable: true
|
- nullable: true
|
||||||
temperature:
|
temperature:
|
||||||
type: number
|
type: number
|
||||||
@@ -1044,11 +1044,11 @@ components:
|
|||||||
default: 1
|
default: 1
|
||||||
description: Sampling temperature (0-2)
|
description: Sampling temperature (0-2)
|
||||||
tool_choice:
|
tool_choice:
|
||||||
$ref: '#/components/schemas/ChatCompletionToolChoiceOption'
|
$ref: "#/components/schemas/ChatCompletionToolChoiceOption"
|
||||||
tools:
|
tools:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionTool'
|
$ref: "#/components/schemas/ChatCompletionTool"
|
||||||
description: Available tools for function calling
|
description: Available tools for function calling
|
||||||
top_p:
|
top_p:
|
||||||
type: number
|
type: number
|
||||||
@@ -1061,7 +1061,8 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Unique user identifier
|
description: Unique user identifier
|
||||||
models:
|
models:
|
||||||
x-speakeasy-name-override: model_list
|
# Needed to avoid conflict with the `models` directory
|
||||||
|
x-speakeasy-name-override: fallback_models
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
@@ -1498,13 +1499,22 @@ components:
|
|||||||
required:
|
required:
|
||||||
- messages
|
- messages
|
||||||
description: Chat completion request parameters
|
description: Chat completion request parameters
|
||||||
|
ChatStreamCompletionCreateParams:
|
||||||
|
allOf:
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
stream:
|
||||||
|
type: boolean
|
||||||
|
enum:
|
||||||
|
- true
|
||||||
|
default: true
|
||||||
|
description: Enable streaming response
|
||||||
|
- $ref: "#/components/schemas/ChatCompletionCreateParams"
|
||||||
parameters: {}
|
parameters: {}
|
||||||
paths:
|
paths:
|
||||||
/chat/completions:
|
/chat/completions:
|
||||||
post:
|
post:
|
||||||
operationId: createChatCompletion
|
operationId: createChatCompletion
|
||||||
x-speakeasy-group: chat
|
|
||||||
x-speakeasy-name-override: complete
|
|
||||||
summary: Create a chat completion
|
summary: Create a chat completion
|
||||||
description: Creates a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
description: Creates a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
tags:
|
tags:
|
||||||
@@ -1515,40 +1525,92 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionCreateParams'
|
$ref: "#/components/schemas/ChatCompletionCreateParams"
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: Successful chat completion response
|
description: Successful chat completion response
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletion'
|
$ref: "#/components/schemas/ChatCompletion"
|
||||||
description: Non-streaming response when stream=false
|
description: Non-streaming response when stream=false
|
||||||
text/event-stream:
|
text/event-stream:
|
||||||
x-speakeasy-sse-sentinel: '[DONE]'
|
x-speakeasy-sse-sentinel: "[DONE]"
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionChunkWrapper'
|
$ref: "#/components/schemas/ChatCompletionChunkWrapper"
|
||||||
'400':
|
"400":
|
||||||
description: Bad request - invalid parameters
|
description: Bad request - invalid parameters
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionError'
|
$ref: "#/components/schemas/ChatCompletionError"
|
||||||
'401':
|
"401":
|
||||||
description: Unauthorized - invalid API key
|
description: Unauthorized - invalid API key
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionError'
|
$ref: "#/components/schemas/ChatCompletionError"
|
||||||
'429':
|
"429":
|
||||||
description: Too many requests - rate limit exceeded
|
description: Too many requests - rate limit exceeded
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionError'
|
$ref: "#/components/schemas/ChatCompletionError"
|
||||||
'500':
|
"500":
|
||||||
description: Internal server error
|
description: Internal server error
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionError'
|
$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"
|
||||||
|
"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: completeStream
|
||||||
+131
-69
@@ -36,7 +36,7 @@ components:
|
|||||||
required: [data]
|
required: [data]
|
||||||
properties:
|
properties:
|
||||||
data:
|
data:
|
||||||
$ref: '#/components/schemas/ChatCompletionChunk'
|
$ref: "#/components/schemas/ChatCompletionChunk"
|
||||||
ChatCompletionMessageToolCall:
|
ChatCompletionMessageToolCall:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -147,15 +147,15 @@ components:
|
|||||||
description: Text reasoning detail
|
description: Text reasoning detail
|
||||||
ReasoningDetail:
|
ReasoningDetail:
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/ReasoningDetailSummary'
|
- $ref: "#/components/schemas/ReasoningDetailSummary"
|
||||||
- $ref: '#/components/schemas/ReasoningDetailEncrypted'
|
- $ref: "#/components/schemas/ReasoningDetailEncrypted"
|
||||||
- $ref: '#/components/schemas/ReasoningDetailText'
|
- $ref: "#/components/schemas/ReasoningDetailText"
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: type
|
propertyName: type
|
||||||
mapping:
|
mapping:
|
||||||
reasoning.summary: '#/components/schemas/ReasoningDetailSummary'
|
reasoning.summary: "#/components/schemas/ReasoningDetailSummary"
|
||||||
reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted'
|
reasoning.encrypted: "#/components/schemas/ReasoningDetailEncrypted"
|
||||||
reasoning.text: '#/components/schemas/ReasoningDetailText'
|
reasoning.text: "#/components/schemas/ReasoningDetailText"
|
||||||
description: Reasoning detail information
|
description: Reasoning detail information
|
||||||
FileAnnotationDetail:
|
FileAnnotationDetail:
|
||||||
type: object
|
type: object
|
||||||
@@ -240,13 +240,13 @@ components:
|
|||||||
description: URL citation annotation
|
description: URL citation annotation
|
||||||
AnnotationDetail:
|
AnnotationDetail:
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/FileAnnotationDetail'
|
- $ref: "#/components/schemas/FileAnnotationDetail"
|
||||||
- $ref: '#/components/schemas/URLCitationAnnotationDetail'
|
- $ref: "#/components/schemas/URLCitationAnnotationDetail"
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: type
|
propertyName: type
|
||||||
mapping:
|
mapping:
|
||||||
file: '#/components/schemas/FileAnnotationDetail'
|
file: "#/components/schemas/FileAnnotationDetail"
|
||||||
url_citation: '#/components/schemas/URLCitationAnnotationDetail'
|
url_citation: "#/components/schemas/URLCitationAnnotationDetail"
|
||||||
description: Annotation information
|
description: Annotation information
|
||||||
ChatCompletionMessage:
|
ChatCompletionMessage:
|
||||||
type: object
|
type: object
|
||||||
@@ -270,17 +270,17 @@ components:
|
|||||||
tool_calls:
|
tool_calls:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionMessageToolCall'
|
$ref: "#/components/schemas/ChatCompletionMessageToolCall"
|
||||||
description: Tool calls made by the assistant
|
description: Tool calls made by the assistant
|
||||||
reasoning_details:
|
reasoning_details:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ReasoningDetail'
|
$ref: "#/components/schemas/ReasoningDetail"
|
||||||
description: Reasoning details delta to send reasoning details back to upstream
|
description: Reasoning details delta to send reasoning details back to upstream
|
||||||
annotations:
|
annotations:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/AnnotationDetail'
|
$ref: "#/components/schemas/AnnotationDetail"
|
||||||
description: Annotations delta to send annotations back to upstream
|
description: Annotations delta to send annotations back to upstream
|
||||||
required:
|
required:
|
||||||
- role
|
- role
|
||||||
@@ -335,13 +335,13 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
|
$ref: "#/components/schemas/ChatCompletionTokenLogprob"
|
||||||
description: Log probabilities for content tokens
|
description: Log probabilities for content tokens
|
||||||
refusal:
|
refusal:
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
|
$ref: "#/components/schemas/ChatCompletionTokenLogprob"
|
||||||
description: Log probabilities for refusal tokens
|
description: Log probabilities for refusal tokens
|
||||||
required:
|
required:
|
||||||
- content
|
- content
|
||||||
@@ -364,9 +364,9 @@ components:
|
|||||||
type: number
|
type: number
|
||||||
description: Choice index
|
description: Choice index
|
||||||
message:
|
message:
|
||||||
$ref: '#/components/schemas/ChatCompletionMessage'
|
$ref: "#/components/schemas/ChatCompletionMessage"
|
||||||
logprobs:
|
logprobs:
|
||||||
$ref: '#/components/schemas/ChatCompletionTokenLogprobs'
|
$ref: "#/components/schemas/ChatCompletionTokenLogprobs"
|
||||||
required:
|
required:
|
||||||
- finish_reason
|
- finish_reason
|
||||||
- index
|
- index
|
||||||
@@ -424,7 +424,7 @@ components:
|
|||||||
choices:
|
choices:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionChoice'
|
$ref: "#/components/schemas/ChatCompletionChoice"
|
||||||
description: List of completion choices
|
description: List of completion choices
|
||||||
created:
|
created:
|
||||||
type: number
|
type: number
|
||||||
@@ -441,7 +441,7 @@ components:
|
|||||||
description: System fingerprint
|
description: System fingerprint
|
||||||
nullable: true
|
nullable: true
|
||||||
usage:
|
usage:
|
||||||
$ref: '#/components/schemas/CompletionUsage'
|
$ref: "#/components/schemas/CompletionUsage"
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- choices
|
- choices
|
||||||
@@ -522,24 +522,24 @@ components:
|
|||||||
tool_calls:
|
tool_calls:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionChunkChoiceDeltaToolCall'
|
$ref: "#/components/schemas/ChatCompletionChunkChoiceDeltaToolCall"
|
||||||
description: Tool calls delta
|
description: Tool calls delta
|
||||||
reasoning_details:
|
reasoning_details:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ReasoningDetail'
|
$ref: "#/components/schemas/ReasoningDetail"
|
||||||
description: Reasoning details delta to send reasoning details back to upstream
|
description: Reasoning details delta to send reasoning details back to upstream
|
||||||
annotations:
|
annotations:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/AnnotationDetail'
|
$ref: "#/components/schemas/AnnotationDetail"
|
||||||
description: Annotations delta to send annotations back to upstream
|
description: Annotations delta to send annotations back to upstream
|
||||||
description: Delta changes in streaming response
|
description: Delta changes in streaming response
|
||||||
ChatCompletionChunkChoice:
|
ChatCompletionChunkChoice:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
delta:
|
delta:
|
||||||
$ref: '#/components/schemas/ChatCompletionChunkChoiceDelta'
|
$ref: "#/components/schemas/ChatCompletionChunkChoiceDelta"
|
||||||
finish_reason:
|
finish_reason:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
@@ -552,7 +552,7 @@ components:
|
|||||||
index:
|
index:
|
||||||
type: number
|
type: number
|
||||||
logprobs:
|
logprobs:
|
||||||
$ref: '#/components/schemas/ChatCompletionTokenLogprobs'
|
$ref: "#/components/schemas/ChatCompletionTokenLogprobs"
|
||||||
required:
|
required:
|
||||||
- delta
|
- delta
|
||||||
- finish_reason
|
- finish_reason
|
||||||
@@ -566,7 +566,7 @@ components:
|
|||||||
choices:
|
choices:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionChunkChoice'
|
$ref: "#/components/schemas/ChatCompletionChunkChoice"
|
||||||
created:
|
created:
|
||||||
type: number
|
type: number
|
||||||
model:
|
model:
|
||||||
@@ -579,7 +579,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
usage:
|
usage:
|
||||||
$ref: '#/components/schemas/CompletionUsage'
|
$ref: "#/components/schemas/CompletionUsage"
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- choices
|
- choices
|
||||||
@@ -621,7 +621,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
description: 'URL of the image (data: URLs supported)'
|
description: "URL of the image (data: URLs supported)"
|
||||||
detail:
|
detail:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
@@ -668,15 +668,15 @@ components:
|
|||||||
description: Audio input content part
|
description: Audio input content part
|
||||||
ChatCompletionContentPart:
|
ChatCompletionContentPart:
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/ChatCompletionContentPartText'
|
- $ref: "#/components/schemas/ChatCompletionContentPartText"
|
||||||
- $ref: '#/components/schemas/ChatCompletionContentPartImage'
|
- $ref: "#/components/schemas/ChatCompletionContentPartImage"
|
||||||
- $ref: '#/components/schemas/ChatCompletionContentPartAudio'
|
- $ref: "#/components/schemas/ChatCompletionContentPartAudio"
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: type
|
propertyName: type
|
||||||
mapping:
|
mapping:
|
||||||
text: '#/components/schemas/ChatCompletionContentPartText'
|
text: "#/components/schemas/ChatCompletionContentPartText"
|
||||||
image_url: '#/components/schemas/ChatCompletionContentPartImage'
|
image_url: "#/components/schemas/ChatCompletionContentPartImage"
|
||||||
input_audio: '#/components/schemas/ChatCompletionContentPartAudio'
|
input_audio: "#/components/schemas/ChatCompletionContentPartAudio"
|
||||||
description: Content part for chat completion messages
|
description: Content part for chat completion messages
|
||||||
ChatCompletionSystemMessageParam:
|
ChatCompletionSystemMessageParam:
|
||||||
type: object
|
type: object
|
||||||
@@ -690,7 +690,7 @@ components:
|
|||||||
- type: string
|
- type: string
|
||||||
- type: array
|
- type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionContentPartText'
|
$ref: "#/components/schemas/ChatCompletionContentPartText"
|
||||||
description: System message content
|
description: System message content
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
@@ -711,7 +711,7 @@ components:
|
|||||||
- type: string
|
- type: string
|
||||||
- type: array
|
- type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||||
description: User message content
|
description: User message content
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
@@ -732,7 +732,7 @@ components:
|
|||||||
- type: string
|
- type: string
|
||||||
- type: array
|
- type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||||
- nullable: true
|
- nullable: true
|
||||||
description: Assistant message content
|
description: Assistant message content
|
||||||
name:
|
name:
|
||||||
@@ -741,7 +741,7 @@ components:
|
|||||||
tool_calls:
|
tool_calls:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionMessageToolCall'
|
$ref: "#/components/schemas/ChatCompletionMessageToolCall"
|
||||||
description: Tool calls made by the assistant
|
description: Tool calls made by the assistant
|
||||||
refusal:
|
refusal:
|
||||||
type: string
|
type: string
|
||||||
@@ -762,7 +762,7 @@ components:
|
|||||||
- type: string
|
- type: string
|
||||||
- type: array
|
- type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||||
description: Tool response content
|
description: Tool response content
|
||||||
tool_call_id:
|
tool_call_id:
|
||||||
type: string
|
type: string
|
||||||
@@ -774,17 +774,17 @@ components:
|
|||||||
description: Tool response message
|
description: Tool response message
|
||||||
ChatCompletionMessageParam:
|
ChatCompletionMessageParam:
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/ChatCompletionSystemMessageParam'
|
- $ref: "#/components/schemas/ChatCompletionSystemMessageParam"
|
||||||
- $ref: '#/components/schemas/ChatCompletionUserMessageParam'
|
- $ref: "#/components/schemas/ChatCompletionUserMessageParam"
|
||||||
- $ref: '#/components/schemas/ChatCompletionAssistantMessageParam'
|
- $ref: "#/components/schemas/ChatCompletionAssistantMessageParam"
|
||||||
- $ref: '#/components/schemas/ChatCompletionToolMessageParam'
|
- $ref: "#/components/schemas/ChatCompletionToolMessageParam"
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: role
|
propertyName: role
|
||||||
mapping:
|
mapping:
|
||||||
system: '#/components/schemas/ChatCompletionSystemMessageParam'
|
system: "#/components/schemas/ChatCompletionSystemMessageParam"
|
||||||
user: '#/components/schemas/ChatCompletionUserMessageParam'
|
user: "#/components/schemas/ChatCompletionUserMessageParam"
|
||||||
assistant: '#/components/schemas/ChatCompletionAssistantMessageParam'
|
assistant: "#/components/schemas/ChatCompletionAssistantMessageParam"
|
||||||
tool: '#/components/schemas/ChatCompletionToolMessageParam'
|
tool: "#/components/schemas/ChatCompletionToolMessageParam"
|
||||||
description: Chat completion message with role-based discrimination
|
description: Chat completion message with role-based discrimination
|
||||||
ChatCompletionTool:
|
ChatCompletionTool:
|
||||||
type: object
|
type: object
|
||||||
@@ -848,7 +848,7 @@ components:
|
|||||||
- type: string
|
- type: string
|
||||||
enum:
|
enum:
|
||||||
- required
|
- required
|
||||||
- $ref: '#/components/schemas/ChatCompletionNamedToolChoice'
|
- $ref: "#/components/schemas/ChatCompletionNamedToolChoice"
|
||||||
description: Tool choice configuration
|
description: Tool choice configuration
|
||||||
ChatCompletionStreamOptions:
|
ChatCompletionStreamOptions:
|
||||||
type: object
|
type: object
|
||||||
@@ -867,7 +867,7 @@ components:
|
|||||||
messages:
|
messages:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionMessageParam'
|
$ref: "#/components/schemas/ChatCompletionMessageParam"
|
||||||
minItems: 1
|
minItems: 1
|
||||||
description: List of messages for the conversation
|
description: List of messages for the conversation
|
||||||
example:
|
example:
|
||||||
@@ -980,7 +980,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Schema description for the model
|
description: Schema description for the model
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ResponseFormatJsonSchemaSchema'
|
$ref: "#/components/schemas/ResponseFormatJsonSchemaSchema"
|
||||||
strict:
|
strict:
|
||||||
type: boolean
|
type: boolean
|
||||||
nullable: true
|
nullable: true
|
||||||
@@ -1034,7 +1034,7 @@ components:
|
|||||||
description: Enable streaming response
|
description: Enable streaming response
|
||||||
stream_options:
|
stream_options:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/ChatCompletionStreamOptions'
|
- $ref: "#/components/schemas/ChatCompletionStreamOptions"
|
||||||
- nullable: true
|
- nullable: true
|
||||||
temperature:
|
temperature:
|
||||||
type: number
|
type: number
|
||||||
@@ -1044,11 +1044,11 @@ components:
|
|||||||
default: 1
|
default: 1
|
||||||
description: Sampling temperature (0-2)
|
description: Sampling temperature (0-2)
|
||||||
tool_choice:
|
tool_choice:
|
||||||
$ref: '#/components/schemas/ChatCompletionToolChoiceOption'
|
$ref: "#/components/schemas/ChatCompletionToolChoiceOption"
|
||||||
tools:
|
tools:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ChatCompletionTool'
|
$ref: "#/components/schemas/ChatCompletionTool"
|
||||||
description: Available tools for function calling
|
description: Available tools for function calling
|
||||||
top_p:
|
top_p:
|
||||||
type: number
|
type: number
|
||||||
@@ -1061,7 +1061,8 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Unique user identifier
|
description: Unique user identifier
|
||||||
models:
|
models:
|
||||||
x-speakeasy-name-override: model_list
|
# Needed to avoid conflict with the `models` directory
|
||||||
|
x-speakeasy-name-override: fallback_models
|
||||||
type: array
|
type: array
|
||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
@@ -1498,13 +1499,22 @@ components:
|
|||||||
required:
|
required:
|
||||||
- messages
|
- messages
|
||||||
description: Chat completion request parameters
|
description: Chat completion request parameters
|
||||||
|
ChatStreamCompletionCreateParams:
|
||||||
|
allOf:
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
stream:
|
||||||
|
type: boolean
|
||||||
|
enum:
|
||||||
|
- true
|
||||||
|
default: true
|
||||||
|
description: Enable streaming response
|
||||||
|
- $ref: "#/components/schemas/ChatCompletionCreateParams"
|
||||||
parameters: {}
|
parameters: {}
|
||||||
paths:
|
paths:
|
||||||
/chat/completions:
|
/chat/completions:
|
||||||
post:
|
post:
|
||||||
operationId: createChatCompletion
|
operationId: createChatCompletion
|
||||||
x-speakeasy-group: chat
|
|
||||||
x-speakeasy-name-override: complete
|
|
||||||
summary: Create a chat completion
|
summary: Create a chat completion
|
||||||
description: Creates a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
description: Creates a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
tags:
|
tags:
|
||||||
@@ -1515,40 +1525,92 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionCreateParams'
|
$ref: "#/components/schemas/ChatCompletionCreateParams"
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: Successful chat completion response
|
description: Successful chat completion response
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletion'
|
$ref: "#/components/schemas/ChatCompletion"
|
||||||
description: Non-streaming response when stream=false
|
description: Non-streaming response when stream=false
|
||||||
text/event-stream:
|
text/event-stream:
|
||||||
x-speakeasy-sse-sentinel: '[DONE]'
|
x-speakeasy-sse-sentinel: "[DONE]"
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionChunkWrapper'
|
$ref: "#/components/schemas/ChatCompletionChunkWrapper"
|
||||||
'400':
|
"400":
|
||||||
description: Bad request - invalid parameters
|
description: Bad request - invalid parameters
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionError'
|
$ref: "#/components/schemas/ChatCompletionError"
|
||||||
'401':
|
"401":
|
||||||
description: Unauthorized - invalid API key
|
description: Unauthorized - invalid API key
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionError'
|
$ref: "#/components/schemas/ChatCompletionError"
|
||||||
'429':
|
"429":
|
||||||
description: Too many requests - rate limit exceeded
|
description: Too many requests - rate limit exceeded
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionError'
|
$ref: "#/components/schemas/ChatCompletionError"
|
||||||
'500':
|
"500":
|
||||||
description: Internal server error
|
description: Internal server error
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatCompletionError'
|
$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"
|
||||||
|
"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: completeStream
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ speakeasyVersion: latest
|
|||||||
sources:
|
sources:
|
||||||
OpenRouter Chat Completions API:
|
OpenRouter Chat Completions API:
|
||||||
inputs:
|
inputs:
|
||||||
- location: .speakeasy/input.openapi.yaml
|
- location: .speakeasy/in.openapi.yaml
|
||||||
output: .speakeasy/out.openapi.yaml
|
output: .speakeasy/out.openapi.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/sheldon-vaughn-test/sandbox/open-router-chat-completions-api
|
location: registry.speakeasyapi.dev/sheldon-vaughn-test/sandbox/open-router-chat-completions-api
|
||||||
|
|||||||
@@ -222,6 +222,7 @@ with OpenRouter(
|
|||||||
### [chat](https://github.com/speakeasy-sdks/openrouter-python-sdk/blob/master/docs/sdks/chat/README.md)
|
### [chat](https://github.com/speakeasy-sdks/openrouter-python-sdk/blob/master/docs/sdks/chat/README.md)
|
||||||
|
|
||||||
* [complete](https://github.com/speakeasy-sdks/openrouter-python-sdk/blob/master/docs/sdks/chat/README.md#complete) - Create a chat completion
|
* [complete](https://github.com/speakeasy-sdks/openrouter-python-sdk/blob/master/docs/sdks/chat/README.md#complete) - Create a chat completion
|
||||||
|
* [complete_stream](https://github.com/speakeasy-sdks/openrouter-python-sdk/blob/master/docs/sdks/chat/README.md#complete_stream) - Create a chat completion
|
||||||
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|||||||
@@ -222,6 +222,7 @@ with OpenRouter(
|
|||||||
### [chat](docs/sdks/chat/README.md)
|
### [chat](docs/sdks/chat/README.md)
|
||||||
|
|
||||||
* [complete](docs/sdks/chat/README.md#complete) - Create a chat completion
|
* [complete](docs/sdks/chat/README.md#complete) - Create a chat completion
|
||||||
|
* [complete_stream](docs/sdks/chat/README.md#complete_stream) - Create a chat completion
|
||||||
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|||||||
@@ -5,30 +5,30 @@ Chat completion request parameters
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `messages` | List[[models.ChatCompletionMessageParam](../models/chatcompletionmessageparam.md)] | :heavy_check_mark: | List of messages for the conversation | [<br/>{<br/>"role": "user",<br/>"content": "Hello, how are you?"<br/>}<br/>] |
|
| `messages` | List[[models.ChatCompletionMessageParam](../models/chatcompletionmessageparam.md)] | :heavy_check_mark: | List of messages for the conversation | [<br/>{<br/>"role": "user",<br/>"content": "Hello, how are you?"<br/>}<br/>] |
|
||||||
| `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | |
|
| `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | |
|
||||||
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | |
|
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | |
|
||||||
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | Token logit bias adjustments | |
|
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | Token logit bias adjustments | |
|
||||||
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | Return log probabilities | |
|
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | Return log probabilities | |
|
||||||
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | |
|
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | |
|
||||||
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens in completion | |
|
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens in completion | |
|
||||||
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens) | |
|
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens) | |
|
||||||
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | |
|
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | |
|
||||||
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | |
|
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | |
|
||||||
| `reasoning` | [OptionalNullable[models.Reasoning]](../models/reasoning.md) | :heavy_minus_sign: | Reasoning configuration | |
|
| `reasoning` | [OptionalNullable[models.ChatCompletionCreateParamsReasoning]](../models/chatcompletioncreateparamsreasoning.md) | :heavy_minus_sign: | Reasoning configuration | |
|
||||||
| `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Response format configuration | |
|
| `response_format` | [Optional[models.ChatCompletionCreateParamsResponseFormatUnion]](../models/chatcompletioncreateparamsresponseformatunion.md) | :heavy_minus_sign: | Response format configuration | |
|
||||||
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | Random seed for deterministic outputs | |
|
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | Random seed for deterministic outputs | |
|
||||||
| `stop` | [OptionalNullable[models.Stop]](../models/stop.md) | :heavy_minus_sign: | Stop sequences (up to 4) | |
|
| `stop` | [OptionalNullable[models.ChatCompletionCreateParamsStop]](../models/chatcompletioncreateparamsstop.md) | :heavy_minus_sign: | Stop sequences (up to 4) | |
|
||||||
| `stream` | *OptionalNullable[bool]* | :heavy_minus_sign: | Enable streaming response | |
|
| `stream` | *OptionalNullable[bool]* | :heavy_minus_sign: | Enable streaming response | |
|
||||||
| `stream_options` | [OptionalNullable[models.StreamOptions]](../models/streamoptions.md) | :heavy_minus_sign: | N/A | |
|
| `stream_options` | [OptionalNullable[models.ChatCompletionCreateParamsStreamOptions]](../models/chatcompletioncreateparamsstreamoptions.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | |
|
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | |
|
||||||
| `tool_choice` | [Optional[models.ChatCompletionToolChoiceOption]](../models/chatcompletiontoolchoiceoption.md) | :heavy_minus_sign: | Tool choice configuration | |
|
| `tool_choice` | [Optional[models.ChatCompletionToolChoiceOption]](../models/chatcompletiontoolchoiceoption.md) | :heavy_minus_sign: | Tool choice configuration | |
|
||||||
| `tools` | List[[models.ChatCompletionTool](../models/chatcompletiontool.md)] | :heavy_minus_sign: | Available tools for function calling | |
|
| `tools` | List[[models.ChatCompletionTool](../models/chatcompletiontool.md)] | :heavy_minus_sign: | Available tools for function calling | |
|
||||||
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | |
|
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | |
|
||||||
| `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | |
|
| `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | |
|
||||||
| `model_list` | List[*str*] | :heavy_minus_sign: | Order of models to fallback to for this request | |
|
| `fallback_models` | List[*str*] | :heavy_minus_sign: | Order of models to fallback to for this request | |
|
||||||
| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | Reasoning effort | |
|
| `reasoning_effort` | [OptionalNullable[models.ChatCompletionCreateParamsReasoningEffort]](../models/chatcompletioncreateparamsreasoningeffort.md) | :heavy_minus_sign: | Reasoning effort | |
|
||||||
| `provider` | [OptionalNullable[models.Provider]](../models/provider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
| `provider` | [OptionalNullable[models.ChatCompletionCreateParamsProvider]](../models/chatcompletioncreateparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
||||||
| `plugins` | List[[models.Plugin](../models/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
|
| `plugins` | List[[models.ChatCompletionCreateParamsPluginUnion](../models/chatcompletioncreateparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Image
|
# ChatCompletionCreateParamsAudio
|
||||||
|
|
||||||
|
|
||||||
## Supported Types
|
## Supported Types
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# ChatCompletionCreateParamsCompletion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `float`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: float = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Any`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: Any = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# DataCollection
|
# ChatCompletionCreateParamsDataCollection
|
||||||
|
|
||||||
Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
||||||
- allow: (default) allow providers which store user data non-transiently and may train on it
|
- allow: (default) allow providers which store user data non-transiently and may train on it
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Effort
|
# ChatCompletionCreateParamsEffort
|
||||||
|
|
||||||
OpenAI-style reasoning effort setting
|
OpenAI-style reasoning effort setting
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Engine
|
# ChatCompletionCreateParamsEngine
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# IDChainOfThought
|
# ChatCompletionCreateParamsIDChainOfThought
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# IDFileParser
|
# ChatCompletionCreateParamsIDFileParser
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# IDModeration
|
# ChatCompletionCreateParamsIDModeration
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# IDWeb
|
# ChatCompletionCreateParamsIDWeb
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# OrderEnum
|
# ChatCompletionCreateParamsIgnoreEnum
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ChatCompletionCreateParamsIgnoreUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsIgnoreEnum`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsIgnoreEnum = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Audio
|
# ChatCompletionCreateParamsImage
|
||||||
|
|
||||||
|
|
||||||
## Supported Types
|
## Supported Types
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# JSONSchema
|
# ChatCompletionCreateParamsJSONSchema
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# ChatCompletionCreateParamsMaxPrice
|
||||||
|
|
||||||
|
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `prompt` | [Optional[models.ChatCompletionCreateParamsPrompt]](../models/chatcompletioncreateparamsprompt.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `completion` | [Optional[models.ChatCompletionCreateParamsCompletion]](../models/chatcompletioncreateparamscompletion.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `image` | [Optional[models.ChatCompletionCreateParamsImage]](../models/chatcompletioncreateparamsimage.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `audio` | [Optional[models.ChatCompletionCreateParamsAudio]](../models/chatcompletioncreateparamsaudio.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `request` | [Optional[models.ChatCompletionCreateParamsRequest]](../models/chatcompletioncreateparamsrequest.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# IgnoreEnum
|
# ChatCompletionCreateParamsOnlyEnum
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ChatCompletionCreateParamsOnlyUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsOnlyEnum`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsOnlyEnum = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# OnlyEnum
|
# ChatCompletionCreateParamsOrderEnum
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ChatCompletionCreateParamsOrderUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsOrderEnum`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsOrderEnum = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatCompletionCreateParamsPdf
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `engine` | [Optional[models.ChatCompletionCreateParamsPdfEngine]](../models/chatcompletioncreateparamspdfengine.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# PdfEngine
|
# ChatCompletionCreateParamsPdfEngine
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatCompletionCreateParamsPluginChainOfThought
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `id` | [models.ChatCompletionCreateParamsIDChainOfThought](../models/chatcompletioncreateparamsidchainofthought.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatCompletionCreateParamsPluginFileParser
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||||
|
| `id` | [models.ChatCompletionCreateParamsIDFileParser](../models/chatcompletioncreateparamsidfileparser.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `max_files` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `pdf` | [Optional[models.ChatCompletionCreateParamsPdf]](../models/chatcompletioncreateparamspdf.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatCompletionCreateParamsPluginModeration
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||||
|
| `id` | [models.ChatCompletionCreateParamsIDModeration](../models/chatcompletioncreateparamsidmoderation.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# ChatCompletionCreateParamsPluginUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsPluginModeration`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsPluginModeration = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsPluginWeb`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsPluginWeb = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsPluginChainOfThought`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsPluginChainOfThought = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsPluginFileParser`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsPluginFileParser = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# ChatCompletionCreateParamsPluginWeb
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||||
|
| `id` | [models.ChatCompletionCreateParamsIDWeb](../models/chatcompletioncreateparamsidweb.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `engine` | [Optional[models.ChatCompletionCreateParamsEngine]](../models/chatcompletioncreateparamsengine.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Completion
|
# ChatCompletionCreateParamsPrompt
|
||||||
|
|
||||||
|
|
||||||
## Supported Types
|
## Supported Types
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Provider
|
# ChatCompletionCreateParamsProvider
|
||||||
|
|
||||||
When multiple model providers are available, optionally indicate your routing preference.
|
When multiple model providers are available, optionally indicate your routing preference.
|
||||||
|
|
||||||
@@ -9,10 +9,10 @@ When multiple model providers are available, optionally indicate your routing pr
|
|||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> |
|
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> |
|
||||||
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. |
|
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. |
|
||||||
| `data_collection` | [OptionalNullable[models.DataCollection]](../models/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/>- deny: use only providers which do not collect user data.<br/> |
|
| `data_collection` | [OptionalNullable[models.ChatCompletionCreateParamsDataCollection]](../models/chatcompletioncreateparamsdatacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/>- deny: use only providers which do not collect user data.<br/> |
|
||||||
| `order` | List[[models.Order](../models/order.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. |
|
| `order` | List[[models.ChatCompletionCreateParamsOrderUnion](../models/chatcompletioncreateparamsorderunion.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. |
|
||||||
| `only` | List[[models.Only](../models/only.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. |
|
| `only` | List[[models.ChatCompletionCreateParamsOnlyUnion](../models/chatcompletioncreateparamsonlyunion.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. |
|
||||||
| `ignore` | List[[models.Ignore](../models/ignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. |
|
| `ignore` | List[[models.ChatCompletionCreateParamsIgnoreUnion](../models/chatcompletioncreateparamsignoreunion.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. |
|
||||||
| `quantizations` | List[[models.Quantization](../models/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. |
|
| `quantizations` | List[[models.ChatCompletionCreateParamsQuantization](../models/chatcompletioncreateparamsquantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. |
|
||||||
| `sort` | [OptionalNullable[models.Sort]](../models/sort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. |
|
| `sort` | [OptionalNullable[models.ChatCompletionCreateParamsSort]](../models/chatcompletioncreateparamssort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. |
|
||||||
| `max_price` | [Optional[models.MaxPrice]](../models/maxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. |
|
| `max_price` | [Optional[models.ChatCompletionCreateParamsMaxPrice]](../models/chatcompletioncreateparamsmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. |
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Quantization
|
# ChatCompletionCreateParamsQuantization
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# ChatCompletionCreateParamsReasoning
|
||||||
|
|
||||||
|
Reasoning configuration
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Enables reasoning with default settings. Only work for some models. |
|
||||||
|
| `effort` | [OptionalNullable[models.ChatCompletionCreateParamsEffort]](../models/chatcompletioncreateparamseffort.md) | :heavy_minus_sign: | OpenAI-style reasoning effort setting |
|
||||||
|
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | non-OpenAI-style reasoning effort setting |
|
||||||
|
| `exclude` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# ReasoningEffort
|
# ChatCompletionCreateParamsReasoningEffort
|
||||||
|
|
||||||
Reasoning effort
|
Reasoning effort
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Prompt
|
# ChatCompletionCreateParamsRequest
|
||||||
|
|
||||||
|
|
||||||
## Supported Types
|
## Supported Types
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# ChatCompletionCreateParamsResponseFormatGrammar
|
||||||
|
|
||||||
|
Custom grammar response format
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||||
|
| `type` | [models.ChatCompletionCreateParamsTypeGrammar](../models/chatcompletioncreateparamstypegrammar.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `grammar` | *str* | :heavy_check_mark: | Custom grammar for text generation |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatCompletionCreateParamsResponseFormatJSONObject
|
||||||
|
|
||||||
|
JSON object response format
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `type` | [models.ChatCompletionCreateParamsTypeJSONObject](../models/chatcompletioncreateparamstypejsonobject.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# ChatCompletionCreateParamsResponseFormatJSONSchema
|
||||||
|
|
||||||
|
JSON Schema response format for structured outputs
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `type` | [models.ChatCompletionCreateParamsTypeJSONSchema](../models/chatcompletioncreateparamstypejsonschema.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `json_schema` | [models.ChatCompletionCreateParamsJSONSchema](../models/chatcompletioncreateparamsjsonschema.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatCompletionCreateParamsResponseFormatPython
|
||||||
|
|
||||||
|
Python code response format
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
||||||
|
| `type` | [models.ChatCompletionCreateParamsTypePython](../models/chatcompletioncreateparamstypepython.md) | :heavy_check_mark: | N/A |
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# ResponseFormatText
|
# ChatCompletionCreateParamsResponseFormatText
|
||||||
|
|
||||||
Default text response format
|
Default text response format
|
||||||
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# ChatCompletionCreateParamsResponseFormatUnion
|
||||||
|
|
||||||
|
Response format configuration
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsResponseFormatText`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsResponseFormatText = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsResponseFormatJSONObject`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsResponseFormatJSONObject = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsResponseFormatJSONSchema`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsResponseFormatJSONSchema = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsResponseFormatGrammar`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsResponseFormatGrammar = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatCompletionCreateParamsResponseFormatPython`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatCompletionCreateParamsResponseFormatPython = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Sort
|
# ChatCompletionCreateParamsSort
|
||||||
|
|
||||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Stop
|
# ChatCompletionCreateParamsStop
|
||||||
|
|
||||||
Stop sequences (up to 4)
|
Stop sequences (up to 4)
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# StreamOptions
|
# ChatCompletionCreateParamsStreamOptions
|
||||||
|
|
||||||
Streaming configuration options
|
Streaming configuration options
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# TypeGrammar
|
# ChatCompletionCreateParamsTypeGrammar
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# TypeJSONObject
|
# ChatCompletionCreateParamsTypeJSONObject
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# TypeJSONSchema
|
# ChatCompletionCreateParamsTypeJSONSchema
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# TypePython
|
# ChatCompletionCreateParamsTypePython
|
||||||
|
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# ChatStreamCompletionCreateParams
|
||||||
|
|
||||||
|
Chat completion request parameters
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `stream` | *OptionalNullable[bool]* | :heavy_minus_sign: | Enable streaming response | |
|
||||||
|
| `messages` | List[[models.ChatCompletionMessageParam](../models/chatcompletionmessageparam.md)] | :heavy_check_mark: | List of messages for the conversation | [<br/>{<br/>"role": "user",<br/>"content": "Hello, how are you?"<br/>}<br/>] |
|
||||||
|
| `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | |
|
||||||
|
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | |
|
||||||
|
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | Token logit bias adjustments | |
|
||||||
|
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | Return log probabilities | |
|
||||||
|
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | |
|
||||||
|
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens in completion | |
|
||||||
|
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens) | |
|
||||||
|
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | |
|
||||||
|
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | |
|
||||||
|
| `reasoning` | [OptionalNullable[models.ChatStreamCompletionCreateParamsReasoning]](../models/chatstreamcompletioncreateparamsreasoning.md) | :heavy_minus_sign: | Reasoning configuration | |
|
||||||
|
| `response_format` | [Optional[models.ChatStreamCompletionCreateParamsResponseFormatUnion]](../models/chatstreamcompletioncreateparamsresponseformatunion.md) | :heavy_minus_sign: | Response format configuration | |
|
||||||
|
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | Random seed for deterministic outputs | |
|
||||||
|
| `stop` | [OptionalNullable[models.ChatStreamCompletionCreateParamsStop]](../models/chatstreamcompletioncreateparamsstop.md) | :heavy_minus_sign: | Stop sequences (up to 4) | |
|
||||||
|
| `stream_options` | [OptionalNullable[models.ChatStreamCompletionCreateParamsStreamOptions]](../models/chatstreamcompletioncreateparamsstreamoptions.md) | :heavy_minus_sign: | N/A | |
|
||||||
|
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | |
|
||||||
|
| `tool_choice` | [Optional[models.ChatCompletionToolChoiceOption]](../models/chatcompletiontoolchoiceoption.md) | :heavy_minus_sign: | Tool choice configuration | |
|
||||||
|
| `tools` | List[[models.ChatCompletionTool](../models/chatcompletiontool.md)] | :heavy_minus_sign: | Available tools for function calling | |
|
||||||
|
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | |
|
||||||
|
| `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | |
|
||||||
|
| `fallback_models` | List[*str*] | :heavy_minus_sign: | Order of models to fallback to for this request | |
|
||||||
|
| `reasoning_effort` | [OptionalNullable[models.ChatStreamCompletionCreateParamsReasoningEffort]](../models/chatstreamcompletioncreateparamsreasoningeffort.md) | :heavy_minus_sign: | Reasoning effort | |
|
||||||
|
| `provider` | [OptionalNullable[models.ChatStreamCompletionCreateParamsProvider]](../models/chatstreamcompletioncreateparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
||||||
|
| `plugins` | List[[models.ChatStreamCompletionCreateParamsPluginUnion](../models/chatstreamcompletioncreateparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsAudio
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `float`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: float = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Any`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: Any = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsCompletion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `float`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: float = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Any`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: Any = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsDataCollection
|
||||||
|
|
||||||
|
Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
||||||
|
- allow: (default) allow providers which store user data non-transiently and may train on it
|
||||||
|
- deny: use only providers which do not collect user data.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------- | ------- |
|
||||||
|
| `DENY` | deny |
|
||||||
|
| `ALLOW` | allow |
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsEffort
|
||||||
|
|
||||||
|
OpenAI-style reasoning effort setting
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| --------- | --------- |
|
||||||
|
| `HIGH` | high |
|
||||||
|
| `MEDIUM` | medium |
|
||||||
|
| `LOW` | low |
|
||||||
|
| `MINIMAL` | minimal |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsEngine
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------- | -------- |
|
||||||
|
| `NATIVE` | native |
|
||||||
|
| `EXA` | exa |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsIDChainOfThought
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------ | ------------------ |
|
||||||
|
| `CHAIN_OF_THOUGHT` | chain-of-thought |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsIDFileParser
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------- | ------------- |
|
||||||
|
| `FILE_PARSER` | file-parser |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsIDModeration
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------ | ------------ |
|
||||||
|
| `MODERATION` | moderation |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsIDWeb
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ----- | ----- |
|
||||||
|
| `WEB` | web |
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsIgnoreEnum
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------ | ------------------ |
|
||||||
|
| `ANY_SCALE` | AnyScale |
|
||||||
|
| `CENT_ML` | Cent-ML |
|
||||||
|
| `HUGGING_FACE` | HuggingFace |
|
||||||
|
| `HYPERBOLIC_2` | Hyperbolic 2 |
|
||||||
|
| `LEPTON` | Lepton |
|
||||||
|
| `LYNN_2` | Lynn 2 |
|
||||||
|
| `LYNN` | Lynn |
|
||||||
|
| `MANCER` | Mancer |
|
||||||
|
| `MODAL` | Modal |
|
||||||
|
| `OCTO_AI` | OctoAI |
|
||||||
|
| `RECURSAL` | Recursal |
|
||||||
|
| `REFLECTION` | Reflection |
|
||||||
|
| `REPLICATE` | Replicate |
|
||||||
|
| `SAMBA_NOVA_2` | SambaNova 2 |
|
||||||
|
| `SF_COMPUTE` | SF Compute |
|
||||||
|
| `TOGETHER_2` | Together 2 |
|
||||||
|
| `ONE_DOT_AI` | 01.AI |
|
||||||
|
| `AI21` | AI21 |
|
||||||
|
| `AION_LABS` | AionLabs |
|
||||||
|
| `ALIBABA` | Alibaba |
|
||||||
|
| `AMAZON_BEDROCK` | Amazon Bedrock |
|
||||||
|
| `ANTHROPIC` | Anthropic |
|
||||||
|
| `ATLAS_CLOUD` | AtlasCloud |
|
||||||
|
| `ATOMA` | Atoma |
|
||||||
|
| `AVIAN` | Avian |
|
||||||
|
| `AZURE` | Azure |
|
||||||
|
| `BASE_TEN` | BaseTen |
|
||||||
|
| `CEREBRAS` | Cerebras |
|
||||||
|
| `CHUTES` | Chutes |
|
||||||
|
| `CLOUDFLARE` | Cloudflare |
|
||||||
|
| `COHERE` | Cohere |
|
||||||
|
| `CROF_AI` | CrofAI |
|
||||||
|
| `CRUSOE` | Crusoe |
|
||||||
|
| `DEEP_INFRA` | DeepInfra |
|
||||||
|
| `DEEP_SEEK` | DeepSeek |
|
||||||
|
| `ENFER` | Enfer |
|
||||||
|
| `FEATHERLESS` | Featherless |
|
||||||
|
| `FIREWORKS` | Fireworks |
|
||||||
|
| `FRIENDLI` | Friendli |
|
||||||
|
| `GMI_CLOUD` | GMICloud |
|
||||||
|
| `GOOGLE` | Google |
|
||||||
|
| `GOOGLE_AI_STUDIO` | Google AI Studio |
|
||||||
|
| `GROQ` | Groq |
|
||||||
|
| `HYPERBOLIC` | Hyperbolic |
|
||||||
|
| `INCEPTION` | Inception |
|
||||||
|
| `INFERENCE_NET` | InferenceNet |
|
||||||
|
| `INFERMATIC` | Infermatic |
|
||||||
|
| `INFLECTION` | Inflection |
|
||||||
|
| `INO_CLOUD` | InoCloud |
|
||||||
|
| `KLUSTER` | Kluster |
|
||||||
|
| `LAMBDA` | Lambda |
|
||||||
|
| `LIQUID` | Liquid |
|
||||||
|
| `MANCER_2` | Mancer 2 |
|
||||||
|
| `META` | Meta |
|
||||||
|
| `MINIMAX` | Minimax |
|
||||||
|
| `MISTRAL` | Mistral |
|
||||||
|
| `MOONSHOT_AI` | Moonshot AI |
|
||||||
|
| `MORPH` | Morph |
|
||||||
|
| `N_COMPASS` | NCompass |
|
||||||
|
| `NEBIUS` | Nebius |
|
||||||
|
| `NEXT_BIT` | NextBit |
|
||||||
|
| `NINETEEN` | Nineteen |
|
||||||
|
| `NOVITA` | Novita |
|
||||||
|
| `OPEN_AI` | OpenAI |
|
||||||
|
| `OPEN_INFERENCE` | OpenInference |
|
||||||
|
| `PARASAIL` | Parasail |
|
||||||
|
| `PERPLEXITY` | Perplexity |
|
||||||
|
| `PHALA` | Phala |
|
||||||
|
| `SAMBA_NOVA` | SambaNova |
|
||||||
|
| `STEALTH` | Stealth |
|
||||||
|
| `SWITCHPOINT` | Switchpoint |
|
||||||
|
| `TARGON` | Targon |
|
||||||
|
| `TOGETHER` | Together |
|
||||||
|
| `UBICLOUD` | Ubicloud |
|
||||||
|
| `VENICE` | Venice |
|
||||||
|
| `WAND_B` | WandB |
|
||||||
|
| `X_AI` | xAI |
|
||||||
|
| `Z_AI` | Z.AI |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsIgnoreUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsIgnoreEnum`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsIgnoreEnum = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsImage
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `float`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: float = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Any`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: Any = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsJSONSchema
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||||
|
| `name` | *str* | :heavy_check_mark: | Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) |
|
||||||
|
| `description` | *Optional[str]* | :heavy_minus_sign: | Schema description for the model |
|
||||||
|
| `schema_` | [Optional[models.ResponseFormatJSONSchemaSchema]](../models/responseformatjsonschemaschema.md) | :heavy_minus_sign: | The schema for the response format, described as a JSON Schema object |
|
||||||
|
| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | Enable strict schema adherence |
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsMaxPrice
|
||||||
|
|
||||||
|
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `prompt` | [Optional[models.ChatStreamCompletionCreateParamsPrompt]](../models/chatstreamcompletioncreateparamsprompt.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `completion` | [Optional[models.ChatStreamCompletionCreateParamsCompletion]](../models/chatstreamcompletioncreateparamscompletion.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `image` | [Optional[models.ChatStreamCompletionCreateParamsImage]](../models/chatstreamcompletioncreateparamsimage.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `audio` | [Optional[models.ChatStreamCompletionCreateParamsAudio]](../models/chatstreamcompletioncreateparamsaudio.md) | :heavy_minus_sign: | N/A |
|
||||||
|
| `request` | [Optional[models.ChatStreamCompletionCreateParamsRequest]](../models/chatstreamcompletioncreateparamsrequest.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsOnlyEnum
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------ | ------------------ |
|
||||||
|
| `ANY_SCALE` | AnyScale |
|
||||||
|
| `CENT_ML` | Cent-ML |
|
||||||
|
| `HUGGING_FACE` | HuggingFace |
|
||||||
|
| `HYPERBOLIC_2` | Hyperbolic 2 |
|
||||||
|
| `LEPTON` | Lepton |
|
||||||
|
| `LYNN_2` | Lynn 2 |
|
||||||
|
| `LYNN` | Lynn |
|
||||||
|
| `MANCER` | Mancer |
|
||||||
|
| `MODAL` | Modal |
|
||||||
|
| `OCTO_AI` | OctoAI |
|
||||||
|
| `RECURSAL` | Recursal |
|
||||||
|
| `REFLECTION` | Reflection |
|
||||||
|
| `REPLICATE` | Replicate |
|
||||||
|
| `SAMBA_NOVA_2` | SambaNova 2 |
|
||||||
|
| `SF_COMPUTE` | SF Compute |
|
||||||
|
| `TOGETHER_2` | Together 2 |
|
||||||
|
| `ONE_DOT_AI` | 01.AI |
|
||||||
|
| `AI21` | AI21 |
|
||||||
|
| `AION_LABS` | AionLabs |
|
||||||
|
| `ALIBABA` | Alibaba |
|
||||||
|
| `AMAZON_BEDROCK` | Amazon Bedrock |
|
||||||
|
| `ANTHROPIC` | Anthropic |
|
||||||
|
| `ATLAS_CLOUD` | AtlasCloud |
|
||||||
|
| `ATOMA` | Atoma |
|
||||||
|
| `AVIAN` | Avian |
|
||||||
|
| `AZURE` | Azure |
|
||||||
|
| `BASE_TEN` | BaseTen |
|
||||||
|
| `CEREBRAS` | Cerebras |
|
||||||
|
| `CHUTES` | Chutes |
|
||||||
|
| `CLOUDFLARE` | Cloudflare |
|
||||||
|
| `COHERE` | Cohere |
|
||||||
|
| `CROF_AI` | CrofAI |
|
||||||
|
| `CRUSOE` | Crusoe |
|
||||||
|
| `DEEP_INFRA` | DeepInfra |
|
||||||
|
| `DEEP_SEEK` | DeepSeek |
|
||||||
|
| `ENFER` | Enfer |
|
||||||
|
| `FEATHERLESS` | Featherless |
|
||||||
|
| `FIREWORKS` | Fireworks |
|
||||||
|
| `FRIENDLI` | Friendli |
|
||||||
|
| `GMI_CLOUD` | GMICloud |
|
||||||
|
| `GOOGLE` | Google |
|
||||||
|
| `GOOGLE_AI_STUDIO` | Google AI Studio |
|
||||||
|
| `GROQ` | Groq |
|
||||||
|
| `HYPERBOLIC` | Hyperbolic |
|
||||||
|
| `INCEPTION` | Inception |
|
||||||
|
| `INFERENCE_NET` | InferenceNet |
|
||||||
|
| `INFERMATIC` | Infermatic |
|
||||||
|
| `INFLECTION` | Inflection |
|
||||||
|
| `INO_CLOUD` | InoCloud |
|
||||||
|
| `KLUSTER` | Kluster |
|
||||||
|
| `LAMBDA` | Lambda |
|
||||||
|
| `LIQUID` | Liquid |
|
||||||
|
| `MANCER_2` | Mancer 2 |
|
||||||
|
| `META` | Meta |
|
||||||
|
| `MINIMAX` | Minimax |
|
||||||
|
| `MISTRAL` | Mistral |
|
||||||
|
| `MOONSHOT_AI` | Moonshot AI |
|
||||||
|
| `MORPH` | Morph |
|
||||||
|
| `N_COMPASS` | NCompass |
|
||||||
|
| `NEBIUS` | Nebius |
|
||||||
|
| `NEXT_BIT` | NextBit |
|
||||||
|
| `NINETEEN` | Nineteen |
|
||||||
|
| `NOVITA` | Novita |
|
||||||
|
| `OPEN_AI` | OpenAI |
|
||||||
|
| `OPEN_INFERENCE` | OpenInference |
|
||||||
|
| `PARASAIL` | Parasail |
|
||||||
|
| `PERPLEXITY` | Perplexity |
|
||||||
|
| `PHALA` | Phala |
|
||||||
|
| `SAMBA_NOVA` | SambaNova |
|
||||||
|
| `STEALTH` | Stealth |
|
||||||
|
| `SWITCHPOINT` | Switchpoint |
|
||||||
|
| `TARGON` | Targon |
|
||||||
|
| `TOGETHER` | Together |
|
||||||
|
| `UBICLOUD` | Ubicloud |
|
||||||
|
| `VENICE` | Venice |
|
||||||
|
| `WAND_B` | WandB |
|
||||||
|
| `X_AI` | xAI |
|
||||||
|
| `Z_AI` | Z.AI |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsOnlyUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsOnlyEnum`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsOnlyEnum = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsOrderEnum
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------------ | ------------------ |
|
||||||
|
| `ANY_SCALE` | AnyScale |
|
||||||
|
| `CENT_ML` | Cent-ML |
|
||||||
|
| `HUGGING_FACE` | HuggingFace |
|
||||||
|
| `HYPERBOLIC_2` | Hyperbolic 2 |
|
||||||
|
| `LEPTON` | Lepton |
|
||||||
|
| `LYNN_2` | Lynn 2 |
|
||||||
|
| `LYNN` | Lynn |
|
||||||
|
| `MANCER` | Mancer |
|
||||||
|
| `MODAL` | Modal |
|
||||||
|
| `OCTO_AI` | OctoAI |
|
||||||
|
| `RECURSAL` | Recursal |
|
||||||
|
| `REFLECTION` | Reflection |
|
||||||
|
| `REPLICATE` | Replicate |
|
||||||
|
| `SAMBA_NOVA_2` | SambaNova 2 |
|
||||||
|
| `SF_COMPUTE` | SF Compute |
|
||||||
|
| `TOGETHER_2` | Together 2 |
|
||||||
|
| `ONE_DOT_AI` | 01.AI |
|
||||||
|
| `AI21` | AI21 |
|
||||||
|
| `AION_LABS` | AionLabs |
|
||||||
|
| `ALIBABA` | Alibaba |
|
||||||
|
| `AMAZON_BEDROCK` | Amazon Bedrock |
|
||||||
|
| `ANTHROPIC` | Anthropic |
|
||||||
|
| `ATLAS_CLOUD` | AtlasCloud |
|
||||||
|
| `ATOMA` | Atoma |
|
||||||
|
| `AVIAN` | Avian |
|
||||||
|
| `AZURE` | Azure |
|
||||||
|
| `BASE_TEN` | BaseTen |
|
||||||
|
| `CEREBRAS` | Cerebras |
|
||||||
|
| `CHUTES` | Chutes |
|
||||||
|
| `CLOUDFLARE` | Cloudflare |
|
||||||
|
| `COHERE` | Cohere |
|
||||||
|
| `CROF_AI` | CrofAI |
|
||||||
|
| `CRUSOE` | Crusoe |
|
||||||
|
| `DEEP_INFRA` | DeepInfra |
|
||||||
|
| `DEEP_SEEK` | DeepSeek |
|
||||||
|
| `ENFER` | Enfer |
|
||||||
|
| `FEATHERLESS` | Featherless |
|
||||||
|
| `FIREWORKS` | Fireworks |
|
||||||
|
| `FRIENDLI` | Friendli |
|
||||||
|
| `GMI_CLOUD` | GMICloud |
|
||||||
|
| `GOOGLE` | Google |
|
||||||
|
| `GOOGLE_AI_STUDIO` | Google AI Studio |
|
||||||
|
| `GROQ` | Groq |
|
||||||
|
| `HYPERBOLIC` | Hyperbolic |
|
||||||
|
| `INCEPTION` | Inception |
|
||||||
|
| `INFERENCE_NET` | InferenceNet |
|
||||||
|
| `INFERMATIC` | Infermatic |
|
||||||
|
| `INFLECTION` | Inflection |
|
||||||
|
| `INO_CLOUD` | InoCloud |
|
||||||
|
| `KLUSTER` | Kluster |
|
||||||
|
| `LAMBDA` | Lambda |
|
||||||
|
| `LIQUID` | Liquid |
|
||||||
|
| `MANCER_2` | Mancer 2 |
|
||||||
|
| `META` | Meta |
|
||||||
|
| `MINIMAX` | Minimax |
|
||||||
|
| `MISTRAL` | Mistral |
|
||||||
|
| `MOONSHOT_AI` | Moonshot AI |
|
||||||
|
| `MORPH` | Morph |
|
||||||
|
| `N_COMPASS` | NCompass |
|
||||||
|
| `NEBIUS` | Nebius |
|
||||||
|
| `NEXT_BIT` | NextBit |
|
||||||
|
| `NINETEEN` | Nineteen |
|
||||||
|
| `NOVITA` | Novita |
|
||||||
|
| `OPEN_AI` | OpenAI |
|
||||||
|
| `OPEN_INFERENCE` | OpenInference |
|
||||||
|
| `PARASAIL` | Parasail |
|
||||||
|
| `PERPLEXITY` | Perplexity |
|
||||||
|
| `PHALA` | Phala |
|
||||||
|
| `SAMBA_NOVA` | SambaNova |
|
||||||
|
| `STEALTH` | Stealth |
|
||||||
|
| `SWITCHPOINT` | Switchpoint |
|
||||||
|
| `TARGON` | Targon |
|
||||||
|
| `TOGETHER` | Together |
|
||||||
|
| `UBICLOUD` | Ubicloud |
|
||||||
|
| `VENICE` | Venice |
|
||||||
|
| `WAND_B` | WandB |
|
||||||
|
| `X_AI` | xAI |
|
||||||
|
| `Z_AI` | Z.AI |
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsOrderUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsOrderEnum`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsOrderEnum = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsPdf
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `engine` | [Optional[models.ChatStreamCompletionCreateParamsPdfEngine]](../models/chatstreamcompletioncreateparamspdfengine.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsPdfEngine
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------- | ------------- |
|
||||||
|
| `MISTRAL_OCR` | mistral-ocr |
|
||||||
|
| `PDF_TEXT` | pdf-text |
|
||||||
|
| `NATIVE` | native |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsPluginChainOfThought
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `id` | [models.ChatStreamCompletionCreateParamsIDChainOfThought](../models/chatstreamcompletioncreateparamsidchainofthought.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsPluginFileParser
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `id` | [models.ChatStreamCompletionCreateParamsIDFileParser](../models/chatstreamcompletioncreateparamsidfileparser.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `max_files` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `pdf` | [Optional[models.ChatStreamCompletionCreateParamsPdf]](../models/chatstreamcompletioncreateparamspdf.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsPluginModeration
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `id` | [models.ChatStreamCompletionCreateParamsIDModeration](../models/chatstreamcompletioncreateparamsidmoderation.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsPluginUnion
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsPluginModeration`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsPluginModeration = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsPluginWeb`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsPluginWeb = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsPluginChainOfThought`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsPluginChainOfThought = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsPluginFileParser`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsPluginFileParser = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsPluginWeb
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `id` | [models.ChatStreamCompletionCreateParamsIDWeb](../models/chatstreamcompletioncreateparamsidweb.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
|
| `engine` | [Optional[models.ChatStreamCompletionCreateParamsEngine]](../models/chatstreamcompletioncreateparamsengine.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsPrompt
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `float`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: float = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Any`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: Any = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsProvider
|
||||||
|
|
||||||
|
When multiple model providers are available, optionally indicate your routing preference.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> |
|
||||||
|
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. |
|
||||||
|
| `data_collection` | [OptionalNullable[models.ChatStreamCompletionCreateParamsDataCollection]](../models/chatstreamcompletioncreateparamsdatacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/>- deny: use only providers which do not collect user data.<br/> |
|
||||||
|
| `order` | List[[models.ChatStreamCompletionCreateParamsOrderUnion](../models/chatstreamcompletioncreateparamsorderunion.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. |
|
||||||
|
| `only` | List[[models.ChatStreamCompletionCreateParamsOnlyUnion](../models/chatstreamcompletioncreateparamsonlyunion.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. |
|
||||||
|
| `ignore` | List[[models.ChatStreamCompletionCreateParamsIgnoreUnion](../models/chatstreamcompletioncreateparamsignoreunion.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. |
|
||||||
|
| `quantizations` | List[[models.ChatStreamCompletionCreateParamsQuantization](../models/chatstreamcompletioncreateparamsquantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. |
|
||||||
|
| `sort` | [OptionalNullable[models.ChatStreamCompletionCreateParamsSort]](../models/chatstreamcompletioncreateparamssort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. |
|
||||||
|
| `max_price` | [Optional[models.ChatStreamCompletionCreateParamsMaxPrice]](../models/chatstreamcompletioncreateparamsmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. |
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsQuantization
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| --------- | --------- |
|
||||||
|
| `INT4` | int4 |
|
||||||
|
| `INT8` | int8 |
|
||||||
|
| `FP4` | fp4 |
|
||||||
|
| `FP6` | fp6 |
|
||||||
|
| `FP8` | fp8 |
|
||||||
|
| `FP16` | fp16 |
|
||||||
|
| `BF16` | bf16 |
|
||||||
|
| `FP32` | fp32 |
|
||||||
|
| `UNKNOWN` | unknown |
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsReasoning
|
||||||
|
|
||||||
|
Reasoning configuration
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Enables reasoning with default settings. Only work for some models. |
|
||||||
|
| `effort` | [OptionalNullable[models.ChatStreamCompletionCreateParamsEffort]](../models/chatstreamcompletioncreateparamseffort.md) | :heavy_minus_sign: | OpenAI-style reasoning effort setting |
|
||||||
|
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | non-OpenAI-style reasoning effort setting |
|
||||||
|
| `exclude` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsReasoningEffort
|
||||||
|
|
||||||
|
Reasoning effort
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| --------- | --------- |
|
||||||
|
| `HIGH` | high |
|
||||||
|
| `MEDIUM` | medium |
|
||||||
|
| `LOW` | low |
|
||||||
|
| `MINIMAL` | minimal |
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsRequest
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `float`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: float = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Any`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: Any = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsResponseFormatGrammar
|
||||||
|
|
||||||
|
Custom grammar response format
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `type` | [models.ChatStreamCompletionCreateParamsTypeGrammar](../models/chatstreamcompletioncreateparamstypegrammar.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `grammar` | *str* | :heavy_check_mark: | Custom grammar for text generation |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsResponseFormatJSONObject
|
||||||
|
|
||||||
|
JSON object response format
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `type` | [models.ChatStreamCompletionCreateParamsTypeJSONObject](../models/chatstreamcompletioncreateparamstypejsonobject.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsResponseFormatJSONSchema
|
||||||
|
|
||||||
|
JSON Schema response format for structured outputs
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `type` | [models.ChatStreamCompletionCreateParamsTypeJSONSchema](../models/chatstreamcompletioncreateparamstypejsonschema.md) | :heavy_check_mark: | N/A |
|
||||||
|
| `json_schema` | [models.ChatStreamCompletionCreateParamsJSONSchema](../models/chatstreamcompletioncreateparamsjsonschema.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsResponseFormatPython
|
||||||
|
|
||||||
|
Python code response format
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `type` | [models.ChatStreamCompletionCreateParamsTypePython](../models/chatstreamcompletioncreateparamstypepython.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsResponseFormatText
|
||||||
|
|
||||||
|
Default text response format
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `type` | [models.ChatStreamCompletionCreateParamsTypeText](../models/chatstreamcompletioncreateparamstypetext.md) | :heavy_check_mark: | N/A |
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsResponseFormatUnion
|
||||||
|
|
||||||
|
Response format configuration
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsResponseFormatText`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsResponseFormatText = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsResponseFormatJSONObject`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsResponseFormatJSONObject = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsResponseFormatJSONSchema`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsResponseFormatJSONSchema = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsResponseFormatGrammar`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsResponseFormatGrammar = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `models.ChatStreamCompletionCreateParamsResponseFormatPython`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: models.ChatStreamCompletionCreateParamsResponseFormatPython = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsSort
|
||||||
|
|
||||||
|
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------ | ------------ |
|
||||||
|
| `PRICE` | price |
|
||||||
|
| `THROUGHPUT` | throughput |
|
||||||
|
| `LATENCY` | latency |
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsStop
|
||||||
|
|
||||||
|
Stop sequences (up to 4)
|
||||||
|
|
||||||
|
|
||||||
|
## Supported Types
|
||||||
|
|
||||||
|
### `str`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: str = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `List[str]`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: List[str] = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Any`
|
||||||
|
|
||||||
|
```python
|
||||||
|
value: Any = /* values here */
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsStreamOptions
|
||||||
|
|
||||||
|
Streaming configuration options
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
|
||||||
|
| `include_usage` | *Optional[bool]* | :heavy_minus_sign: | Include usage information in streaming response |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsTypeGrammar
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| --------- | --------- |
|
||||||
|
| `GRAMMAR` | grammar |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsTypeJSONObject
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------- | ------------- |
|
||||||
|
| `JSON_OBJECT` | json_object |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsTypeJSONSchema
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------------- | ------------- |
|
||||||
|
| `JSON_SCHEMA` | json_schema |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsTypePython
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------- | -------- |
|
||||||
|
| `PYTHON` | python |
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ChatStreamCompletionCreateParamsTypeText
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ------ | ------ |
|
||||||
|
| `TEXT` | text |
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# Ignore
|
|
||||||
|
|
||||||
|
|
||||||
## Supported Types
|
|
||||||
|
|
||||||
### `models.IgnoreEnum`
|
|
||||||
|
|
||||||
```python
|
|
||||||
value: models.IgnoreEnum = /* values here */
|
|
||||||
```
|
|
||||||
|
|
||||||
### `str`
|
|
||||||
|
|
||||||
```python
|
|
||||||
value: str = /* values here */
|
|
||||||
```
|
|
||||||
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# MaxPrice
|
|
||||||
|
|
||||||
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
|
|
||||||
| `prompt` | [Optional[models.Prompt]](../models/prompt.md) | :heavy_minus_sign: | N/A |
|
|
||||||
| `completion` | [Optional[models.Completion]](../models/completion.md) | :heavy_minus_sign: | N/A |
|
|
||||||
| `image` | [Optional[models.Image]](../models/image.md) | :heavy_minus_sign: | N/A |
|
|
||||||
| `audio` | [Optional[models.Audio]](../models/audio.md) | :heavy_minus_sign: | N/A |
|
|
||||||
| `request` | [Optional[models.Request]](../models/request.md) | :heavy_minus_sign: | N/A |
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user