@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
|
@@ -11,6 +11,31 @@ import {
|
|
|
11
11
|
AssistantMessage$Outbound,
|
|
12
12
|
AssistantMessage$outboundSchema,
|
|
13
13
|
} from "./assistantmessage.js";
|
|
14
|
+
import {
|
|
15
|
+
CodeInterpreterTool,
|
|
16
|
+
CodeInterpreterTool$Outbound,
|
|
17
|
+
CodeInterpreterTool$outboundSchema,
|
|
18
|
+
} from "./codeinterpretertool.js";
|
|
19
|
+
import {
|
|
20
|
+
CustomConnector,
|
|
21
|
+
CustomConnector$Outbound,
|
|
22
|
+
CustomConnector$outboundSchema,
|
|
23
|
+
} from "./customconnector.js";
|
|
24
|
+
import {
|
|
25
|
+
DocumentLibraryTool,
|
|
26
|
+
DocumentLibraryTool$Outbound,
|
|
27
|
+
DocumentLibraryTool$outboundSchema,
|
|
28
|
+
} from "./documentlibrarytool.js";
|
|
29
|
+
import {
|
|
30
|
+
GuardrailConfig,
|
|
31
|
+
GuardrailConfig$Outbound,
|
|
32
|
+
GuardrailConfig$outboundSchema,
|
|
33
|
+
} from "./guardrailconfig.js";
|
|
34
|
+
import {
|
|
35
|
+
ImageGenerationTool,
|
|
36
|
+
ImageGenerationTool$Outbound,
|
|
37
|
+
ImageGenerationTool$outboundSchema,
|
|
38
|
+
} from "./imagegenerationtool.js";
|
|
14
39
|
import {
|
|
15
40
|
MistralPromptMode,
|
|
16
41
|
MistralPromptMode$outboundSchema,
|
|
@@ -20,6 +45,10 @@ import {
|
|
|
20
45
|
Prediction$Outbound,
|
|
21
46
|
Prediction$outboundSchema,
|
|
22
47
|
} from "./prediction.js";
|
|
48
|
+
import {
|
|
49
|
+
ReasoningEffort,
|
|
50
|
+
ReasoningEffort$outboundSchema,
|
|
51
|
+
} from "./reasoningeffort.js";
|
|
23
52
|
import {
|
|
24
53
|
ResponseFormat,
|
|
25
54
|
ResponseFormat$Outbound,
|
|
@@ -50,6 +79,16 @@ import {
|
|
|
50
79
|
UserMessage$Outbound,
|
|
51
80
|
UserMessage$outboundSchema,
|
|
52
81
|
} from "./usermessage.js";
|
|
82
|
+
import {
|
|
83
|
+
WebSearchPremiumTool,
|
|
84
|
+
WebSearchPremiumTool$Outbound,
|
|
85
|
+
WebSearchPremiumTool$outboundSchema,
|
|
86
|
+
} from "./websearchpremiumtool.js";
|
|
87
|
+
import {
|
|
88
|
+
WebSearchTool,
|
|
89
|
+
WebSearchTool$Outbound,
|
|
90
|
+
WebSearchTool$outboundSchema,
|
|
91
|
+
} from "./websearchtool.js";
|
|
53
92
|
|
|
54
93
|
/**
|
|
55
94
|
* Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
|
|
@@ -62,6 +101,27 @@ export type AgentsCompletionRequestMessage =
|
|
|
62
101
|
| ToolMessage
|
|
63
102
|
| UserMessage;
|
|
64
103
|
|
|
104
|
+
export type AgentsCompletionRequestTools1 =
|
|
105
|
+
| DocumentLibraryTool
|
|
106
|
+
| CustomConnector
|
|
107
|
+
| Tool
|
|
108
|
+
| WebSearchTool
|
|
109
|
+
| WebSearchPremiumTool
|
|
110
|
+
| CodeInterpreterTool
|
|
111
|
+
| ImageGenerationTool;
|
|
112
|
+
|
|
113
|
+
export type AgentsCompletionRequestTools2 =
|
|
114
|
+
| Array<
|
|
115
|
+
| DocumentLibraryTool
|
|
116
|
+
| CustomConnector
|
|
117
|
+
| Tool
|
|
118
|
+
| WebSearchTool
|
|
119
|
+
| WebSearchPremiumTool
|
|
120
|
+
| CodeInterpreterTool
|
|
121
|
+
| ImageGenerationTool
|
|
122
|
+
>
|
|
123
|
+
| Array<string>;
|
|
124
|
+
|
|
65
125
|
export type AgentsCompletionRequestToolChoice = ToolChoice | ToolChoiceEnum;
|
|
66
126
|
|
|
67
127
|
export type AgentsCompletionRequest = {
|
|
@@ -95,7 +155,19 @@ export type AgentsCompletionRequest = {
|
|
|
95
155
|
* Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.
|
|
96
156
|
*/
|
|
97
157
|
responseFormat?: ResponseFormat | undefined;
|
|
98
|
-
tools?:
|
|
158
|
+
tools?:
|
|
159
|
+
| Array<
|
|
160
|
+
| DocumentLibraryTool
|
|
161
|
+
| CustomConnector
|
|
162
|
+
| Tool
|
|
163
|
+
| WebSearchTool
|
|
164
|
+
| WebSearchPremiumTool
|
|
165
|
+
| CodeInterpreterTool
|
|
166
|
+
| ImageGenerationTool
|
|
167
|
+
>
|
|
168
|
+
| Array<string>
|
|
169
|
+
| null
|
|
170
|
+
| undefined;
|
|
99
171
|
toolChoice?: ToolChoice | ToolChoiceEnum | undefined;
|
|
100
172
|
/**
|
|
101
173
|
* The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.
|
|
@@ -114,14 +186,17 @@ export type AgentsCompletionRequest = {
|
|
|
114
186
|
*/
|
|
115
187
|
prediction?: Prediction | undefined;
|
|
116
188
|
parallelToolCalls?: boolean | undefined;
|
|
189
|
+
reasoningEffort?: ReasoningEffort | null | undefined;
|
|
117
190
|
/**
|
|
118
191
|
* Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
|
|
119
192
|
*/
|
|
120
193
|
promptMode?: MistralPromptMode | null | undefined;
|
|
194
|
+
guardrails?: Array<GuardrailConfig> | null | undefined;
|
|
121
195
|
/**
|
|
122
196
|
* The ID of the agent to use for this completion.
|
|
123
197
|
*/
|
|
124
198
|
agentId: string;
|
|
199
|
+
[additionalProperties: string]: unknown;
|
|
125
200
|
};
|
|
126
201
|
|
|
127
202
|
/** @internal */
|
|
@@ -173,6 +248,82 @@ export function agentsCompletionRequestMessageToJSON(
|
|
|
173
248
|
);
|
|
174
249
|
}
|
|
175
250
|
|
|
251
|
+
/** @internal */
|
|
252
|
+
export type AgentsCompletionRequestTools1$Outbound =
|
|
253
|
+
| DocumentLibraryTool$Outbound
|
|
254
|
+
| CustomConnector$Outbound
|
|
255
|
+
| Tool$Outbound
|
|
256
|
+
| WebSearchTool$Outbound
|
|
257
|
+
| WebSearchPremiumTool$Outbound
|
|
258
|
+
| CodeInterpreterTool$Outbound
|
|
259
|
+
| ImageGenerationTool$Outbound;
|
|
260
|
+
|
|
261
|
+
/** @internal */
|
|
262
|
+
export const AgentsCompletionRequestTools1$outboundSchema: z.ZodType<
|
|
263
|
+
AgentsCompletionRequestTools1$Outbound,
|
|
264
|
+
AgentsCompletionRequestTools1
|
|
265
|
+
> = smartUnion([
|
|
266
|
+
DocumentLibraryTool$outboundSchema,
|
|
267
|
+
CustomConnector$outboundSchema,
|
|
268
|
+
Tool$outboundSchema,
|
|
269
|
+
WebSearchTool$outboundSchema,
|
|
270
|
+
WebSearchPremiumTool$outboundSchema,
|
|
271
|
+
CodeInterpreterTool$outboundSchema,
|
|
272
|
+
ImageGenerationTool$outboundSchema,
|
|
273
|
+
]);
|
|
274
|
+
|
|
275
|
+
export function agentsCompletionRequestTools1ToJSON(
|
|
276
|
+
agentsCompletionRequestTools1: AgentsCompletionRequestTools1,
|
|
277
|
+
): string {
|
|
278
|
+
return JSON.stringify(
|
|
279
|
+
AgentsCompletionRequestTools1$outboundSchema.parse(
|
|
280
|
+
agentsCompletionRequestTools1,
|
|
281
|
+
),
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/** @internal */
|
|
286
|
+
export type AgentsCompletionRequestTools2$Outbound =
|
|
287
|
+
| Array<
|
|
288
|
+
| DocumentLibraryTool$Outbound
|
|
289
|
+
| CustomConnector$Outbound
|
|
290
|
+
| Tool$Outbound
|
|
291
|
+
| WebSearchTool$Outbound
|
|
292
|
+
| WebSearchPremiumTool$Outbound
|
|
293
|
+
| CodeInterpreterTool$Outbound
|
|
294
|
+
| ImageGenerationTool$Outbound
|
|
295
|
+
>
|
|
296
|
+
| Array<string>;
|
|
297
|
+
|
|
298
|
+
/** @internal */
|
|
299
|
+
export const AgentsCompletionRequestTools2$outboundSchema: z.ZodType<
|
|
300
|
+
AgentsCompletionRequestTools2$Outbound,
|
|
301
|
+
AgentsCompletionRequestTools2
|
|
302
|
+
> = smartUnion([
|
|
303
|
+
z.array(
|
|
304
|
+
smartUnion([
|
|
305
|
+
DocumentLibraryTool$outboundSchema,
|
|
306
|
+
CustomConnector$outboundSchema,
|
|
307
|
+
Tool$outboundSchema,
|
|
308
|
+
WebSearchTool$outboundSchema,
|
|
309
|
+
WebSearchPremiumTool$outboundSchema,
|
|
310
|
+
CodeInterpreterTool$outboundSchema,
|
|
311
|
+
ImageGenerationTool$outboundSchema,
|
|
312
|
+
]),
|
|
313
|
+
),
|
|
314
|
+
z.array(z.string()),
|
|
315
|
+
]);
|
|
316
|
+
|
|
317
|
+
export function agentsCompletionRequestTools2ToJSON(
|
|
318
|
+
agentsCompletionRequestTools2: AgentsCompletionRequestTools2,
|
|
319
|
+
): string {
|
|
320
|
+
return JSON.stringify(
|
|
321
|
+
AgentsCompletionRequestTools2$outboundSchema.parse(
|
|
322
|
+
agentsCompletionRequestTools2,
|
|
323
|
+
),
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
|
|
176
327
|
/** @internal */
|
|
177
328
|
export type AgentsCompletionRequestToolChoice$Outbound =
|
|
178
329
|
| ToolChoice$Outbound
|
|
@@ -208,15 +359,30 @@ export type AgentsCompletionRequest$Outbound = {
|
|
|
208
359
|
| UserMessage$Outbound
|
|
209
360
|
>;
|
|
210
361
|
response_format?: ResponseFormat$Outbound | undefined;
|
|
211
|
-
tools?:
|
|
362
|
+
tools?:
|
|
363
|
+
| Array<
|
|
364
|
+
| DocumentLibraryTool$Outbound
|
|
365
|
+
| CustomConnector$Outbound
|
|
366
|
+
| Tool$Outbound
|
|
367
|
+
| WebSearchTool$Outbound
|
|
368
|
+
| WebSearchPremiumTool$Outbound
|
|
369
|
+
| CodeInterpreterTool$Outbound
|
|
370
|
+
| ImageGenerationTool$Outbound
|
|
371
|
+
>
|
|
372
|
+
| Array<string>
|
|
373
|
+
| null
|
|
374
|
+
| undefined;
|
|
212
375
|
tool_choice?: ToolChoice$Outbound | string | undefined;
|
|
213
376
|
presence_penalty?: number | undefined;
|
|
214
377
|
frequency_penalty?: number | undefined;
|
|
215
378
|
n?: number | null | undefined;
|
|
216
379
|
prediction?: Prediction$Outbound | undefined;
|
|
217
380
|
parallel_tool_calls?: boolean | undefined;
|
|
381
|
+
reasoning_effort?: string | null | undefined;
|
|
218
382
|
prompt_mode?: string | null | undefined;
|
|
383
|
+
guardrails?: Array<GuardrailConfig$Outbound> | null | undefined;
|
|
219
384
|
agent_id: string;
|
|
385
|
+
[additionalProperties: string]: unknown;
|
|
220
386
|
};
|
|
221
387
|
|
|
222
388
|
/** @internal */
|
|
@@ -240,7 +406,22 @@ export const AgentsCompletionRequest$outboundSchema: z.ZodType<
|
|
|
240
406
|
]),
|
|
241
407
|
),
|
|
242
408
|
responseFormat: ResponseFormat$outboundSchema.optional(),
|
|
243
|
-
tools: z.nullable(
|
|
409
|
+
tools: z.nullable(
|
|
410
|
+
smartUnion([
|
|
411
|
+
z.array(
|
|
412
|
+
smartUnion([
|
|
413
|
+
DocumentLibraryTool$outboundSchema,
|
|
414
|
+
CustomConnector$outboundSchema,
|
|
415
|
+
Tool$outboundSchema,
|
|
416
|
+
WebSearchTool$outboundSchema,
|
|
417
|
+
WebSearchPremiumTool$outboundSchema,
|
|
418
|
+
CodeInterpreterTool$outboundSchema,
|
|
419
|
+
ImageGenerationTool$outboundSchema,
|
|
420
|
+
]),
|
|
421
|
+
),
|
|
422
|
+
z.array(z.string()),
|
|
423
|
+
]),
|
|
424
|
+
).optional(),
|
|
244
425
|
toolChoice: smartUnion([
|
|
245
426
|
ToolChoice$outboundSchema,
|
|
246
427
|
ToolChoiceEnum$outboundSchema,
|
|
@@ -250,20 +431,25 @@ export const AgentsCompletionRequest$outboundSchema: z.ZodType<
|
|
|
250
431
|
n: z.nullable(z.int()).optional(),
|
|
251
432
|
prediction: Prediction$outboundSchema.optional(),
|
|
252
433
|
parallelToolCalls: z.boolean().optional(),
|
|
434
|
+
reasoningEffort: z.nullable(ReasoningEffort$outboundSchema).optional(),
|
|
253
435
|
promptMode: z.nullable(MistralPromptMode$outboundSchema).optional(),
|
|
436
|
+
guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
|
|
254
437
|
agentId: z.string(),
|
|
255
|
-
}).transform((v) => {
|
|
256
|
-
return
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
438
|
+
}).catchall(z.any()).transform((v) => {
|
|
439
|
+
return {
|
|
440
|
+
...remap$(v, {
|
|
441
|
+
maxTokens: "max_tokens",
|
|
442
|
+
randomSeed: "random_seed",
|
|
443
|
+
responseFormat: "response_format",
|
|
444
|
+
toolChoice: "tool_choice",
|
|
445
|
+
presencePenalty: "presence_penalty",
|
|
446
|
+
frequencyPenalty: "frequency_penalty",
|
|
447
|
+
parallelToolCalls: "parallel_tool_calls",
|
|
448
|
+
reasoningEffort: "reasoning_effort",
|
|
449
|
+
promptMode: "prompt_mode",
|
|
450
|
+
agentId: "agent_id",
|
|
451
|
+
}),
|
|
452
|
+
};
|
|
267
453
|
});
|
|
268
454
|
|
|
269
455
|
export function agentsCompletionRequestToJSON(
|
|
@@ -11,6 +11,31 @@ import {
|
|
|
11
11
|
AssistantMessage$Outbound,
|
|
12
12
|
AssistantMessage$outboundSchema,
|
|
13
13
|
} from "./assistantmessage.js";
|
|
14
|
+
import {
|
|
15
|
+
CodeInterpreterTool,
|
|
16
|
+
CodeInterpreterTool$Outbound,
|
|
17
|
+
CodeInterpreterTool$outboundSchema,
|
|
18
|
+
} from "./codeinterpretertool.js";
|
|
19
|
+
import {
|
|
20
|
+
CustomConnector,
|
|
21
|
+
CustomConnector$Outbound,
|
|
22
|
+
CustomConnector$outboundSchema,
|
|
23
|
+
} from "./customconnector.js";
|
|
24
|
+
import {
|
|
25
|
+
DocumentLibraryTool,
|
|
26
|
+
DocumentLibraryTool$Outbound,
|
|
27
|
+
DocumentLibraryTool$outboundSchema,
|
|
28
|
+
} from "./documentlibrarytool.js";
|
|
29
|
+
import {
|
|
30
|
+
GuardrailConfig,
|
|
31
|
+
GuardrailConfig$Outbound,
|
|
32
|
+
GuardrailConfig$outboundSchema,
|
|
33
|
+
} from "./guardrailconfig.js";
|
|
34
|
+
import {
|
|
35
|
+
ImageGenerationTool,
|
|
36
|
+
ImageGenerationTool$Outbound,
|
|
37
|
+
ImageGenerationTool$outboundSchema,
|
|
38
|
+
} from "./imagegenerationtool.js";
|
|
14
39
|
import {
|
|
15
40
|
MistralPromptMode,
|
|
16
41
|
MistralPromptMode$outboundSchema,
|
|
@@ -20,6 +45,10 @@ import {
|
|
|
20
45
|
Prediction$Outbound,
|
|
21
46
|
Prediction$outboundSchema,
|
|
22
47
|
} from "./prediction.js";
|
|
48
|
+
import {
|
|
49
|
+
ReasoningEffort,
|
|
50
|
+
ReasoningEffort$outboundSchema,
|
|
51
|
+
} from "./reasoningeffort.js";
|
|
23
52
|
import {
|
|
24
53
|
ResponseFormat,
|
|
25
54
|
ResponseFormat$Outbound,
|
|
@@ -50,6 +79,16 @@ import {
|
|
|
50
79
|
UserMessage$Outbound,
|
|
51
80
|
UserMessage$outboundSchema,
|
|
52
81
|
} from "./usermessage.js";
|
|
82
|
+
import {
|
|
83
|
+
WebSearchPremiumTool,
|
|
84
|
+
WebSearchPremiumTool$Outbound,
|
|
85
|
+
WebSearchPremiumTool$outboundSchema,
|
|
86
|
+
} from "./websearchpremiumtool.js";
|
|
87
|
+
import {
|
|
88
|
+
WebSearchTool,
|
|
89
|
+
WebSearchTool$Outbound,
|
|
90
|
+
WebSearchTool$outboundSchema,
|
|
91
|
+
} from "./websearchtool.js";
|
|
53
92
|
|
|
54
93
|
/**
|
|
55
94
|
* Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
|
|
@@ -62,6 +101,27 @@ export type AgentsCompletionStreamRequestMessage =
|
|
|
62
101
|
| ToolMessage
|
|
63
102
|
| UserMessage;
|
|
64
103
|
|
|
104
|
+
export type AgentsCompletionStreamRequestTools1 =
|
|
105
|
+
| DocumentLibraryTool
|
|
106
|
+
| CustomConnector
|
|
107
|
+
| Tool
|
|
108
|
+
| WebSearchTool
|
|
109
|
+
| WebSearchPremiumTool
|
|
110
|
+
| CodeInterpreterTool
|
|
111
|
+
| ImageGenerationTool;
|
|
112
|
+
|
|
113
|
+
export type AgentsCompletionStreamRequestTools2 =
|
|
114
|
+
| Array<
|
|
115
|
+
| DocumentLibraryTool
|
|
116
|
+
| CustomConnector
|
|
117
|
+
| Tool
|
|
118
|
+
| WebSearchTool
|
|
119
|
+
| WebSearchPremiumTool
|
|
120
|
+
| CodeInterpreterTool
|
|
121
|
+
| ImageGenerationTool
|
|
122
|
+
>
|
|
123
|
+
| Array<string>;
|
|
124
|
+
|
|
65
125
|
export type AgentsCompletionStreamRequestToolChoice =
|
|
66
126
|
| ToolChoice
|
|
67
127
|
| ToolChoiceEnum;
|
|
@@ -94,7 +154,19 @@ export type AgentsCompletionStreamRequest = {
|
|
|
94
154
|
* Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.
|
|
95
155
|
*/
|
|
96
156
|
responseFormat?: ResponseFormat | undefined;
|
|
97
|
-
tools?:
|
|
157
|
+
tools?:
|
|
158
|
+
| Array<
|
|
159
|
+
| DocumentLibraryTool
|
|
160
|
+
| CustomConnector
|
|
161
|
+
| Tool
|
|
162
|
+
| WebSearchTool
|
|
163
|
+
| WebSearchPremiumTool
|
|
164
|
+
| CodeInterpreterTool
|
|
165
|
+
| ImageGenerationTool
|
|
166
|
+
>
|
|
167
|
+
| Array<string>
|
|
168
|
+
| null
|
|
169
|
+
| undefined;
|
|
98
170
|
toolChoice?: ToolChoice | ToolChoiceEnum | undefined;
|
|
99
171
|
/**
|
|
100
172
|
* The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.
|
|
@@ -113,14 +185,17 @@ export type AgentsCompletionStreamRequest = {
|
|
|
113
185
|
*/
|
|
114
186
|
prediction?: Prediction | undefined;
|
|
115
187
|
parallelToolCalls?: boolean | undefined;
|
|
188
|
+
reasoningEffort?: ReasoningEffort | null | undefined;
|
|
116
189
|
/**
|
|
117
190
|
* Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
|
|
118
191
|
*/
|
|
119
192
|
promptMode?: MistralPromptMode | null | undefined;
|
|
193
|
+
guardrails?: Array<GuardrailConfig> | null | undefined;
|
|
120
194
|
/**
|
|
121
195
|
* The ID of the agent to use for this completion.
|
|
122
196
|
*/
|
|
123
197
|
agentId: string;
|
|
198
|
+
[additionalProperties: string]: unknown;
|
|
124
199
|
};
|
|
125
200
|
|
|
126
201
|
/** @internal */
|
|
@@ -172,6 +247,82 @@ export function agentsCompletionStreamRequestMessageToJSON(
|
|
|
172
247
|
);
|
|
173
248
|
}
|
|
174
249
|
|
|
250
|
+
/** @internal */
|
|
251
|
+
export type AgentsCompletionStreamRequestTools1$Outbound =
|
|
252
|
+
| DocumentLibraryTool$Outbound
|
|
253
|
+
| CustomConnector$Outbound
|
|
254
|
+
| Tool$Outbound
|
|
255
|
+
| WebSearchTool$Outbound
|
|
256
|
+
| WebSearchPremiumTool$Outbound
|
|
257
|
+
| CodeInterpreterTool$Outbound
|
|
258
|
+
| ImageGenerationTool$Outbound;
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export const AgentsCompletionStreamRequestTools1$outboundSchema: z.ZodType<
|
|
262
|
+
AgentsCompletionStreamRequestTools1$Outbound,
|
|
263
|
+
AgentsCompletionStreamRequestTools1
|
|
264
|
+
> = smartUnion([
|
|
265
|
+
DocumentLibraryTool$outboundSchema,
|
|
266
|
+
CustomConnector$outboundSchema,
|
|
267
|
+
Tool$outboundSchema,
|
|
268
|
+
WebSearchTool$outboundSchema,
|
|
269
|
+
WebSearchPremiumTool$outboundSchema,
|
|
270
|
+
CodeInterpreterTool$outboundSchema,
|
|
271
|
+
ImageGenerationTool$outboundSchema,
|
|
272
|
+
]);
|
|
273
|
+
|
|
274
|
+
export function agentsCompletionStreamRequestTools1ToJSON(
|
|
275
|
+
agentsCompletionStreamRequestTools1: AgentsCompletionStreamRequestTools1,
|
|
276
|
+
): string {
|
|
277
|
+
return JSON.stringify(
|
|
278
|
+
AgentsCompletionStreamRequestTools1$outboundSchema.parse(
|
|
279
|
+
agentsCompletionStreamRequestTools1,
|
|
280
|
+
),
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/** @internal */
|
|
285
|
+
export type AgentsCompletionStreamRequestTools2$Outbound =
|
|
286
|
+
| Array<
|
|
287
|
+
| DocumentLibraryTool$Outbound
|
|
288
|
+
| CustomConnector$Outbound
|
|
289
|
+
| Tool$Outbound
|
|
290
|
+
| WebSearchTool$Outbound
|
|
291
|
+
| WebSearchPremiumTool$Outbound
|
|
292
|
+
| CodeInterpreterTool$Outbound
|
|
293
|
+
| ImageGenerationTool$Outbound
|
|
294
|
+
>
|
|
295
|
+
| Array<string>;
|
|
296
|
+
|
|
297
|
+
/** @internal */
|
|
298
|
+
export const AgentsCompletionStreamRequestTools2$outboundSchema: z.ZodType<
|
|
299
|
+
AgentsCompletionStreamRequestTools2$Outbound,
|
|
300
|
+
AgentsCompletionStreamRequestTools2
|
|
301
|
+
> = smartUnion([
|
|
302
|
+
z.array(
|
|
303
|
+
smartUnion([
|
|
304
|
+
DocumentLibraryTool$outboundSchema,
|
|
305
|
+
CustomConnector$outboundSchema,
|
|
306
|
+
Tool$outboundSchema,
|
|
307
|
+
WebSearchTool$outboundSchema,
|
|
308
|
+
WebSearchPremiumTool$outboundSchema,
|
|
309
|
+
CodeInterpreterTool$outboundSchema,
|
|
310
|
+
ImageGenerationTool$outboundSchema,
|
|
311
|
+
]),
|
|
312
|
+
),
|
|
313
|
+
z.array(z.string()),
|
|
314
|
+
]);
|
|
315
|
+
|
|
316
|
+
export function agentsCompletionStreamRequestTools2ToJSON(
|
|
317
|
+
agentsCompletionStreamRequestTools2: AgentsCompletionStreamRequestTools2,
|
|
318
|
+
): string {
|
|
319
|
+
return JSON.stringify(
|
|
320
|
+
AgentsCompletionStreamRequestTools2$outboundSchema.parse(
|
|
321
|
+
agentsCompletionStreamRequestTools2,
|
|
322
|
+
),
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
|
|
175
326
|
/** @internal */
|
|
176
327
|
export type AgentsCompletionStreamRequestToolChoice$Outbound =
|
|
177
328
|
| ToolChoice$Outbound
|
|
@@ -208,15 +359,30 @@ export type AgentsCompletionStreamRequest$Outbound = {
|
|
|
208
359
|
| UserMessage$Outbound
|
|
209
360
|
>;
|
|
210
361
|
response_format?: ResponseFormat$Outbound | undefined;
|
|
211
|
-
tools?:
|
|
362
|
+
tools?:
|
|
363
|
+
| Array<
|
|
364
|
+
| DocumentLibraryTool$Outbound
|
|
365
|
+
| CustomConnector$Outbound
|
|
366
|
+
| Tool$Outbound
|
|
367
|
+
| WebSearchTool$Outbound
|
|
368
|
+
| WebSearchPremiumTool$Outbound
|
|
369
|
+
| CodeInterpreterTool$Outbound
|
|
370
|
+
| ImageGenerationTool$Outbound
|
|
371
|
+
>
|
|
372
|
+
| Array<string>
|
|
373
|
+
| null
|
|
374
|
+
| undefined;
|
|
212
375
|
tool_choice?: ToolChoice$Outbound | string | undefined;
|
|
213
376
|
presence_penalty?: number | undefined;
|
|
214
377
|
frequency_penalty?: number | undefined;
|
|
215
378
|
n?: number | null | undefined;
|
|
216
379
|
prediction?: Prediction$Outbound | undefined;
|
|
217
380
|
parallel_tool_calls?: boolean | undefined;
|
|
381
|
+
reasoning_effort?: string | null | undefined;
|
|
218
382
|
prompt_mode?: string | null | undefined;
|
|
383
|
+
guardrails?: Array<GuardrailConfig$Outbound> | null | undefined;
|
|
219
384
|
agent_id: string;
|
|
385
|
+
[additionalProperties: string]: unknown;
|
|
220
386
|
};
|
|
221
387
|
|
|
222
388
|
/** @internal */
|
|
@@ -240,7 +406,22 @@ export const AgentsCompletionStreamRequest$outboundSchema: z.ZodType<
|
|
|
240
406
|
]),
|
|
241
407
|
),
|
|
242
408
|
responseFormat: ResponseFormat$outboundSchema.optional(),
|
|
243
|
-
tools: z.nullable(
|
|
409
|
+
tools: z.nullable(
|
|
410
|
+
smartUnion([
|
|
411
|
+
z.array(
|
|
412
|
+
smartUnion([
|
|
413
|
+
DocumentLibraryTool$outboundSchema,
|
|
414
|
+
CustomConnector$outboundSchema,
|
|
415
|
+
Tool$outboundSchema,
|
|
416
|
+
WebSearchTool$outboundSchema,
|
|
417
|
+
WebSearchPremiumTool$outboundSchema,
|
|
418
|
+
CodeInterpreterTool$outboundSchema,
|
|
419
|
+
ImageGenerationTool$outboundSchema,
|
|
420
|
+
]),
|
|
421
|
+
),
|
|
422
|
+
z.array(z.string()),
|
|
423
|
+
]),
|
|
424
|
+
).optional(),
|
|
244
425
|
toolChoice: smartUnion([
|
|
245
426
|
ToolChoice$outboundSchema,
|
|
246
427
|
ToolChoiceEnum$outboundSchema,
|
|
@@ -250,20 +431,25 @@ export const AgentsCompletionStreamRequest$outboundSchema: z.ZodType<
|
|
|
250
431
|
n: z.nullable(z.int()).optional(),
|
|
251
432
|
prediction: Prediction$outboundSchema.optional(),
|
|
252
433
|
parallelToolCalls: z.boolean().optional(),
|
|
434
|
+
reasoningEffort: z.nullable(ReasoningEffort$outboundSchema).optional(),
|
|
253
435
|
promptMode: z.nullable(MistralPromptMode$outboundSchema).optional(),
|
|
436
|
+
guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
|
|
254
437
|
agentId: z.string(),
|
|
255
|
-
}).transform((v) => {
|
|
256
|
-
return
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
438
|
+
}).catchall(z.any()).transform((v) => {
|
|
439
|
+
return {
|
|
440
|
+
...remap$(v, {
|
|
441
|
+
maxTokens: "max_tokens",
|
|
442
|
+
randomSeed: "random_seed",
|
|
443
|
+
responseFormat: "response_format",
|
|
444
|
+
toolChoice: "tool_choice",
|
|
445
|
+
presencePenalty: "presence_penalty",
|
|
446
|
+
frequencyPenalty: "frequency_penalty",
|
|
447
|
+
parallelToolCalls: "parallel_tool_calls",
|
|
448
|
+
reasoningEffort: "reasoning_effort",
|
|
449
|
+
promptMode: "prompt_mode",
|
|
450
|
+
agentId: "agent_id",
|
|
451
|
+
}),
|
|
452
|
+
};
|
|
267
453
|
});
|
|
268
454
|
|
|
269
455
|
export function agentsCompletionStreamRequestToJSON(
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 2438b56452ed
|
|
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
|
+
export type AuthUrlResponse = {
|
|
13
|
+
authUrl: string;
|
|
14
|
+
ttl: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const AuthUrlResponse$inboundSchema: z.ZodType<
|
|
19
|
+
AuthUrlResponse,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
auth_url: z.string(),
|
|
23
|
+
ttl: z.int(),
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
"auth_url": "authUrl",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function authUrlResponseFromJSON(
|
|
31
|
+
jsonString: string,
|
|
32
|
+
): SafeParseResult<AuthUrlResponse, SDKValidationError> {
|
|
33
|
+
return safeParse(
|
|
34
|
+
jsonString,
|
|
35
|
+
(x) => AuthUrlResponse$inboundSchema.parse(JSON.parse(x)),
|
|
36
|
+
`Failed to parse 'AuthUrlResponse' from JSON`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -11,7 +11,7 @@ import { OpenEnum } from "../../types/enums.js";
|
|
|
11
11
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
12
12
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
13
|
|
|
14
|
-
export const
|
|
14
|
+
export const BaseFieldDefinitionType = {
|
|
15
15
|
Enum: "ENUM",
|
|
16
16
|
Text: "TEXT",
|
|
17
17
|
Int: "INT",
|
|
@@ -20,7 +20,7 @@ export const TypeEnum = {
|
|
|
20
20
|
Timestamp: "TIMESTAMP",
|
|
21
21
|
Array: "ARRAY",
|
|
22
22
|
} as const;
|
|
23
|
-
export type
|
|
23
|
+
export type BaseFieldDefinitionType = OpenEnum<typeof BaseFieldDefinitionType>;
|
|
24
24
|
|
|
25
25
|
export const SupportedOperator = {
|
|
26
26
|
Lt: "lt",
|
|
@@ -48,14 +48,16 @@ export type SupportedOperator = OpenEnum<typeof SupportedOperator>;
|
|
|
48
48
|
export type BaseFieldDefinition = {
|
|
49
49
|
name: string;
|
|
50
50
|
label: string;
|
|
51
|
-
type:
|
|
51
|
+
type: BaseFieldDefinitionType;
|
|
52
52
|
group?: string | null | undefined;
|
|
53
53
|
supportedOperators: Array<SupportedOperator>;
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
/** @internal */
|
|
57
|
-
export const
|
|
58
|
-
|
|
57
|
+
export const BaseFieldDefinitionType$inboundSchema: z.ZodType<
|
|
58
|
+
BaseFieldDefinitionType,
|
|
59
|
+
unknown
|
|
60
|
+
> = openEnums.inboundSchema(BaseFieldDefinitionType);
|
|
59
61
|
|
|
60
62
|
/** @internal */
|
|
61
63
|
export const SupportedOperator$inboundSchema: z.ZodType<
|
|
@@ -70,7 +72,7 @@ export const BaseFieldDefinition$inboundSchema: z.ZodType<
|
|
|
70
72
|
> = z.object({
|
|
71
73
|
name: z.string(),
|
|
72
74
|
label: z.string(),
|
|
73
|
-
type:
|
|
75
|
+
type: BaseFieldDefinitionType$inboundSchema,
|
|
74
76
|
group: z.nullable(z.string()).optional(),
|
|
75
77
|
supported_operators: z.array(SupportedOperator$inboundSchema),
|
|
76
78
|
}).transform((v) => {
|
|
@@ -18,6 +18,12 @@ export type BaseModelCard = {
|
|
|
18
18
|
object: string;
|
|
19
19
|
created?: number | undefined;
|
|
20
20
|
ownedBy: string;
|
|
21
|
+
/**
|
|
22
|
+
* This is populated by Harmattan, but some fields have a name
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* that we don't want to expose in the API.
|
|
26
|
+
*/
|
|
21
27
|
capabilities: ModelCapabilities;
|
|
22
28
|
name?: string | null | undefined;
|
|
23
29
|
description?: string | null | undefined;
|