@mistralai/mistralai 2.0.0-alpha.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -37
- package/RUNTIMES.md +1 -1
- package/esm/extra/structChat.d.ts.map +1 -1
- package/esm/extra/structChat.js +72 -5
- package/esm/extra/structChat.js.map +1 -1
- package/esm/funcs/audioSpeechComplete.d.ts +22 -0
- package/esm/funcs/audioSpeechComplete.d.ts.map +1 -0
- package/esm/funcs/audioSpeechComplete.js +88 -0
- package/esm/funcs/audioSpeechComplete.js.map +1 -0
- package/esm/funcs/audioVoicesCreate.d.ts +18 -0
- package/esm/funcs/audioVoicesCreate.d.ts.map +1 -0
- package/esm/funcs/audioVoicesCreate.js +83 -0
- package/esm/funcs/audioVoicesCreate.js.map +1 -0
- package/esm/funcs/audioVoicesDelete.d.ts +19 -0
- package/esm/funcs/audioVoicesDelete.d.ts.map +1 -0
- package/esm/funcs/audioVoicesDelete.js +90 -0
- package/esm/funcs/audioVoicesDelete.js.map +1 -0
- package/esm/funcs/audioVoicesGet.d.ts +19 -0
- package/esm/funcs/audioVoicesGet.d.ts.map +1 -0
- package/esm/funcs/audioVoicesGet.js +89 -0
- package/esm/funcs/audioVoicesGet.js.map +1 -0
- package/esm/funcs/audioVoicesGetSampleAudio.d.ts +18 -0
- package/esm/funcs/audioVoicesGetSampleAudio.d.ts.map +1 -0
- package/esm/funcs/audioVoicesGetSampleAudio.js +91 -0
- package/esm/funcs/audioVoicesGetSampleAudio.js.map +1 -0
- package/esm/funcs/audioVoicesList.d.ts +19 -0
- package/esm/funcs/audioVoicesList.d.ts.map +1 -0
- package/esm/funcs/audioVoicesList.js +89 -0
- package/esm/funcs/audioVoicesList.js.map +1 -0
- package/esm/funcs/audioVoicesUpdate.d.ts +19 -0
- package/esm/funcs/audioVoicesUpdate.d.ts.map +1 -0
- package/esm/funcs/audioVoicesUpdate.js +93 -0
- package/esm/funcs/audioVoicesUpdate.js.map +1 -0
- package/esm/funcs/betaConnectorsGetAuthUrl.d.ts +19 -0
- package/esm/funcs/betaConnectorsGetAuthUrl.d.ts.map +1 -0
- package/esm/funcs/betaConnectorsGetAuthUrl.js +90 -0
- package/esm/funcs/betaConnectorsGetAuthUrl.js.map +1 -0
- package/esm/funcs/betaObservabilityJudgesJudgeConversation.d.ts +16 -0
- package/esm/funcs/betaObservabilityJudgesJudgeConversation.d.ts.map +1 -0
- package/esm/funcs/betaObservabilityJudgesJudgeConversation.js +91 -0
- package/esm/funcs/betaObservabilityJudgesJudgeConversation.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/config.js.map +1 -1
- package/esm/models/components/agent.d.ts +28 -5
- package/esm/models/components/agent.d.ts.map +1 -1
- package/esm/models/components/agent.js +14 -13
- package/esm/models/components/agent.js.map +1 -1
- package/esm/models/components/agentconversation.d.ts +2 -3
- package/esm/models/components/agentconversation.d.ts.map +1 -1
- package/esm/models/components/agentconversation.js +2 -1
- package/esm/models/components/agentconversation.js.map +1 -1
- package/esm/models/components/agentscompletionrequest.d.ts +28 -2
- package/esm/models/components/agentscompletionrequest.d.ts.map +1 -1
- package/esm/models/components/agentscompletionrequest.js +66 -13
- package/esm/models/components/agentscompletionrequest.js.map +1 -1
- package/esm/models/components/agentscompletionstreamrequest.d.ts +28 -2
- package/esm/models/components/agentscompletionstreamrequest.d.ts.map +1 -1
- package/esm/models/components/agentscompletionstreamrequest.js +66 -13
- package/esm/models/components/agentscompletionstreamrequest.js.map +1 -1
- package/esm/models/components/authurlresponse.d.ts +11 -0
- package/esm/models/components/authurlresponse.d.ts.map +1 -0
- package/esm/models/components/authurlresponse.js +20 -0
- package/esm/models/components/authurlresponse.js.map +1 -0
- package/esm/models/components/basefielddefinition.d.ts +4 -4
- package/esm/models/components/basefielddefinition.d.ts.map +1 -1
- package/esm/models/components/basefielddefinition.js +3 -4
- package/esm/models/components/basefielddefinition.js.map +1 -1
- package/esm/models/components/basemodelcard.d.ts +6 -0
- package/esm/models/components/basemodelcard.d.ts.map +1 -1
- package/esm/models/components/basemodelcard.js.map +1 -1
- package/esm/models/components/chatcompletionrequest.d.ts +31 -2
- package/esm/models/components/chatcompletionrequest.d.ts.map +1 -1
- package/esm/models/components/chatcompletionrequest.js +67 -14
- package/esm/models/components/chatcompletionrequest.js.map +1 -1
- package/esm/models/components/chatcompletionstreamrequest.d.ts +31 -2
- package/esm/models/components/chatcompletionstreamrequest.d.ts.map +1 -1
- package/esm/models/components/chatcompletionstreamrequest.js +67 -14
- package/esm/models/components/chatcompletionstreamrequest.js.map +1 -1
- package/esm/models/components/codeinterpretertool.d.ts +11 -2
- package/esm/models/components/codeinterpretertool.d.ts.map +1 -1
- package/esm/models/components/codeinterpretertool.js +9 -2
- package/esm/models/components/codeinterpretertool.js.map +1 -1
- package/esm/models/components/completionargs.d.ts +3 -0
- package/esm/models/components/completionargs.d.ts.map +1 -1
- package/esm/models/components/completionargs.js +5 -0
- package/esm/models/components/completionargs.js.map +1 -1
- package/esm/models/components/conversationrequest.d.ts +55 -10
- package/esm/models/components/conversationrequest.d.ts.map +1 -1
- package/esm/models/components/conversationrequest.js +14 -13
- package/esm/models/components/conversationrequest.js.map +1 -1
- package/esm/models/components/conversationresponse.d.ts +3 -5
- package/esm/models/components/conversationresponse.d.ts.map +1 -1
- package/esm/models/components/conversationresponse.js +1 -7
- package/esm/models/components/conversationresponse.js.map +1 -1
- package/esm/models/components/conversationrestartrequest.d.ts +3 -6
- package/esm/models/components/conversationrestartrequest.d.ts.map +1 -1
- package/esm/models/components/conversationrestartrequest.js +2 -1
- package/esm/models/components/conversationrestartrequest.js.map +1 -1
- package/esm/models/components/conversationrestartstreamrequest.d.ts +3 -6
- package/esm/models/components/conversationrestartstreamrequest.d.ts.map +1 -1
- package/esm/models/components/conversationrestartstreamrequest.js +2 -1
- package/esm/models/components/conversationrestartstreamrequest.js.map +1 -1
- package/esm/models/components/conversationstreamrequest.d.ts +55 -10
- package/esm/models/components/conversationstreamrequest.d.ts.map +1 -1
- package/esm/models/components/conversationstreamrequest.js +14 -13
- package/esm/models/components/conversationstreamrequest.js.map +1 -1
- package/esm/models/components/createagentrequest.d.ts +55 -10
- package/esm/models/components/createagentrequest.d.ts.map +1 -1
- package/esm/models/components/createagentrequest.js +14 -13
- package/esm/models/components/createagentrequest.js.map +1 -1
- package/esm/models/components/customconnector.d.ts +11 -2
- package/esm/models/components/customconnector.d.ts.map +1 -1
- package/esm/models/components/customconnector.js +9 -2
- package/esm/models/components/customconnector.js.map +1 -1
- package/esm/models/components/documentlibrarytool.d.ts +11 -2
- package/esm/models/components/documentlibrarytool.d.ts.map +1 -1
- package/esm/models/components/documentlibrarytool.js +9 -2
- package/esm/models/components/documentlibrarytool.js.map +1 -1
- package/esm/models/components/ftmodelcard.d.ts +6 -0
- package/esm/models/components/ftmodelcard.d.ts.map +1 -1
- package/esm/models/components/ftmodelcard.js.map +1 -1
- package/esm/models/components/imagegenerationtool.d.ts +11 -2
- package/esm/models/components/imagegenerationtool.d.ts.map +1 -1
- package/esm/models/components/imagegenerationtool.js +9 -2
- package/esm/models/components/imagegenerationtool.js.map +1 -1
- package/esm/models/components/imageurlchunk.d.ts +1 -1
- package/esm/models/components/index.d.ts +20 -0
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +20 -0
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/instructrequest.d.ts +3 -0
- package/esm/models/components/instructrequest.d.ts.map +1 -1
- package/esm/models/components/instructrequest.js.map +1 -1
- package/esm/models/components/internalmetadata.d.ts +42 -0
- package/esm/models/components/internalmetadata.d.ts.map +1 -0
- package/esm/models/components/internalmetadata.js +56 -0
- package/esm/models/components/internalmetadata.js.map +1 -0
- package/esm/models/components/judgeconversationrequest.d.ts +22 -0
- package/esm/models/components/judgeconversationrequest.d.ts.map +1 -0
- package/esm/models/components/judgeconversationrequest.js +14 -0
- package/esm/models/components/judgeconversationrequest.js.map +1 -0
- package/esm/models/components/messagetokens.d.ts +17 -0
- package/esm/models/components/messagetokens.d.ts.map +1 -0
- package/esm/models/components/messagetokens.js +25 -0
- package/esm/models/components/messagetokens.js.map +1 -0
- package/esm/models/components/metadatadict.d.ts +23 -0
- package/esm/models/components/metadatadict.d.ts.map +1 -0
- package/esm/models/components/metadatadict.js +23 -0
- package/esm/models/components/metadatadict.js.map +1 -0
- package/esm/models/components/mirrorconfig.d.ts +24 -0
- package/esm/models/components/mirrorconfig.d.ts.map +1 -0
- package/esm/models/components/mirrorconfig.js +32 -0
- package/esm/models/components/mirrorconfig.js.map +1 -0
- package/esm/models/components/mirrorsource.d.ts +28 -0
- package/esm/models/components/mirrorsource.d.ts.map +1 -0
- package/esm/models/components/mirrorsource.js +43 -0
- package/esm/models/components/mirrorsource.js.map +1 -0
- package/esm/models/components/modelcapabilities.d.ts +9 -0
- package/esm/models/components/modelcapabilities.d.ts.map +1 -1
- package/esm/models/components/modelcapabilities.js +5 -0
- package/esm/models/components/modelcapabilities.js.map +1 -1
- package/esm/models/components/modelconversation.d.ts +28 -5
- package/esm/models/components/modelconversation.d.ts.map +1 -1
- package/esm/models/components/modelconversation.js +14 -13
- package/esm/models/components/modelconversation.js.map +1 -1
- package/esm/models/components/prompttokensdetails.d.ts +15 -0
- package/esm/models/components/prompttokensdetails.d.ts.map +1 -0
- package/esm/models/components/prompttokensdetails.js +21 -0
- package/esm/models/components/prompttokensdetails.js.map +1 -0
- package/esm/models/components/reasoningeffort.d.ts +12 -0
- package/esm/models/components/reasoningeffort.d.ts.map +1 -0
- package/esm/models/components/reasoningeffort.js +14 -0
- package/esm/models/components/reasoningeffort.js.map +1 -0
- package/esm/models/components/referencechunk.d.ts +11 -2
- package/esm/models/components/referencechunk.d.ts.map +1 -1
- package/esm/models/components/referencechunk.js +13 -2
- package/esm/models/components/referencechunk.js.map +1 -1
- package/esm/models/components/roles.d.ts +12 -0
- package/esm/models/components/roles.d.ts.map +1 -0
- package/esm/models/components/roles.js +15 -0
- package/esm/models/components/roles.js.map +1 -0
- package/esm/models/components/speechoutputformat.d.ts +13 -0
- package/esm/models/components/speechoutputformat.d.ts.map +1 -0
- package/esm/models/components/speechoutputformat.js +15 -0
- package/esm/models/components/speechoutputformat.js.map +1 -0
- package/esm/models/components/speechrequest.d.ts +37 -0
- package/esm/models/components/speechrequest.d.ts.map +1 -0
- package/esm/models/components/speechrequest.js +30 -0
- package/esm/models/components/speechrequest.js.map +1 -0
- package/esm/models/components/speechstreamaudiodelta.d.ts +11 -0
- package/esm/models/components/speechstreamaudiodelta.d.ts.map +1 -0
- package/esm/models/components/speechstreamaudiodelta.js +20 -0
- package/esm/models/components/speechstreamaudiodelta.js.map +1 -0
- package/esm/models/components/speechstreamdone.d.ts +12 -0
- package/esm/models/components/speechstreamdone.d.ts.map +1 -0
- package/esm/models/components/speechstreamdone.js +16 -0
- package/esm/models/components/speechstreamdone.js.map +1 -0
- package/esm/models/components/speechstreameventtypes.d.ts +10 -0
- package/esm/models/components/speechstreameventtypes.d.ts.map +1 -0
- package/esm/models/components/speechstreameventtypes.js +12 -0
- package/esm/models/components/speechstreameventtypes.js.map +1 -0
- package/esm/models/components/updateagentrequest.d.ts +55 -10
- package/esm/models/components/updateagentrequest.d.ts.map +1 -1
- package/esm/models/components/updateagentrequest.js +14 -13
- package/esm/models/components/updateagentrequest.js.map +1 -1
- package/esm/models/components/usageinfodollardefs.d.ts +18 -0
- package/esm/models/components/usageinfodollardefs.d.ts.map +1 -0
- package/esm/models/components/usageinfodollardefs.js +36 -0
- package/esm/models/components/usageinfodollardefs.js.map +1 -0
- package/esm/models/components/voicecreaterequest.d.ts +39 -0
- package/esm/models/components/voicecreaterequest.d.ts.map +1 -0
- package/esm/models/components/voicecreaterequest.js +29 -0
- package/esm/models/components/voicecreaterequest.js.map +1 -0
- package/esm/models/components/voicelistresponse.d.ts +18 -0
- package/esm/models/components/voicelistresponse.d.ts.map +1 -0
- package/esm/models/components/voicelistresponse.js +25 -0
- package/esm/models/components/voicelistresponse.js.map +1 -0
- package/esm/models/components/voiceresponse.d.ts +23 -0
- package/esm/models/components/voiceresponse.d.ts.map +1 -0
- package/esm/models/components/voiceresponse.js +32 -0
- package/esm/models/components/voiceresponse.js.map +1 -0
- package/esm/models/components/voiceupdaterequest.d.ts +23 -0
- package/esm/models/components/voiceupdaterequest.d.ts.map +1 -0
- package/esm/models/components/voiceupdaterequest.js +17 -0
- package/esm/models/components/voiceupdaterequest.js.map +1 -0
- package/esm/models/components/websearchpremiumtool.d.ts +11 -2
- package/esm/models/components/websearchpremiumtool.d.ts.map +1 -1
- package/esm/models/components/websearchpremiumtool.js +9 -2
- package/esm/models/components/websearchpremiumtool.js.map +1 -1
- package/esm/models/components/websearchtool.d.ts +11 -2
- package/esm/models/components/websearchtool.d.ts.map +1 -1
- package/esm/models/components/websearchtool.js +9 -2
- package/esm/models/components/websearchtool.js.map +1 -1
- package/esm/models/operations/connectorgetauthurlv1.d.ts +14 -0
- package/esm/models/operations/connectorgetauthurlv1.d.ts.map +1 -0
- package/esm/models/operations/connectorgetauthurlv1.js +20 -0
- package/esm/models/operations/connectorgetauthurlv1.js.map +1 -0
- package/esm/models/operations/deletevoicev1audiovoicesvoiceiddelete.d.ts +12 -0
- package/esm/models/operations/deletevoicev1audiovoicesvoiceiddelete.d.ts.map +1 -0
- package/esm/models/operations/deletevoicev1audiovoicesvoiceiddelete.js +18 -0
- package/esm/models/operations/deletevoicev1audiovoicesvoiceiddelete.js.map +1 -0
- package/esm/models/operations/getvoicesampleaudiov1audiovoicesvoiceidsampleget.d.ts +12 -0
- package/esm/models/operations/getvoicesampleaudiov1audiovoicesvoiceidsampleget.d.ts.map +1 -0
- package/esm/models/operations/getvoicesampleaudiov1audiovoicesvoiceidsampleget.js +19 -0
- package/esm/models/operations/getvoicesampleaudiov1audiovoicesvoiceidsampleget.js.map +1 -0
- package/esm/models/operations/getvoicev1audiovoicesvoiceidget.d.ts +12 -0
- package/esm/models/operations/getvoicev1audiovoicesvoiceidget.d.ts.map +1 -0
- package/esm/models/operations/getvoicev1audiovoicesvoiceidget.js +18 -0
- package/esm/models/operations/getvoicev1audiovoicesvoiceidget.js.map +1 -0
- package/esm/models/operations/index.d.ts +8 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +8 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/judgeconversationv1observabilityjudgesjudgeidlivejudgingpost.d.ts +15 -0
- package/esm/models/operations/judgeconversationv1observabilityjudgesjudgeidlivejudgingpost.d.ts.map +1 -0
- package/esm/models/operations/judgeconversationv1observabilityjudgesjudgeidlivejudgingpost.js +22 -0
- package/esm/models/operations/judgeconversationv1observabilityjudgesjudgeidlivejudgingpost.js.map +1 -0
- package/esm/models/operations/listvoicesv1audiovoicesget.d.ts +20 -0
- package/esm/models/operations/listvoicesv1audiovoicesget.d.ts.map +1 -0
- package/esm/models/operations/listvoicesv1audiovoicesget.js +14 -0
- package/esm/models/operations/listvoicesv1audiovoicesget.js.map +1 -0
- package/esm/models/operations/speechv1audiospeechpost.d.ts +37 -0
- package/esm/models/operations/speechv1audiospeechpost.d.ts.map +1 -0
- package/esm/models/operations/speechv1audiospeechpost.js +70 -0
- package/esm/models/operations/speechv1audiospeechpost.js.map +1 -0
- package/esm/models/operations/updatevoicev1audiovoicesvoiceidpatch.d.ts +15 -0
- package/esm/models/operations/updatevoicev1audiovoicesvoiceidpatch.d.ts.map +1 -0
- package/esm/models/operations/updatevoicev1audiovoicesvoiceidpatch.js +21 -0
- package/esm/models/operations/updatevoicev1audiovoicesvoiceidpatch.js.map +1 -0
- package/esm/sdk/audio.d.ts +6 -0
- package/esm/sdk/audio.d.ts.map +1 -1
- package/esm/sdk/audio.js +10 -0
- package/esm/sdk/audio.js.map +1 -1
- package/esm/sdk/connectors.d.ts +7 -0
- package/esm/sdk/connectors.d.ts.map +1 -1
- package/esm/sdk/connectors.js +10 -0
- package/esm/sdk/connectors.js.map +1 -1
- package/esm/sdk/judges.d.ts +4 -0
- package/esm/sdk/judges.d.ts.map +1 -1
- package/esm/sdk/judges.js +7 -0
- package/esm/sdk/judges.js.map +1 -1
- package/esm/sdk/sdk.d.ts +2 -2
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +4 -4
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/speech.d.ts +14 -0
- package/esm/sdk/speech.d.ts.map +1 -0
- package/esm/sdk/speech.js +17 -0
- package/esm/sdk/speech.js.map +1 -0
- package/esm/sdk/voices.d.ts +48 -0
- package/esm/sdk/voices.d.ts.map +1 -0
- package/esm/sdk/voices.js +69 -0
- package/esm/sdk/voices.js.map +1 -0
- package/examples/src/gcp/async_chat_no_streaming.ts +2 -2
- package/jsr.json +1 -1
- package/package.json +8 -3
- package/packages/mistralai-gcp/examples/chatComplete.example.ts +3 -3
- package/packages/mistralai-gcp/src/core.ts +1 -1
- package/packages/mistralai-gcp/src/funcs/chatComplete.ts +7 -7
- package/packages/mistralai-gcp/src/funcs/chatStream.ts +7 -7
- package/packages/mistralai-gcp/src/funcs/fimComplete.ts +7 -7
- package/packages/mistralai-gcp/src/funcs/fimStream.ts +7 -7
- package/packages/mistralai-gcp/src/models/errors/httpvalidationerror.ts +2 -2
- package/packages/mistralai-gcp/src/models/errors/mistralgoogleclouderror.ts +2 -2
- package/packages/mistralai-gcp/src/models/errors/responsevalidationerror.ts +2 -2
- package/packages/mistralai-gcp/src/models/errors/sdkerror.ts +2 -2
- package/packages/mistralai-gcp/src/sdk/sdk.ts +6 -5
- package/src/extra/structChat.ts +71 -5
- package/src/funcs/audioSpeechComplete.ts +175 -0
- package/src/funcs/audioVoicesCreate.ts +170 -0
- package/src/funcs/audioVoicesDelete.ts +179 -0
- package/src/funcs/audioVoicesGet.ts +180 -0
- package/src/funcs/audioVoicesGetSampleAudio.ts +180 -0
- package/src/funcs/audioVoicesList.ts +178 -0
- package/src/funcs/audioVoicesUpdate.ts +182 -0
- package/src/funcs/betaConnectorsGetAuthUrl.ts +186 -0
- package/src/funcs/betaObservabilityJudgesJudgeConversation.ts +188 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/agent.ts +51 -26
- package/src/models/components/agentconversation.ts +3 -2
- package/src/models/components/agentscompletionrequest.ts +201 -15
- package/src/models/components/agentscompletionstreamrequest.ts +201 -15
- package/src/models/components/authurlresponse.ts +38 -0
- package/src/models/components/basefielddefinition.ts +8 -6
- package/src/models/components/basemodelcard.ts +6 -0
- package/src/models/components/chatcompletionrequest.ts +205 -16
- package/src/models/components/chatcompletionstreamrequest.ts +205 -16
- package/src/models/components/codeinterpretertool.ts +21 -4
- package/src/models/components/completionargs.ts +11 -0
- package/src/models/components/conversationrequest.ts +66 -39
- package/src/models/components/conversationresponse.ts +2 -20
- package/src/models/components/conversationrestartrequest.ts +8 -3
- package/src/models/components/conversationrestartstreamrequest.ts +8 -3
- package/src/models/components/conversationstreamrequest.ts +66 -39
- package/src/models/components/createagentrequest.ts +66 -39
- package/src/models/components/customconnector.ts +19 -4
- package/src/models/components/documentlibrarytool.ts +21 -4
- package/src/models/components/ftmodelcard.ts +6 -0
- package/src/models/components/imagegenerationtool.ts +21 -4
- package/src/models/components/imageurlchunk.ts +1 -1
- package/src/models/components/index.ts +20 -0
- package/src/models/components/instructrequest.ts +3 -0
- package/src/models/components/internalmetadata.ts +126 -0
- package/src/models/components/judgeconversationrequest.ts +34 -0
- package/src/models/components/messagetokens.ts +45 -0
- package/src/models/components/metadatadict.ts +55 -0
- package/src/models/components/mirrorconfig.ts +65 -0
- package/src/models/components/mirrorsource.ts +76 -0
- package/src/models/components/modelcapabilities.ts +14 -0
- package/src/models/components/modelconversation.ts +51 -26
- package/src/models/components/prompttokensdetails.ts +42 -0
- package/src/models/components/reasoningeffort.ts +25 -0
- package/src/models/components/referencechunk.ts +32 -4
- package/src/models/components/roles.ts +20 -0
- package/src/models/components/speechoutputformat.ts +21 -0
- package/src/models/components/speechrequest.ts +74 -0
- package/src/models/components/speechstreamaudiodelta.ts +38 -0
- package/src/models/components/speechstreamdone.ts +37 -0
- package/src/models/components/speechstreameventtypes.ts +20 -0
- package/src/models/components/updateagentrequest.ts +66 -39
- package/src/models/components/usageinfodollardefs.ts +63 -0
- package/src/models/components/voicecreaterequest.ts +74 -0
- package/src/models/components/voicelistresponse.ts +49 -0
- package/src/models/components/voiceresponse.ts +59 -0
- package/src/models/components/voiceupdaterequest.ts +46 -0
- package/src/models/components/websearchpremiumtool.ts +21 -4
- package/src/models/components/websearchtool.ts +19 -4
- package/src/models/operations/connectorgetauthurlv1.ts +42 -0
- package/src/models/operations/deletevoicev1audiovoicesvoiceiddelete.ts +40 -0
- package/src/models/operations/getvoicesampleaudiov1audiovoicesvoiceidsampleget.ts +39 -0
- package/src/models/operations/getvoicev1audiovoicesvoiceidget.ts +39 -0
- package/src/models/operations/index.ts +8 -0
- package/src/models/operations/judgeconversationv1observabilityjudgesjudgeidlivejudgingpost.ts +49 -0
- package/src/models/operations/listvoicesv1audiovoicesget.ts +42 -0
- package/src/models/operations/speechv1audiospeechpost.ts +146 -0
- package/src/models/operations/updatevoicev1audiovoicesvoiceidpatch.ts +45 -0
- package/src/sdk/audio.ts +12 -0
- package/src/sdk/connectors.ts +18 -0
- package/src/sdk/judges.ts +16 -0
- package/src/sdk/sdk.ts +5 -5
- package/src/sdk/speech.ts +31 -0
- package/src/sdk/voices.ts +119 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: e56d14b1a3f2
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import { Roles, Roles$inboundSchema } from "./roles.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Information on a single message included in a tokenized prompt as part of an InstructRequest.
|
|
15
|
+
*/
|
|
16
|
+
export type MessageTokens = {
|
|
17
|
+
role: Roles;
|
|
18
|
+
totalTokens?: number | null | undefined;
|
|
19
|
+
truncated: boolean;
|
|
20
|
+
usageCount: number;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const MessageTokens$inboundSchema: z.ZodType<MessageTokens, unknown> = z
|
|
25
|
+
.object({
|
|
26
|
+
role: Roles$inboundSchema,
|
|
27
|
+
total_tokens: z.nullable(z.int()).optional(),
|
|
28
|
+
truncated: z.boolean().default(false),
|
|
29
|
+
usage_count: z.int().default(1),
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"total_tokens": "totalTokens",
|
|
33
|
+
"usage_count": "usageCount",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function messageTokensFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<MessageTokens, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => MessageTokens$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'MessageTokens' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a8e91799a548
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
InternalMetadata,
|
|
12
|
+
InternalMetadata$inboundSchema,
|
|
13
|
+
InternalMetadata$Outbound,
|
|
14
|
+
InternalMetadata$outboundSchema,
|
|
15
|
+
} from "./internalmetadata.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Custom type for metadata with embedded validation.
|
|
19
|
+
*/
|
|
20
|
+
export type MetadataDict = {
|
|
21
|
+
internal?: InternalMetadata | null | undefined;
|
|
22
|
+
[additionalProperties: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const MetadataDict$inboundSchema: z.ZodType<MetadataDict, unknown> = z
|
|
27
|
+
.object({
|
|
28
|
+
internal: z.nullable(InternalMetadata$inboundSchema).optional(),
|
|
29
|
+
}).catchall(z.any());
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type MetadataDict$Outbound = {
|
|
32
|
+
internal?: InternalMetadata$Outbound | null | undefined;
|
|
33
|
+
[additionalProperties: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const MetadataDict$outboundSchema: z.ZodType<
|
|
38
|
+
MetadataDict$Outbound,
|
|
39
|
+
MetadataDict
|
|
40
|
+
> = z.object({
|
|
41
|
+
internal: z.nullable(InternalMetadata$outboundSchema).optional(),
|
|
42
|
+
}).catchall(z.any());
|
|
43
|
+
|
|
44
|
+
export function metadataDictToJSON(metadataDict: MetadataDict): string {
|
|
45
|
+
return JSON.stringify(MetadataDict$outboundSchema.parse(metadataDict));
|
|
46
|
+
}
|
|
47
|
+
export function metadataDictFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<MetadataDict, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) => MetadataDict$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'MetadataDict' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: c8c262460c15
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
MirrorSource,
|
|
13
|
+
MirrorSource$inboundSchema,
|
|
14
|
+
MirrorSource$Outbound,
|
|
15
|
+
MirrorSource$outboundSchema,
|
|
16
|
+
} from "./mirrorsource.js";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Configuration for mirroring behavior.
|
|
20
|
+
*/
|
|
21
|
+
export type MirrorConfig = {
|
|
22
|
+
/**
|
|
23
|
+
* Source information for mirrored requests.
|
|
24
|
+
*/
|
|
25
|
+
mirrorSource: MirrorSource;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const MirrorConfig$inboundSchema: z.ZodType<MirrorConfig, unknown> = z
|
|
30
|
+
.object({
|
|
31
|
+
mirror_source: MirrorSource$inboundSchema,
|
|
32
|
+
}).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"mirror_source": "mirrorSource",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type MirrorConfig$Outbound = {
|
|
39
|
+
mirror_source: MirrorSource$Outbound;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const MirrorConfig$outboundSchema: z.ZodType<
|
|
44
|
+
MirrorConfig$Outbound,
|
|
45
|
+
MirrorConfig
|
|
46
|
+
> = z.object({
|
|
47
|
+
mirrorSource: MirrorSource$outboundSchema,
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
mirrorSource: "mirror_source",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export function mirrorConfigToJSON(mirrorConfig: MirrorConfig): string {
|
|
55
|
+
return JSON.stringify(MirrorConfig$outboundSchema.parse(mirrorConfig));
|
|
56
|
+
}
|
|
57
|
+
export function mirrorConfigFromJSON(
|
|
58
|
+
jsonString: string,
|
|
59
|
+
): SafeParseResult<MirrorConfig, SDKValidationError> {
|
|
60
|
+
return safeParse(
|
|
61
|
+
jsonString,
|
|
62
|
+
(x) => MirrorConfig$inboundSchema.parse(JSON.parse(x)),
|
|
63
|
+
`Failed to parse 'MirrorConfig' from JSON`,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 3bd93f177873
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Source information for mirrored requests.
|
|
14
|
+
*/
|
|
15
|
+
export type MirrorSource = {
|
|
16
|
+
app: string;
|
|
17
|
+
version?: string | null | undefined;
|
|
18
|
+
rootModelName: string;
|
|
19
|
+
mirrorModelName: string;
|
|
20
|
+
experimentId?: string | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const MirrorSource$inboundSchema: z.ZodType<MirrorSource, unknown> = z
|
|
25
|
+
.object({
|
|
26
|
+
app: z.string(),
|
|
27
|
+
version: z.nullable(z.string()).optional(),
|
|
28
|
+
root_model_name: z.string(),
|
|
29
|
+
mirror_model_name: z.string(),
|
|
30
|
+
experiment_id: z.nullable(z.string()).optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"root_model_name": "rootModelName",
|
|
34
|
+
"mirror_model_name": "mirrorModelName",
|
|
35
|
+
"experiment_id": "experimentId",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type MirrorSource$Outbound = {
|
|
40
|
+
app: string;
|
|
41
|
+
version?: string | null | undefined;
|
|
42
|
+
root_model_name: string;
|
|
43
|
+
mirror_model_name: string;
|
|
44
|
+
experiment_id?: string | null | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const MirrorSource$outboundSchema: z.ZodType<
|
|
49
|
+
MirrorSource$Outbound,
|
|
50
|
+
MirrorSource
|
|
51
|
+
> = z.object({
|
|
52
|
+
app: z.string(),
|
|
53
|
+
version: z.nullable(z.string()).optional(),
|
|
54
|
+
rootModelName: z.string(),
|
|
55
|
+
mirrorModelName: z.string(),
|
|
56
|
+
experimentId: z.nullable(z.string()).optional(),
|
|
57
|
+
}).transform((v) => {
|
|
58
|
+
return remap$(v, {
|
|
59
|
+
rootModelName: "root_model_name",
|
|
60
|
+
mirrorModelName: "mirror_model_name",
|
|
61
|
+
experimentId: "experiment_id",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export function mirrorSourceToJSON(mirrorSource: MirrorSource): string {
|
|
66
|
+
return JSON.stringify(MirrorSource$outboundSchema.parse(mirrorSource));
|
|
67
|
+
}
|
|
68
|
+
export function mirrorSourceFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<MirrorSource, SDKValidationError> {
|
|
71
|
+
return safeParse(
|
|
72
|
+
jsonString,
|
|
73
|
+
(x) => MirrorSource$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'MirrorSource' from JSON`,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -9,9 +9,16 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* This is populated by Harmattan, but some fields have a name
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* that we don't want to expose in the API.
|
|
17
|
+
*/
|
|
12
18
|
export type ModelCapabilities = {
|
|
13
19
|
completionChat: boolean;
|
|
14
20
|
functionCalling: boolean;
|
|
21
|
+
reasoning: boolean;
|
|
15
22
|
completionFim: boolean;
|
|
16
23
|
fineTuning: boolean;
|
|
17
24
|
vision: boolean;
|
|
@@ -20,6 +27,8 @@ export type ModelCapabilities = {
|
|
|
20
27
|
moderation: boolean;
|
|
21
28
|
audio: boolean;
|
|
22
29
|
audioTranscription: boolean;
|
|
30
|
+
audioTranscriptionRealtime: boolean;
|
|
31
|
+
audioSpeech: boolean;
|
|
23
32
|
};
|
|
24
33
|
|
|
25
34
|
/** @internal */
|
|
@@ -29,6 +38,7 @@ export const ModelCapabilities$inboundSchema: z.ZodType<
|
|
|
29
38
|
> = z.object({
|
|
30
39
|
completion_chat: z.boolean().default(false),
|
|
31
40
|
function_calling: z.boolean().default(false),
|
|
41
|
+
reasoning: z.boolean().default(false),
|
|
32
42
|
completion_fim: z.boolean().default(false),
|
|
33
43
|
fine_tuning: z.boolean().default(false),
|
|
34
44
|
vision: z.boolean().default(false),
|
|
@@ -37,6 +47,8 @@ export const ModelCapabilities$inboundSchema: z.ZodType<
|
|
|
37
47
|
moderation: z.boolean().default(false),
|
|
38
48
|
audio: z.boolean().default(false),
|
|
39
49
|
audio_transcription: z.boolean().default(false),
|
|
50
|
+
audio_transcription_realtime: z.boolean().default(false),
|
|
51
|
+
audio_speech: z.boolean().default(false),
|
|
40
52
|
}).transform((v) => {
|
|
41
53
|
return remap$(v, {
|
|
42
54
|
"completion_chat": "completionChat",
|
|
@@ -44,6 +56,8 @@ export const ModelCapabilities$inboundSchema: z.ZodType<
|
|
|
44
56
|
"completion_fim": "completionFim",
|
|
45
57
|
"fine_tuning": "fineTuning",
|
|
46
58
|
"audio_transcription": "audioTranscription",
|
|
59
|
+
"audio_transcription_realtime": "audioTranscriptionRealtime",
|
|
60
|
+
"audio_speech": "audioSpeech",
|
|
47
61
|
});
|
|
48
62
|
});
|
|
49
63
|
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
ImageGenerationTool,
|
|
36
36
|
ImageGenerationTool$inboundSchema,
|
|
37
37
|
} from "./imagegenerationtool.js";
|
|
38
|
+
import { MetadataDict, MetadataDict$inboundSchema } from "./metadatadict.js";
|
|
38
39
|
import {
|
|
39
40
|
WebSearchPremiumTool,
|
|
40
41
|
WebSearchPremiumTool$inboundSchema,
|
|
@@ -42,13 +43,13 @@ import {
|
|
|
42
43
|
import { WebSearchTool, WebSearchTool$inboundSchema } from "./websearchtool.js";
|
|
43
44
|
|
|
44
45
|
export type ModelConversationTool =
|
|
45
|
-
| CodeInterpreterTool
|
|
46
|
-
| CustomConnector
|
|
47
|
-
| DocumentLibraryTool
|
|
46
|
+
| (CodeInterpreterTool & { type: "code_interpreter" })
|
|
47
|
+
| (CustomConnector & { type: "connector" })
|
|
48
|
+
| (DocumentLibraryTool & { type: "document_library" })
|
|
48
49
|
| FunctionTool
|
|
49
|
-
| ImageGenerationTool
|
|
50
|
-
| WebSearchTool
|
|
51
|
-
| WebSearchPremiumTool
|
|
50
|
+
| (ImageGenerationTool & { type: "image_generation" })
|
|
51
|
+
| (WebSearchTool & { type: "web_search" })
|
|
52
|
+
| (WebSearchPremiumTool & { type: "web_search_premium" })
|
|
52
53
|
| discriminatedUnionTypes.Unknown<"type">;
|
|
53
54
|
|
|
54
55
|
export type ModelConversation = {
|
|
@@ -61,13 +62,13 @@ export type ModelConversation = {
|
|
|
61
62
|
*/
|
|
62
63
|
tools?:
|
|
63
64
|
| Array<
|
|
64
|
-
| CodeInterpreterTool
|
|
65
|
-
| CustomConnector
|
|
66
|
-
| DocumentLibraryTool
|
|
65
|
+
| (CodeInterpreterTool & { type: "code_interpreter" })
|
|
66
|
+
| (CustomConnector & { type: "connector" })
|
|
67
|
+
| (DocumentLibraryTool & { type: "document_library" })
|
|
67
68
|
| FunctionTool
|
|
68
|
-
| ImageGenerationTool
|
|
69
|
-
| WebSearchTool
|
|
70
|
-
| WebSearchPremiumTool
|
|
69
|
+
| (ImageGenerationTool & { type: "image_generation" })
|
|
70
|
+
| (WebSearchTool & { type: "web_search" })
|
|
71
|
+
| (WebSearchPremiumTool & { type: "web_search_premium" })
|
|
71
72
|
| discriminatedUnionTypes.Unknown<"type">
|
|
72
73
|
>
|
|
73
74
|
| undefined;
|
|
@@ -87,7 +88,7 @@ export type ModelConversation = {
|
|
|
87
88
|
/**
|
|
88
89
|
* Custom metadata for the conversation.
|
|
89
90
|
*/
|
|
90
|
-
metadata?:
|
|
91
|
+
metadata?: MetadataDict | null | undefined;
|
|
91
92
|
object: "conversation";
|
|
92
93
|
id: string;
|
|
93
94
|
createdAt: Date;
|
|
@@ -100,13 +101,25 @@ export const ModelConversationTool$inboundSchema: z.ZodType<
|
|
|
100
101
|
ModelConversationTool,
|
|
101
102
|
unknown
|
|
102
103
|
> = discriminatedUnion("type", {
|
|
103
|
-
code_interpreter: CodeInterpreterTool$inboundSchema
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
code_interpreter: CodeInterpreterTool$inboundSchema.and(
|
|
105
|
+
z.object({ type: z.literal("code_interpreter") }),
|
|
106
|
+
),
|
|
107
|
+
connector: CustomConnector$inboundSchema.and(
|
|
108
|
+
z.object({ type: z.literal("connector") }),
|
|
109
|
+
),
|
|
110
|
+
document_library: DocumentLibraryTool$inboundSchema.and(
|
|
111
|
+
z.object({ type: z.literal("document_library") }),
|
|
112
|
+
),
|
|
106
113
|
function: FunctionTool$inboundSchema,
|
|
107
|
-
image_generation: ImageGenerationTool$inboundSchema
|
|
108
|
-
|
|
109
|
-
|
|
114
|
+
image_generation: ImageGenerationTool$inboundSchema.and(
|
|
115
|
+
z.object({ type: z.literal("image_generation") }),
|
|
116
|
+
),
|
|
117
|
+
web_search: WebSearchTool$inboundSchema.and(
|
|
118
|
+
z.object({ type: z.literal("web_search") }),
|
|
119
|
+
),
|
|
120
|
+
web_search_premium: WebSearchPremiumTool$inboundSchema.and(
|
|
121
|
+
z.object({ type: z.literal("web_search_premium") }),
|
|
122
|
+
),
|
|
110
123
|
});
|
|
111
124
|
|
|
112
125
|
export function modelConversationToolFromJSON(
|
|
@@ -126,19 +139,31 @@ export const ModelConversation$inboundSchema: z.ZodType<
|
|
|
126
139
|
> = z.object({
|
|
127
140
|
instructions: z.nullable(z.string()).optional(),
|
|
128
141
|
tools: z.array(discriminatedUnion("type", {
|
|
129
|
-
code_interpreter: CodeInterpreterTool$inboundSchema
|
|
130
|
-
|
|
131
|
-
|
|
142
|
+
code_interpreter: CodeInterpreterTool$inboundSchema.and(
|
|
143
|
+
z.object({ type: z.literal("code_interpreter") }),
|
|
144
|
+
),
|
|
145
|
+
connector: CustomConnector$inboundSchema.and(
|
|
146
|
+
z.object({ type: z.literal("connector") }),
|
|
147
|
+
),
|
|
148
|
+
document_library: DocumentLibraryTool$inboundSchema.and(
|
|
149
|
+
z.object({ type: z.literal("document_library") }),
|
|
150
|
+
),
|
|
132
151
|
function: FunctionTool$inboundSchema,
|
|
133
|
-
image_generation: ImageGenerationTool$inboundSchema
|
|
134
|
-
|
|
135
|
-
|
|
152
|
+
image_generation: ImageGenerationTool$inboundSchema.and(
|
|
153
|
+
z.object({ type: z.literal("image_generation") }),
|
|
154
|
+
),
|
|
155
|
+
web_search: WebSearchTool$inboundSchema.and(
|
|
156
|
+
z.object({ type: z.literal("web_search") }),
|
|
157
|
+
),
|
|
158
|
+
web_search_premium: WebSearchPremiumTool$inboundSchema.and(
|
|
159
|
+
z.object({ type: z.literal("web_search_premium") }),
|
|
160
|
+
),
|
|
136
161
|
})).optional(),
|
|
137
162
|
completion_args: CompletionArgs$inboundSchema.optional(),
|
|
138
163
|
guardrails: z.nullable(z.array(GuardrailConfig$inboundSchema)).optional(),
|
|
139
164
|
name: z.nullable(z.string()).optional(),
|
|
140
165
|
description: z.nullable(z.string()).optional(),
|
|
141
|
-
metadata: z.nullable(
|
|
166
|
+
metadata: z.nullable(MetadataDict$inboundSchema).optional(),
|
|
142
167
|
object: z.literal("conversation").default("conversation"),
|
|
143
168
|
id: z.string(),
|
|
144
169
|
created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 5d93876e4d19
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import { MessageTokens, MessageTokens$inboundSchema } from "./messagetokens.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Token usage details for the prompt.
|
|
15
|
+
*/
|
|
16
|
+
export type PromptTokensDetails = {
|
|
17
|
+
messages?: Array<MessageTokens> | undefined;
|
|
18
|
+
cachedTokens: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const PromptTokensDetails$inboundSchema: z.ZodType<
|
|
23
|
+
PromptTokensDetails,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
messages: z.array(MessageTokens$inboundSchema).optional(),
|
|
27
|
+
cached_tokens: z.int().default(0),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"cached_tokens": "cachedTokens",
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function promptTokensDetailsFromJSON(
|
|
35
|
+
jsonString: string,
|
|
36
|
+
): SafeParseResult<PromptTokensDetails, SDKValidationError> {
|
|
37
|
+
return safeParse(
|
|
38
|
+
jsonString,
|
|
39
|
+
(x) => PromptTokensDetails$inboundSchema.parse(JSON.parse(x)),
|
|
40
|
+
`Failed to parse 'PromptTokensDetails' from JSON`,
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 5cfdc909f234
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
9
|
+
|
|
10
|
+
export const ReasoningEffort = {
|
|
11
|
+
None: "none",
|
|
12
|
+
High: "high",
|
|
13
|
+
} as const;
|
|
14
|
+
export type ReasoningEffort = OpenEnum<typeof ReasoningEffort>;
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const ReasoningEffort$inboundSchema: z.ZodType<
|
|
18
|
+
ReasoningEffort,
|
|
19
|
+
unknown
|
|
20
|
+
> = openEnums.inboundSchema(ReasoningEffort);
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ReasoningEffort$outboundSchema: z.ZodType<
|
|
23
|
+
string,
|
|
24
|
+
ReasoningEffort
|
|
25
|
+
> = openEnums.outboundSchema(ReasoningEffort);
|
|
@@ -7,18 +7,46 @@ import * as z from "zod/v4";
|
|
|
7
7
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
8
|
import { safeParse } from "../../lib/schemas.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { smartUnion } from "../../types/smartUnion.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
12
|
|
|
13
|
+
export type ReferenceId = string | number;
|
|
14
|
+
|
|
12
15
|
export type ReferenceChunk = {
|
|
13
16
|
type?: "reference" | undefined;
|
|
14
|
-
referenceIds: Array<number>;
|
|
17
|
+
referenceIds: Array<string | number>;
|
|
15
18
|
};
|
|
16
19
|
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ReferenceId$inboundSchema: z.ZodType<ReferenceId, unknown> =
|
|
22
|
+
smartUnion([z.string(), z.int()]);
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type ReferenceId$Outbound = string | number;
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const ReferenceId$outboundSchema: z.ZodType<
|
|
28
|
+
ReferenceId$Outbound,
|
|
29
|
+
ReferenceId
|
|
30
|
+
> = smartUnion([z.string(), z.int()]);
|
|
31
|
+
|
|
32
|
+
export function referenceIdToJSON(referenceId: ReferenceId): string {
|
|
33
|
+
return JSON.stringify(ReferenceId$outboundSchema.parse(referenceId));
|
|
34
|
+
}
|
|
35
|
+
export function referenceIdFromJSON(
|
|
36
|
+
jsonString: string,
|
|
37
|
+
): SafeParseResult<ReferenceId, SDKValidationError> {
|
|
38
|
+
return safeParse(
|
|
39
|
+
jsonString,
|
|
40
|
+
(x) => ReferenceId$inboundSchema.parse(JSON.parse(x)),
|
|
41
|
+
`Failed to parse 'ReferenceId' from JSON`,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
17
45
|
/** @internal */
|
|
18
46
|
export const ReferenceChunk$inboundSchema: z.ZodType<ReferenceChunk, unknown> =
|
|
19
47
|
z.object({
|
|
20
48
|
type: z.literal("reference").default("reference"),
|
|
21
|
-
reference_ids: z.array(z.int()),
|
|
49
|
+
reference_ids: z.array(smartUnion([z.string(), z.int()])),
|
|
22
50
|
}).transform((v) => {
|
|
23
51
|
return remap$(v, {
|
|
24
52
|
"reference_ids": "referenceIds",
|
|
@@ -27,7 +55,7 @@ export const ReferenceChunk$inboundSchema: z.ZodType<ReferenceChunk, unknown> =
|
|
|
27
55
|
/** @internal */
|
|
28
56
|
export type ReferenceChunk$Outbound = {
|
|
29
57
|
type: "reference";
|
|
30
|
-
reference_ids: Array<number>;
|
|
58
|
+
reference_ids: Array<string | number>;
|
|
31
59
|
};
|
|
32
60
|
|
|
33
61
|
/** @internal */
|
|
@@ -36,7 +64,7 @@ export const ReferenceChunk$outboundSchema: z.ZodType<
|
|
|
36
64
|
ReferenceChunk
|
|
37
65
|
> = z.object({
|
|
38
66
|
type: z.literal("reference").default("reference" as const),
|
|
39
|
-
referenceIds: z.array(z.int()),
|
|
67
|
+
referenceIds: z.array(smartUnion([z.string(), z.int()])),
|
|
40
68
|
}).transform((v) => {
|
|
41
69
|
return remap$(v, {
|
|
42
70
|
referenceIds: "reference_ids",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 14506aa40233
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
9
|
+
|
|
10
|
+
export const Roles = {
|
|
11
|
+
System: "system",
|
|
12
|
+
User: "user",
|
|
13
|
+
Assistant: "assistant",
|
|
14
|
+
Tool: "tool",
|
|
15
|
+
} as const;
|
|
16
|
+
export type Roles = OpenEnum<typeof Roles>;
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const Roles$inboundSchema: z.ZodType<Roles, unknown> = openEnums
|
|
20
|
+
.inboundSchema(Roles);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 563b60b8536d
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const SpeechOutputFormat = {
|
|
10
|
+
Pcm: "pcm",
|
|
11
|
+
Wav: "wav",
|
|
12
|
+
Mp3: "mp3",
|
|
13
|
+
Flac: "flac",
|
|
14
|
+
Opus: "opus",
|
|
15
|
+
} as const;
|
|
16
|
+
export type SpeechOutputFormat = ClosedEnum<typeof SpeechOutputFormat>;
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const SpeechOutputFormat$outboundSchema: z.ZodEnum<
|
|
20
|
+
typeof SpeechOutputFormat
|
|
21
|
+
> = z.enum(SpeechOutputFormat);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 5d434727e189
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import {
|
|
9
|
+
MetadataDict,
|
|
10
|
+
MetadataDict$Outbound,
|
|
11
|
+
MetadataDict$outboundSchema,
|
|
12
|
+
} from "./metadatadict.js";
|
|
13
|
+
import {
|
|
14
|
+
SpeechOutputFormat,
|
|
15
|
+
SpeechOutputFormat$outboundSchema,
|
|
16
|
+
} from "./speechoutputformat.js";
|
|
17
|
+
|
|
18
|
+
export type SpeechRequest = {
|
|
19
|
+
model?: string | null | undefined;
|
|
20
|
+
metadata?: MetadataDict | null | undefined;
|
|
21
|
+
stream?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The preset or custom voice to use for generating the speech.
|
|
24
|
+
*/
|
|
25
|
+
voiceId?: string | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The audio reference for generating the speech.
|
|
28
|
+
*/
|
|
29
|
+
refAudio?: string | null | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Text to generate a speech from
|
|
32
|
+
*/
|
|
33
|
+
input: string;
|
|
34
|
+
responseFormat?: SpeechOutputFormat | undefined;
|
|
35
|
+
[additionalProperties: string]: unknown;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type SpeechRequest$Outbound = {
|
|
40
|
+
model?: string | null | undefined;
|
|
41
|
+
metadata?: MetadataDict$Outbound | null | undefined;
|
|
42
|
+
stream: boolean;
|
|
43
|
+
voice_id?: string | null | undefined;
|
|
44
|
+
ref_audio?: string | null | undefined;
|
|
45
|
+
input: string;
|
|
46
|
+
response_format?: string | undefined;
|
|
47
|
+
[additionalProperties: string]: unknown;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const SpeechRequest$outboundSchema: z.ZodType<
|
|
52
|
+
SpeechRequest$Outbound,
|
|
53
|
+
SpeechRequest
|
|
54
|
+
> = z.object({
|
|
55
|
+
model: z.nullable(z.string()).optional(),
|
|
56
|
+
metadata: z.nullable(MetadataDict$outboundSchema).optional(),
|
|
57
|
+
stream: z.boolean().default(false),
|
|
58
|
+
voiceId: z.nullable(z.string()).optional(),
|
|
59
|
+
refAudio: z.nullable(z.string()).optional(),
|
|
60
|
+
input: z.string(),
|
|
61
|
+
responseFormat: SpeechOutputFormat$outboundSchema.optional(),
|
|
62
|
+
}).catchall(z.any()).transform((v) => {
|
|
63
|
+
return {
|
|
64
|
+
...remap$(v, {
|
|
65
|
+
voiceId: "voice_id",
|
|
66
|
+
refAudio: "ref_audio",
|
|
67
|
+
responseFormat: "response_format",
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export function speechRequestToJSON(speechRequest: SpeechRequest): string {
|
|
73
|
+
return JSON.stringify(SpeechRequest$outboundSchema.parse(speechRequest));
|
|
74
|
+
}
|