@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
|
@@ -20,6 +20,11 @@ import {
|
|
|
20
20
|
Prediction$Outbound,
|
|
21
21
|
Prediction$outboundSchema,
|
|
22
22
|
} from "./prediction.js";
|
|
23
|
+
import {
|
|
24
|
+
ReasoningEffort,
|
|
25
|
+
ReasoningEffort$inboundSchema,
|
|
26
|
+
ReasoningEffort$outboundSchema,
|
|
27
|
+
} from "./reasoningeffort.js";
|
|
23
28
|
import {
|
|
24
29
|
ResponseFormat,
|
|
25
30
|
ResponseFormat$inboundSchema,
|
|
@@ -46,6 +51,7 @@ export type CompletionArgs = {
|
|
|
46
51
|
prediction?: Prediction | null | undefined;
|
|
47
52
|
responseFormat?: ResponseFormat | null | undefined;
|
|
48
53
|
toolChoice?: ToolChoiceEnum | undefined;
|
|
54
|
+
reasoningEffort?: ReasoningEffort | null | undefined;
|
|
49
55
|
};
|
|
50
56
|
|
|
51
57
|
/** @internal */
|
|
@@ -61,6 +67,7 @@ export const CompletionArgs$inboundSchema: z.ZodType<CompletionArgs, unknown> =
|
|
|
61
67
|
prediction: z.nullable(Prediction$inboundSchema).optional(),
|
|
62
68
|
response_format: z.nullable(ResponseFormat$inboundSchema).optional(),
|
|
63
69
|
tool_choice: ToolChoiceEnum$inboundSchema.optional(),
|
|
70
|
+
reasoning_effort: z.nullable(ReasoningEffort$inboundSchema).optional(),
|
|
64
71
|
}).transform((v) => {
|
|
65
72
|
return remap$(v, {
|
|
66
73
|
"presence_penalty": "presencePenalty",
|
|
@@ -70,6 +77,7 @@ export const CompletionArgs$inboundSchema: z.ZodType<CompletionArgs, unknown> =
|
|
|
70
77
|
"random_seed": "randomSeed",
|
|
71
78
|
"response_format": "responseFormat",
|
|
72
79
|
"tool_choice": "toolChoice",
|
|
80
|
+
"reasoning_effort": "reasoningEffort",
|
|
73
81
|
});
|
|
74
82
|
});
|
|
75
83
|
/** @internal */
|
|
@@ -84,6 +92,7 @@ export type CompletionArgs$Outbound = {
|
|
|
84
92
|
prediction?: Prediction$Outbound | null | undefined;
|
|
85
93
|
response_format?: ResponseFormat$Outbound | null | undefined;
|
|
86
94
|
tool_choice?: string | undefined;
|
|
95
|
+
reasoning_effort?: string | null | undefined;
|
|
87
96
|
};
|
|
88
97
|
|
|
89
98
|
/** @internal */
|
|
@@ -101,6 +110,7 @@ export const CompletionArgs$outboundSchema: z.ZodType<
|
|
|
101
110
|
prediction: z.nullable(Prediction$outboundSchema).optional(),
|
|
102
111
|
responseFormat: z.nullable(ResponseFormat$outboundSchema).optional(),
|
|
103
112
|
toolChoice: ToolChoiceEnum$outboundSchema.optional(),
|
|
113
|
+
reasoningEffort: z.nullable(ReasoningEffort$outboundSchema).optional(),
|
|
104
114
|
}).transform((v) => {
|
|
105
115
|
return remap$(v, {
|
|
106
116
|
presencePenalty: "presence_penalty",
|
|
@@ -110,6 +120,7 @@ export const CompletionArgs$outboundSchema: z.ZodType<
|
|
|
110
120
|
randomSeed: "random_seed",
|
|
111
121
|
responseFormat: "response_format",
|
|
112
122
|
toolChoice: "tool_choice",
|
|
123
|
+
reasoningEffort: "reasoning_effort",
|
|
113
124
|
});
|
|
114
125
|
});
|
|
115
126
|
|
|
@@ -47,6 +47,11 @@ import {
|
|
|
47
47
|
ImageGenerationTool$Outbound,
|
|
48
48
|
ImageGenerationTool$outboundSchema,
|
|
49
49
|
} from "./imagegenerationtool.js";
|
|
50
|
+
import {
|
|
51
|
+
MetadataDict,
|
|
52
|
+
MetadataDict$Outbound,
|
|
53
|
+
MetadataDict$outboundSchema,
|
|
54
|
+
} from "./metadatadict.js";
|
|
50
55
|
import {
|
|
51
56
|
WebSearchPremiumTool,
|
|
52
57
|
WebSearchPremiumTool$Outbound,
|
|
@@ -67,13 +72,13 @@ export type ConversationRequestHandoffExecution = ClosedEnum<
|
|
|
67
72
|
>;
|
|
68
73
|
|
|
69
74
|
export type ConversationRequestTool =
|
|
70
|
-
| CodeInterpreterTool
|
|
71
|
-
| CustomConnector
|
|
72
|
-
| DocumentLibraryTool
|
|
75
|
+
| (CodeInterpreterTool & { type: "code_interpreter" })
|
|
76
|
+
| (CustomConnector & { type: "connector" })
|
|
77
|
+
| (DocumentLibraryTool & { type: "document_library" })
|
|
73
78
|
| FunctionTool
|
|
74
|
-
| ImageGenerationTool
|
|
75
|
-
| WebSearchTool
|
|
76
|
-
| WebSearchPremiumTool;
|
|
79
|
+
| (ImageGenerationTool & { type: "image_generation" })
|
|
80
|
+
| (WebSearchTool & { type: "web_search" })
|
|
81
|
+
| (WebSearchPremiumTool & { type: "web_search_premium" });
|
|
77
82
|
|
|
78
83
|
export type ConversationRequestAgentVersion = string | number;
|
|
79
84
|
|
|
@@ -85,13 +90,13 @@ export type ConversationRequest = {
|
|
|
85
90
|
instructions?: string | null | undefined;
|
|
86
91
|
tools?:
|
|
87
92
|
| Array<
|
|
88
|
-
| CodeInterpreterTool
|
|
89
|
-
| CustomConnector
|
|
90
|
-
| DocumentLibraryTool
|
|
93
|
+
| (CodeInterpreterTool & { type: "code_interpreter" })
|
|
94
|
+
| (CustomConnector & { type: "connector" })
|
|
95
|
+
| (DocumentLibraryTool & { type: "document_library" })
|
|
91
96
|
| FunctionTool
|
|
92
|
-
| ImageGenerationTool
|
|
93
|
-
| WebSearchTool
|
|
94
|
-
| WebSearchPremiumTool
|
|
97
|
+
| (ImageGenerationTool & { type: "image_generation" })
|
|
98
|
+
| (WebSearchTool & { type: "web_search" })
|
|
99
|
+
| (WebSearchPremiumTool & { type: "web_search_premium" })
|
|
95
100
|
>
|
|
96
101
|
| null
|
|
97
102
|
| undefined;
|
|
@@ -99,7 +104,7 @@ export type ConversationRequest = {
|
|
|
99
104
|
guardrails?: Array<GuardrailConfig> | null | undefined;
|
|
100
105
|
name?: string | null | undefined;
|
|
101
106
|
description?: string | null | undefined;
|
|
102
|
-
metadata?:
|
|
107
|
+
metadata?: MetadataDict | null | undefined;
|
|
103
108
|
agentId?: string | null | undefined;
|
|
104
109
|
agentVersion?: string | number | null | undefined;
|
|
105
110
|
model?: string | null | undefined;
|
|
@@ -112,26 +117,36 @@ export const ConversationRequestHandoffExecution$outboundSchema: z.ZodEnum<
|
|
|
112
117
|
|
|
113
118
|
/** @internal */
|
|
114
119
|
export type ConversationRequestTool$Outbound =
|
|
115
|
-
| CodeInterpreterTool$Outbound
|
|
116
|
-
| CustomConnector$Outbound
|
|
117
|
-
| DocumentLibraryTool$Outbound
|
|
120
|
+
| (CodeInterpreterTool$Outbound & { type: "code_interpreter" })
|
|
121
|
+
| (CustomConnector$Outbound & { type: "connector" })
|
|
122
|
+
| (DocumentLibraryTool$Outbound & { type: "document_library" })
|
|
118
123
|
| FunctionTool$Outbound
|
|
119
|
-
| ImageGenerationTool$Outbound
|
|
120
|
-
| WebSearchTool$Outbound
|
|
121
|
-
| WebSearchPremiumTool$Outbound;
|
|
124
|
+
| (ImageGenerationTool$Outbound & { type: "image_generation" })
|
|
125
|
+
| (WebSearchTool$Outbound & { type: "web_search" })
|
|
126
|
+
| (WebSearchPremiumTool$Outbound & { type: "web_search_premium" });
|
|
122
127
|
|
|
123
128
|
/** @internal */
|
|
124
129
|
export const ConversationRequestTool$outboundSchema: z.ZodType<
|
|
125
130
|
ConversationRequestTool$Outbound,
|
|
126
131
|
ConversationRequestTool
|
|
127
132
|
> = z.union([
|
|
128
|
-
CodeInterpreterTool$outboundSchema
|
|
129
|
-
|
|
130
|
-
|
|
133
|
+
CodeInterpreterTool$outboundSchema.and(
|
|
134
|
+
z.object({ type: z.literal("code_interpreter") }),
|
|
135
|
+
),
|
|
136
|
+
CustomConnector$outboundSchema.and(
|
|
137
|
+
z.object({ type: z.literal("connector") }),
|
|
138
|
+
),
|
|
139
|
+
DocumentLibraryTool$outboundSchema.and(
|
|
140
|
+
z.object({ type: z.literal("document_library") }),
|
|
141
|
+
),
|
|
131
142
|
FunctionTool$outboundSchema,
|
|
132
|
-
ImageGenerationTool$outboundSchema
|
|
133
|
-
|
|
134
|
-
|
|
143
|
+
ImageGenerationTool$outboundSchema.and(
|
|
144
|
+
z.object({ type: z.literal("image_generation") }),
|
|
145
|
+
),
|
|
146
|
+
WebSearchTool$outboundSchema.and(z.object({ type: z.literal("web_search") })),
|
|
147
|
+
WebSearchPremiumTool$outboundSchema.and(
|
|
148
|
+
z.object({ type: z.literal("web_search_premium") }),
|
|
149
|
+
),
|
|
135
150
|
]);
|
|
136
151
|
|
|
137
152
|
export function conversationRequestToolToJSON(
|
|
@@ -170,13 +185,13 @@ export type ConversationRequest$Outbound = {
|
|
|
170
185
|
instructions?: string | null | undefined;
|
|
171
186
|
tools?:
|
|
172
187
|
| Array<
|
|
173
|
-
| CodeInterpreterTool$Outbound
|
|
174
|
-
| CustomConnector$Outbound
|
|
175
|
-
| DocumentLibraryTool$Outbound
|
|
188
|
+
| (CodeInterpreterTool$Outbound & { type: "code_interpreter" })
|
|
189
|
+
| (CustomConnector$Outbound & { type: "connector" })
|
|
190
|
+
| (DocumentLibraryTool$Outbound & { type: "document_library" })
|
|
176
191
|
| FunctionTool$Outbound
|
|
177
|
-
| ImageGenerationTool$Outbound
|
|
178
|
-
| WebSearchTool$Outbound
|
|
179
|
-
| WebSearchPremiumTool$Outbound
|
|
192
|
+
| (ImageGenerationTool$Outbound & { type: "image_generation" })
|
|
193
|
+
| (WebSearchTool$Outbound & { type: "web_search" })
|
|
194
|
+
| (WebSearchPremiumTool$Outbound & { type: "web_search_premium" })
|
|
180
195
|
>
|
|
181
196
|
| null
|
|
182
197
|
| undefined;
|
|
@@ -184,7 +199,7 @@ export type ConversationRequest$Outbound = {
|
|
|
184
199
|
guardrails?: Array<GuardrailConfig$Outbound> | null | undefined;
|
|
185
200
|
name?: string | null | undefined;
|
|
186
201
|
description?: string | null | undefined;
|
|
187
|
-
metadata?:
|
|
202
|
+
metadata?: MetadataDict$Outbound | null | undefined;
|
|
188
203
|
agent_id?: string | null | undefined;
|
|
189
204
|
agent_version?: string | number | null | undefined;
|
|
190
205
|
model?: string | null | undefined;
|
|
@@ -205,13 +220,25 @@ export const ConversationRequest$outboundSchema: z.ZodType<
|
|
|
205
220
|
tools: z.nullable(
|
|
206
221
|
z.array(
|
|
207
222
|
z.union([
|
|
208
|
-
CodeInterpreterTool$outboundSchema
|
|
209
|
-
|
|
210
|
-
|
|
223
|
+
CodeInterpreterTool$outboundSchema.and(
|
|
224
|
+
z.object({ type: z.literal("code_interpreter") }),
|
|
225
|
+
),
|
|
226
|
+
CustomConnector$outboundSchema.and(
|
|
227
|
+
z.object({ type: z.literal("connector") }),
|
|
228
|
+
),
|
|
229
|
+
DocumentLibraryTool$outboundSchema.and(
|
|
230
|
+
z.object({ type: z.literal("document_library") }),
|
|
231
|
+
),
|
|
211
232
|
FunctionTool$outboundSchema,
|
|
212
|
-
ImageGenerationTool$outboundSchema
|
|
213
|
-
|
|
214
|
-
|
|
233
|
+
ImageGenerationTool$outboundSchema.and(
|
|
234
|
+
z.object({ type: z.literal("image_generation") }),
|
|
235
|
+
),
|
|
236
|
+
WebSearchTool$outboundSchema.and(
|
|
237
|
+
z.object({ type: z.literal("web_search") }),
|
|
238
|
+
),
|
|
239
|
+
WebSearchPremiumTool$outboundSchema.and(
|
|
240
|
+
z.object({ type: z.literal("web_search_premium") }),
|
|
241
|
+
),
|
|
215
242
|
]),
|
|
216
243
|
),
|
|
217
244
|
).optional(),
|
|
@@ -219,7 +246,7 @@ export const ConversationRequest$outboundSchema: z.ZodType<
|
|
|
219
246
|
guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
|
|
220
247
|
name: z.nullable(z.string()).optional(),
|
|
221
248
|
description: z.nullable(z.string()).optional(),
|
|
222
|
-
metadata: z.nullable(
|
|
249
|
+
metadata: z.nullable(MetadataDict$outboundSchema).optional(),
|
|
223
250
|
agentId: z.nullable(z.string()).optional(),
|
|
224
251
|
agentVersion: z.nullable(smartUnion([z.string(), z.int()])).optional(),
|
|
225
252
|
model: z.nullable(z.string()).optional(),
|
|
@@ -36,8 +36,6 @@ export type ConversationResponseOutput =
|
|
|
36
36
|
| ToolExecutionEntry
|
|
37
37
|
| MessageOutputEntry;
|
|
38
38
|
|
|
39
|
-
export type Guardrail = {};
|
|
40
|
-
|
|
41
39
|
/**
|
|
42
40
|
* The response after appending new entries to the conversation.
|
|
43
41
|
*/
|
|
@@ -51,7 +49,7 @@ export type ConversationResponse = {
|
|
|
51
49
|
| MessageOutputEntry
|
|
52
50
|
>;
|
|
53
51
|
usage: ConversationUsageInfo;
|
|
54
|
-
guardrails?: Array<
|
|
52
|
+
guardrails?: Array<{ [k: string]: any }> | null | undefined;
|
|
55
53
|
};
|
|
56
54
|
|
|
57
55
|
/** @internal */
|
|
@@ -75,21 +73,6 @@ export function conversationResponseOutputFromJSON(
|
|
|
75
73
|
);
|
|
76
74
|
}
|
|
77
75
|
|
|
78
|
-
/** @internal */
|
|
79
|
-
export const Guardrail$inboundSchema: z.ZodType<Guardrail, unknown> = z.object(
|
|
80
|
-
{},
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
export function guardrailFromJSON(
|
|
84
|
-
jsonString: string,
|
|
85
|
-
): SafeParseResult<Guardrail, SDKValidationError> {
|
|
86
|
-
return safeParse(
|
|
87
|
-
jsonString,
|
|
88
|
-
(x) => Guardrail$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
-
`Failed to parse 'Guardrail' from JSON`,
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
76
|
/** @internal */
|
|
94
77
|
export const ConversationResponse$inboundSchema: z.ZodType<
|
|
95
78
|
ConversationResponse,
|
|
@@ -106,8 +89,7 @@ export const ConversationResponse$inboundSchema: z.ZodType<
|
|
|
106
89
|
]),
|
|
107
90
|
),
|
|
108
91
|
usage: ConversationUsageInfo$inboundSchema,
|
|
109
|
-
guardrails: z.nullable(z.array(z.
|
|
110
|
-
.optional(),
|
|
92
|
+
guardrails: z.nullable(z.array(z.record(z.string(), z.any()))).optional(),
|
|
111
93
|
}).transform((v) => {
|
|
112
94
|
return remap$(v, {
|
|
113
95
|
"conversation_id": "conversationId",
|
|
@@ -22,6 +22,11 @@ import {
|
|
|
22
22
|
GuardrailConfig$Outbound,
|
|
23
23
|
GuardrailConfig$outboundSchema,
|
|
24
24
|
} from "./guardrailconfig.js";
|
|
25
|
+
import {
|
|
26
|
+
MetadataDict,
|
|
27
|
+
MetadataDict$Outbound,
|
|
28
|
+
MetadataDict$outboundSchema,
|
|
29
|
+
} from "./metadatadict.js";
|
|
25
30
|
|
|
26
31
|
export const ConversationRestartRequestHandoffExecution = {
|
|
27
32
|
Client: "client",
|
|
@@ -55,7 +60,7 @@ export type ConversationRestartRequest = {
|
|
|
55
60
|
/**
|
|
56
61
|
* Custom metadata for the conversation.
|
|
57
62
|
*/
|
|
58
|
-
metadata?:
|
|
63
|
+
metadata?: MetadataDict | null | undefined;
|
|
59
64
|
fromEntryId: string;
|
|
60
65
|
/**
|
|
61
66
|
* Specific version of the agent to use when restarting. If not provided, uses the current version.
|
|
@@ -97,7 +102,7 @@ export type ConversationRestartRequest$Outbound = {
|
|
|
97
102
|
handoff_execution: string;
|
|
98
103
|
completion_args?: CompletionArgs$Outbound | undefined;
|
|
99
104
|
guardrails?: Array<GuardrailConfig$Outbound> | null | undefined;
|
|
100
|
-
metadata?:
|
|
105
|
+
metadata?: MetadataDict$Outbound | null | undefined;
|
|
101
106
|
from_entry_id: string;
|
|
102
107
|
agent_version?: string | number | null | undefined;
|
|
103
108
|
};
|
|
@@ -114,7 +119,7 @@ export const ConversationRestartRequest$outboundSchema: z.ZodType<
|
|
|
114
119
|
.default("server"),
|
|
115
120
|
completionArgs: CompletionArgs$outboundSchema.optional(),
|
|
116
121
|
guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
|
|
117
|
-
metadata: z.nullable(
|
|
122
|
+
metadata: z.nullable(MetadataDict$outboundSchema).optional(),
|
|
118
123
|
fromEntryId: z.string(),
|
|
119
124
|
agentVersion: z.nullable(smartUnion([z.string(), z.int()])).optional(),
|
|
120
125
|
}).transform((v) => {
|
|
@@ -22,6 +22,11 @@ import {
|
|
|
22
22
|
GuardrailConfig$Outbound,
|
|
23
23
|
GuardrailConfig$outboundSchema,
|
|
24
24
|
} from "./guardrailconfig.js";
|
|
25
|
+
import {
|
|
26
|
+
MetadataDict,
|
|
27
|
+
MetadataDict$Outbound,
|
|
28
|
+
MetadataDict$outboundSchema,
|
|
29
|
+
} from "./metadatadict.js";
|
|
25
30
|
|
|
26
31
|
export const ConversationRestartStreamRequestHandoffExecution = {
|
|
27
32
|
Client: "client",
|
|
@@ -57,7 +62,7 @@ export type ConversationRestartStreamRequest = {
|
|
|
57
62
|
/**
|
|
58
63
|
* Custom metadata for the conversation.
|
|
59
64
|
*/
|
|
60
|
-
metadata?:
|
|
65
|
+
metadata?: MetadataDict | null | undefined;
|
|
61
66
|
fromEntryId: string;
|
|
62
67
|
/**
|
|
63
68
|
* Specific version of the agent to use when restarting. If not provided, uses the current version.
|
|
@@ -102,7 +107,7 @@ export type ConversationRestartStreamRequest$Outbound = {
|
|
|
102
107
|
handoff_execution: string;
|
|
103
108
|
completion_args?: CompletionArgs$Outbound | undefined;
|
|
104
109
|
guardrails?: Array<GuardrailConfig$Outbound> | null | undefined;
|
|
105
|
-
metadata?:
|
|
110
|
+
metadata?: MetadataDict$Outbound | null | undefined;
|
|
106
111
|
from_entry_id: string;
|
|
107
112
|
agent_version?: string | number | null | undefined;
|
|
108
113
|
};
|
|
@@ -121,7 +126,7 @@ export const ConversationRestartStreamRequest$outboundSchema: z.ZodType<
|
|
|
121
126
|
),
|
|
122
127
|
completionArgs: CompletionArgs$outboundSchema.optional(),
|
|
123
128
|
guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
|
|
124
|
-
metadata: z.nullable(
|
|
129
|
+
metadata: z.nullable(MetadataDict$outboundSchema).optional(),
|
|
125
130
|
fromEntryId: z.string(),
|
|
126
131
|
agentVersion: z.nullable(smartUnion([z.string(), z.int()])).optional(),
|
|
127
132
|
}).transform((v) => {
|
|
@@ -47,6 +47,11 @@ import {
|
|
|
47
47
|
ImageGenerationTool$Outbound,
|
|
48
48
|
ImageGenerationTool$outboundSchema,
|
|
49
49
|
} from "./imagegenerationtool.js";
|
|
50
|
+
import {
|
|
51
|
+
MetadataDict,
|
|
52
|
+
MetadataDict$Outbound,
|
|
53
|
+
MetadataDict$outboundSchema,
|
|
54
|
+
} from "./metadatadict.js";
|
|
50
55
|
import {
|
|
51
56
|
WebSearchPremiumTool,
|
|
52
57
|
WebSearchPremiumTool$Outbound,
|
|
@@ -67,13 +72,13 @@ export type ConversationStreamRequestHandoffExecution = ClosedEnum<
|
|
|
67
72
|
>;
|
|
68
73
|
|
|
69
74
|
export type ConversationStreamRequestTool =
|
|
70
|
-
| CodeInterpreterTool
|
|
71
|
-
| CustomConnector
|
|
72
|
-
| DocumentLibraryTool
|
|
75
|
+
| (CodeInterpreterTool & { type: "code_interpreter" })
|
|
76
|
+
| (CustomConnector & { type: "connector" })
|
|
77
|
+
| (DocumentLibraryTool & { type: "document_library" })
|
|
73
78
|
| FunctionTool
|
|
74
|
-
| ImageGenerationTool
|
|
75
|
-
| WebSearchTool
|
|
76
|
-
| WebSearchPremiumTool;
|
|
79
|
+
| (ImageGenerationTool & { type: "image_generation" })
|
|
80
|
+
| (WebSearchTool & { type: "web_search" })
|
|
81
|
+
| (WebSearchPremiumTool & { type: "web_search_premium" });
|
|
77
82
|
|
|
78
83
|
export type ConversationStreamRequestAgentVersion = string | number;
|
|
79
84
|
|
|
@@ -88,13 +93,13 @@ export type ConversationStreamRequest = {
|
|
|
88
93
|
instructions?: string | null | undefined;
|
|
89
94
|
tools?:
|
|
90
95
|
| Array<
|
|
91
|
-
| CodeInterpreterTool
|
|
92
|
-
| CustomConnector
|
|
93
|
-
| DocumentLibraryTool
|
|
96
|
+
| (CodeInterpreterTool & { type: "code_interpreter" })
|
|
97
|
+
| (CustomConnector & { type: "connector" })
|
|
98
|
+
| (DocumentLibraryTool & { type: "document_library" })
|
|
94
99
|
| FunctionTool
|
|
95
|
-
| ImageGenerationTool
|
|
96
|
-
| WebSearchTool
|
|
97
|
-
| WebSearchPremiumTool
|
|
100
|
+
| (ImageGenerationTool & { type: "image_generation" })
|
|
101
|
+
| (WebSearchTool & { type: "web_search" })
|
|
102
|
+
| (WebSearchPremiumTool & { type: "web_search_premium" })
|
|
98
103
|
>
|
|
99
104
|
| null
|
|
100
105
|
| undefined;
|
|
@@ -102,7 +107,7 @@ export type ConversationStreamRequest = {
|
|
|
102
107
|
guardrails?: Array<GuardrailConfig> | null | undefined;
|
|
103
108
|
name?: string | null | undefined;
|
|
104
109
|
description?: string | null | undefined;
|
|
105
|
-
metadata?:
|
|
110
|
+
metadata?: MetadataDict | null | undefined;
|
|
106
111
|
agentId?: string | null | undefined;
|
|
107
112
|
agentVersion?: string | number | null | undefined;
|
|
108
113
|
model?: string | null | undefined;
|
|
@@ -116,26 +121,36 @@ export const ConversationStreamRequestHandoffExecution$outboundSchema:
|
|
|
116
121
|
|
|
117
122
|
/** @internal */
|
|
118
123
|
export type ConversationStreamRequestTool$Outbound =
|
|
119
|
-
| CodeInterpreterTool$Outbound
|
|
120
|
-
| CustomConnector$Outbound
|
|
121
|
-
| DocumentLibraryTool$Outbound
|
|
124
|
+
| (CodeInterpreterTool$Outbound & { type: "code_interpreter" })
|
|
125
|
+
| (CustomConnector$Outbound & { type: "connector" })
|
|
126
|
+
| (DocumentLibraryTool$Outbound & { type: "document_library" })
|
|
122
127
|
| FunctionTool$Outbound
|
|
123
|
-
| ImageGenerationTool$Outbound
|
|
124
|
-
| WebSearchTool$Outbound
|
|
125
|
-
| WebSearchPremiumTool$Outbound;
|
|
128
|
+
| (ImageGenerationTool$Outbound & { type: "image_generation" })
|
|
129
|
+
| (WebSearchTool$Outbound & { type: "web_search" })
|
|
130
|
+
| (WebSearchPremiumTool$Outbound & { type: "web_search_premium" });
|
|
126
131
|
|
|
127
132
|
/** @internal */
|
|
128
133
|
export const ConversationStreamRequestTool$outboundSchema: z.ZodType<
|
|
129
134
|
ConversationStreamRequestTool$Outbound,
|
|
130
135
|
ConversationStreamRequestTool
|
|
131
136
|
> = z.union([
|
|
132
|
-
CodeInterpreterTool$outboundSchema
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
CodeInterpreterTool$outboundSchema.and(
|
|
138
|
+
z.object({ type: z.literal("code_interpreter") }),
|
|
139
|
+
),
|
|
140
|
+
CustomConnector$outboundSchema.and(
|
|
141
|
+
z.object({ type: z.literal("connector") }),
|
|
142
|
+
),
|
|
143
|
+
DocumentLibraryTool$outboundSchema.and(
|
|
144
|
+
z.object({ type: z.literal("document_library") }),
|
|
145
|
+
),
|
|
135
146
|
FunctionTool$outboundSchema,
|
|
136
|
-
ImageGenerationTool$outboundSchema
|
|
137
|
-
|
|
138
|
-
|
|
147
|
+
ImageGenerationTool$outboundSchema.and(
|
|
148
|
+
z.object({ type: z.literal("image_generation") }),
|
|
149
|
+
),
|
|
150
|
+
WebSearchTool$outboundSchema.and(z.object({ type: z.literal("web_search") })),
|
|
151
|
+
WebSearchPremiumTool$outboundSchema.and(
|
|
152
|
+
z.object({ type: z.literal("web_search_premium") }),
|
|
153
|
+
),
|
|
139
154
|
]);
|
|
140
155
|
|
|
141
156
|
export function conversationStreamRequestToolToJSON(
|
|
@@ -176,13 +191,13 @@ export type ConversationStreamRequest$Outbound = {
|
|
|
176
191
|
instructions?: string | null | undefined;
|
|
177
192
|
tools?:
|
|
178
193
|
| Array<
|
|
179
|
-
| CodeInterpreterTool$Outbound
|
|
180
|
-
| CustomConnector$Outbound
|
|
181
|
-
| DocumentLibraryTool$Outbound
|
|
194
|
+
| (CodeInterpreterTool$Outbound & { type: "code_interpreter" })
|
|
195
|
+
| (CustomConnector$Outbound & { type: "connector" })
|
|
196
|
+
| (DocumentLibraryTool$Outbound & { type: "document_library" })
|
|
182
197
|
| FunctionTool$Outbound
|
|
183
|
-
| ImageGenerationTool$Outbound
|
|
184
|
-
| WebSearchTool$Outbound
|
|
185
|
-
| WebSearchPremiumTool$Outbound
|
|
198
|
+
| (ImageGenerationTool$Outbound & { type: "image_generation" })
|
|
199
|
+
| (WebSearchTool$Outbound & { type: "web_search" })
|
|
200
|
+
| (WebSearchPremiumTool$Outbound & { type: "web_search_premium" })
|
|
186
201
|
>
|
|
187
202
|
| null
|
|
188
203
|
| undefined;
|
|
@@ -190,7 +205,7 @@ export type ConversationStreamRequest$Outbound = {
|
|
|
190
205
|
guardrails?: Array<GuardrailConfig$Outbound> | null | undefined;
|
|
191
206
|
name?: string | null | undefined;
|
|
192
207
|
description?: string | null | undefined;
|
|
193
|
-
metadata?:
|
|
208
|
+
metadata?: MetadataDict$Outbound | null | undefined;
|
|
194
209
|
agent_id?: string | null | undefined;
|
|
195
210
|
agent_version?: string | number | null | undefined;
|
|
196
211
|
model?: string | null | undefined;
|
|
@@ -211,13 +226,25 @@ export const ConversationStreamRequest$outboundSchema: z.ZodType<
|
|
|
211
226
|
tools: z.nullable(
|
|
212
227
|
z.array(
|
|
213
228
|
z.union([
|
|
214
|
-
CodeInterpreterTool$outboundSchema
|
|
215
|
-
|
|
216
|
-
|
|
229
|
+
CodeInterpreterTool$outboundSchema.and(
|
|
230
|
+
z.object({ type: z.literal("code_interpreter") }),
|
|
231
|
+
),
|
|
232
|
+
CustomConnector$outboundSchema.and(
|
|
233
|
+
z.object({ type: z.literal("connector") }),
|
|
234
|
+
),
|
|
235
|
+
DocumentLibraryTool$outboundSchema.and(
|
|
236
|
+
z.object({ type: z.literal("document_library") }),
|
|
237
|
+
),
|
|
217
238
|
FunctionTool$outboundSchema,
|
|
218
|
-
ImageGenerationTool$outboundSchema
|
|
219
|
-
|
|
220
|
-
|
|
239
|
+
ImageGenerationTool$outboundSchema.and(
|
|
240
|
+
z.object({ type: z.literal("image_generation") }),
|
|
241
|
+
),
|
|
242
|
+
WebSearchTool$outboundSchema.and(
|
|
243
|
+
z.object({ type: z.literal("web_search") }),
|
|
244
|
+
),
|
|
245
|
+
WebSearchPremiumTool$outboundSchema.and(
|
|
246
|
+
z.object({ type: z.literal("web_search_premium") }),
|
|
247
|
+
),
|
|
221
248
|
]),
|
|
222
249
|
),
|
|
223
250
|
).optional(),
|
|
@@ -225,7 +252,7 @@ export const ConversationStreamRequest$outboundSchema: z.ZodType<
|
|
|
225
252
|
guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
|
|
226
253
|
name: z.nullable(z.string()).optional(),
|
|
227
254
|
description: z.nullable(z.string()).optional(),
|
|
228
|
-
metadata: z.nullable(
|
|
255
|
+
metadata: z.nullable(MetadataDict$outboundSchema).optional(),
|
|
229
256
|
agentId: z.nullable(z.string()).optional(),
|
|
230
257
|
agentVersion: z.nullable(smartUnion([z.string(), z.int()])).optional(),
|
|
231
258
|
model: z.nullable(z.string()).optional(),
|