@mistralai/mistralai 2.0.0 → 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 +45 -33
- package/RUNTIMES.md +1 -1
- package/esm/extra/structChat.js +1 -1
- 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/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- 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 +22 -2
- package/esm/models/components/agentscompletionrequest.d.ts.map +1 -1
- package/esm/models/components/agentscompletionrequest.js +62 -14
- package/esm/models/components/agentscompletionrequest.js.map +1 -1
- package/esm/models/components/agentscompletionstreamrequest.d.ts +22 -2
- package/esm/models/components/agentscompletionstreamrequest.d.ts.map +1 -1
- package/esm/models/components/agentscompletionstreamrequest.js +62 -14
- package/esm/models/components/agentscompletionstreamrequest.js.map +1 -1
- 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/chatcompletionrequest.d.ts +25 -2
- package/esm/models/components/chatcompletionrequest.d.ts.map +1 -1
- package/esm/models/components/chatcompletionrequest.js +63 -15
- package/esm/models/components/chatcompletionrequest.js.map +1 -1
- package/esm/models/components/chatcompletionstreamrequest.d.ts +25 -2
- package/esm/models/components/chatcompletionstreamrequest.d.ts.map +1 -1
- package/esm/models/components/chatcompletionstreamrequest.js +63 -15
- 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/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/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/index.d.ts +17 -0
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +17 -0
- package/esm/models/components/index.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/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 +1 -0
- package/esm/models/components/modelcapabilities.d.ts.map +1 -1
- package/esm/models/components/modelcapabilities.js +1 -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 +5 -3
- package/esm/models/components/reasoningeffort.d.ts.map +1 -1
- package/esm/models/components/reasoningeffort.js +4 -2
- package/esm/models/components/reasoningeffort.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/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 +6 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +6 -0
- package/esm/models/operations/index.js.map +1 -1
- 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/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/jsr.json +1 -1
- package/package.json +1 -1
- package/src/extra/structChat.ts +2 -2
- 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/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 +186 -16
- package/src/models/components/agentscompletionstreamrequest.ts +186 -16
- package/src/models/components/basefielddefinition.ts +8 -6
- package/src/models/components/chatcompletionrequest.ts +190 -17
- package/src/models/components/chatcompletionstreamrequest.ts +190 -17
- 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/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/imagegenerationtool.ts +21 -4
- package/src/models/components/index.ts +17 -0
- package/src/models/components/internalmetadata.ts +126 -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 +2 -0
- package/src/models/components/modelconversation.ts +51 -26
- package/src/models/components/prompttokensdetails.ts +42 -0
- package/src/models/components/reasoningeffort.ts +12 -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/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 +6 -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/sdk.ts +5 -5
- package/src/sdk/speech.ts +31 -0
- package/src/sdk/voices.ts +119 -0
|
@@ -11,11 +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";
|
|
14
29
|
import {
|
|
15
30
|
GuardrailConfig,
|
|
16
31
|
GuardrailConfig$Outbound,
|
|
17
32
|
GuardrailConfig$outboundSchema,
|
|
18
33
|
} from "./guardrailconfig.js";
|
|
34
|
+
import {
|
|
35
|
+
ImageGenerationTool,
|
|
36
|
+
ImageGenerationTool$Outbound,
|
|
37
|
+
ImageGenerationTool$outboundSchema,
|
|
38
|
+
} from "./imagegenerationtool.js";
|
|
19
39
|
import {
|
|
20
40
|
MistralPromptMode,
|
|
21
41
|
MistralPromptMode$outboundSchema,
|
|
@@ -59,6 +79,16 @@ import {
|
|
|
59
79
|
UserMessage$Outbound,
|
|
60
80
|
UserMessage$outboundSchema,
|
|
61
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";
|
|
62
92
|
|
|
63
93
|
/**
|
|
64
94
|
* Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
|
|
@@ -71,6 +101,27 @@ export type AgentsCompletionStreamRequestMessage =
|
|
|
71
101
|
| ToolMessage
|
|
72
102
|
| UserMessage;
|
|
73
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
|
+
|
|
74
125
|
export type AgentsCompletionStreamRequestToolChoice =
|
|
75
126
|
| ToolChoice
|
|
76
127
|
| ToolChoiceEnum;
|
|
@@ -103,7 +154,19 @@ export type AgentsCompletionStreamRequest = {
|
|
|
103
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.
|
|
104
155
|
*/
|
|
105
156
|
responseFormat?: ResponseFormat | undefined;
|
|
106
|
-
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;
|
|
107
170
|
toolChoice?: ToolChoice | ToolChoiceEnum | undefined;
|
|
108
171
|
/**
|
|
109
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.
|
|
@@ -132,6 +195,7 @@ export type AgentsCompletionStreamRequest = {
|
|
|
132
195
|
* The ID of the agent to use for this completion.
|
|
133
196
|
*/
|
|
134
197
|
agentId: string;
|
|
198
|
+
[additionalProperties: string]: unknown;
|
|
135
199
|
};
|
|
136
200
|
|
|
137
201
|
/** @internal */
|
|
@@ -183,6 +247,82 @@ export function agentsCompletionStreamRequestMessageToJSON(
|
|
|
183
247
|
);
|
|
184
248
|
}
|
|
185
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
|
+
|
|
186
326
|
/** @internal */
|
|
187
327
|
export type AgentsCompletionStreamRequestToolChoice$Outbound =
|
|
188
328
|
| ToolChoice$Outbound
|
|
@@ -219,7 +359,19 @@ export type AgentsCompletionStreamRequest$Outbound = {
|
|
|
219
359
|
| UserMessage$Outbound
|
|
220
360
|
>;
|
|
221
361
|
response_format?: ResponseFormat$Outbound | undefined;
|
|
222
|
-
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;
|
|
223
375
|
tool_choice?: ToolChoice$Outbound | string | undefined;
|
|
224
376
|
presence_penalty?: number | undefined;
|
|
225
377
|
frequency_penalty?: number | undefined;
|
|
@@ -230,6 +382,7 @@ export type AgentsCompletionStreamRequest$Outbound = {
|
|
|
230
382
|
prompt_mode?: string | null | undefined;
|
|
231
383
|
guardrails?: Array<GuardrailConfig$Outbound> | null | undefined;
|
|
232
384
|
agent_id: string;
|
|
385
|
+
[additionalProperties: string]: unknown;
|
|
233
386
|
};
|
|
234
387
|
|
|
235
388
|
/** @internal */
|
|
@@ -253,7 +406,22 @@ export const AgentsCompletionStreamRequest$outboundSchema: z.ZodType<
|
|
|
253
406
|
]),
|
|
254
407
|
),
|
|
255
408
|
responseFormat: ResponseFormat$outboundSchema.optional(),
|
|
256
|
-
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(),
|
|
257
425
|
toolChoice: smartUnion([
|
|
258
426
|
ToolChoice$outboundSchema,
|
|
259
427
|
ToolChoiceEnum$outboundSchema,
|
|
@@ -267,19 +435,21 @@ export const AgentsCompletionStreamRequest$outboundSchema: z.ZodType<
|
|
|
267
435
|
promptMode: z.nullable(MistralPromptMode$outboundSchema).optional(),
|
|
268
436
|
guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
|
|
269
437
|
agentId: z.string(),
|
|
270
|
-
}).transform((v) => {
|
|
271
|
-
return
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
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
|
+
};
|
|
283
453
|
});
|
|
284
454
|
|
|
285
455
|
export function agentsCompletionStreamRequestToJSON(
|
|
@@ -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) => {
|
|
@@ -11,11 +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";
|
|
14
29
|
import {
|
|
15
30
|
GuardrailConfig,
|
|
16
31
|
GuardrailConfig$Outbound,
|
|
17
32
|
GuardrailConfig$outboundSchema,
|
|
18
33
|
} from "./guardrailconfig.js";
|
|
34
|
+
import {
|
|
35
|
+
ImageGenerationTool,
|
|
36
|
+
ImageGenerationTool$Outbound,
|
|
37
|
+
ImageGenerationTool$outboundSchema,
|
|
38
|
+
} from "./imagegenerationtool.js";
|
|
19
39
|
import {
|
|
20
40
|
MistralPromptMode,
|
|
21
41
|
MistralPromptMode$outboundSchema,
|
|
@@ -59,6 +79,16 @@ import {
|
|
|
59
79
|
UserMessage$Outbound,
|
|
60
80
|
UserMessage$outboundSchema,
|
|
61
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";
|
|
62
92
|
|
|
63
93
|
/**
|
|
64
94
|
* Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
|
|
@@ -71,6 +101,30 @@ export type ChatCompletionRequestMessage =
|
|
|
71
101
|
| ToolMessage
|
|
72
102
|
| UserMessage;
|
|
73
103
|
|
|
104
|
+
export type ChatCompletionRequestTools1 =
|
|
105
|
+
| DocumentLibraryTool
|
|
106
|
+
| CustomConnector
|
|
107
|
+
| Tool
|
|
108
|
+
| WebSearchTool
|
|
109
|
+
| WebSearchPremiumTool
|
|
110
|
+
| CodeInterpreterTool
|
|
111
|
+
| ImageGenerationTool;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
|
|
115
|
+
*/
|
|
116
|
+
export type ChatCompletionRequestTools2 =
|
|
117
|
+
| Array<
|
|
118
|
+
| DocumentLibraryTool
|
|
119
|
+
| CustomConnector
|
|
120
|
+
| Tool
|
|
121
|
+
| WebSearchTool
|
|
122
|
+
| WebSearchPremiumTool
|
|
123
|
+
| CodeInterpreterTool
|
|
124
|
+
| ImageGenerationTool
|
|
125
|
+
>
|
|
126
|
+
| Array<string>;
|
|
127
|
+
|
|
74
128
|
/**
|
|
75
129
|
* Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
|
|
76
130
|
*/
|
|
@@ -122,7 +176,19 @@ export type ChatCompletionRequest = {
|
|
|
122
176
|
/**
|
|
123
177
|
* A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
|
|
124
178
|
*/
|
|
125
|
-
tools?:
|
|
179
|
+
tools?:
|
|
180
|
+
| Array<
|
|
181
|
+
| DocumentLibraryTool
|
|
182
|
+
| CustomConnector
|
|
183
|
+
| Tool
|
|
184
|
+
| WebSearchTool
|
|
185
|
+
| WebSearchPremiumTool
|
|
186
|
+
| CodeInterpreterTool
|
|
187
|
+
| ImageGenerationTool
|
|
188
|
+
>
|
|
189
|
+
| Array<string>
|
|
190
|
+
| null
|
|
191
|
+
| undefined;
|
|
126
192
|
/**
|
|
127
193
|
* Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
|
|
128
194
|
*/
|
|
@@ -157,6 +223,7 @@ export type ChatCompletionRequest = {
|
|
|
157
223
|
* Whether to inject a safety prompt before all conversations.
|
|
158
224
|
*/
|
|
159
225
|
safePrompt?: boolean | undefined;
|
|
226
|
+
[additionalProperties: string]: unknown;
|
|
160
227
|
};
|
|
161
228
|
|
|
162
229
|
/** @internal */
|
|
@@ -206,6 +273,82 @@ export function chatCompletionRequestMessageToJSON(
|
|
|
206
273
|
);
|
|
207
274
|
}
|
|
208
275
|
|
|
276
|
+
/** @internal */
|
|
277
|
+
export type ChatCompletionRequestTools1$Outbound =
|
|
278
|
+
| DocumentLibraryTool$Outbound
|
|
279
|
+
| CustomConnector$Outbound
|
|
280
|
+
| Tool$Outbound
|
|
281
|
+
| WebSearchTool$Outbound
|
|
282
|
+
| WebSearchPremiumTool$Outbound
|
|
283
|
+
| CodeInterpreterTool$Outbound
|
|
284
|
+
| ImageGenerationTool$Outbound;
|
|
285
|
+
|
|
286
|
+
/** @internal */
|
|
287
|
+
export const ChatCompletionRequestTools1$outboundSchema: z.ZodType<
|
|
288
|
+
ChatCompletionRequestTools1$Outbound,
|
|
289
|
+
ChatCompletionRequestTools1
|
|
290
|
+
> = smartUnion([
|
|
291
|
+
DocumentLibraryTool$outboundSchema,
|
|
292
|
+
CustomConnector$outboundSchema,
|
|
293
|
+
Tool$outboundSchema,
|
|
294
|
+
WebSearchTool$outboundSchema,
|
|
295
|
+
WebSearchPremiumTool$outboundSchema,
|
|
296
|
+
CodeInterpreterTool$outboundSchema,
|
|
297
|
+
ImageGenerationTool$outboundSchema,
|
|
298
|
+
]);
|
|
299
|
+
|
|
300
|
+
export function chatCompletionRequestTools1ToJSON(
|
|
301
|
+
chatCompletionRequestTools1: ChatCompletionRequestTools1,
|
|
302
|
+
): string {
|
|
303
|
+
return JSON.stringify(
|
|
304
|
+
ChatCompletionRequestTools1$outboundSchema.parse(
|
|
305
|
+
chatCompletionRequestTools1,
|
|
306
|
+
),
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/** @internal */
|
|
311
|
+
export type ChatCompletionRequestTools2$Outbound =
|
|
312
|
+
| Array<
|
|
313
|
+
| DocumentLibraryTool$Outbound
|
|
314
|
+
| CustomConnector$Outbound
|
|
315
|
+
| Tool$Outbound
|
|
316
|
+
| WebSearchTool$Outbound
|
|
317
|
+
| WebSearchPremiumTool$Outbound
|
|
318
|
+
| CodeInterpreterTool$Outbound
|
|
319
|
+
| ImageGenerationTool$Outbound
|
|
320
|
+
>
|
|
321
|
+
| Array<string>;
|
|
322
|
+
|
|
323
|
+
/** @internal */
|
|
324
|
+
export const ChatCompletionRequestTools2$outboundSchema: z.ZodType<
|
|
325
|
+
ChatCompletionRequestTools2$Outbound,
|
|
326
|
+
ChatCompletionRequestTools2
|
|
327
|
+
> = smartUnion([
|
|
328
|
+
z.array(
|
|
329
|
+
smartUnion([
|
|
330
|
+
DocumentLibraryTool$outboundSchema,
|
|
331
|
+
CustomConnector$outboundSchema,
|
|
332
|
+
Tool$outboundSchema,
|
|
333
|
+
WebSearchTool$outboundSchema,
|
|
334
|
+
WebSearchPremiumTool$outboundSchema,
|
|
335
|
+
CodeInterpreterTool$outboundSchema,
|
|
336
|
+
ImageGenerationTool$outboundSchema,
|
|
337
|
+
]),
|
|
338
|
+
),
|
|
339
|
+
z.array(z.string()),
|
|
340
|
+
]);
|
|
341
|
+
|
|
342
|
+
export function chatCompletionRequestTools2ToJSON(
|
|
343
|
+
chatCompletionRequestTools2: ChatCompletionRequestTools2,
|
|
344
|
+
): string {
|
|
345
|
+
return JSON.stringify(
|
|
346
|
+
ChatCompletionRequestTools2$outboundSchema.parse(
|
|
347
|
+
chatCompletionRequestTools2,
|
|
348
|
+
),
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
|
|
209
352
|
/** @internal */
|
|
210
353
|
export type ChatCompletionRequestToolChoice$Outbound =
|
|
211
354
|
| ToolChoice$Outbound
|
|
@@ -244,7 +387,19 @@ export type ChatCompletionRequest$Outbound = {
|
|
|
244
387
|
| UserMessage$Outbound
|
|
245
388
|
>;
|
|
246
389
|
response_format?: ResponseFormat$Outbound | undefined;
|
|
247
|
-
tools?:
|
|
390
|
+
tools?:
|
|
391
|
+
| Array<
|
|
392
|
+
| DocumentLibraryTool$Outbound
|
|
393
|
+
| CustomConnector$Outbound
|
|
394
|
+
| Tool$Outbound
|
|
395
|
+
| WebSearchTool$Outbound
|
|
396
|
+
| WebSearchPremiumTool$Outbound
|
|
397
|
+
| CodeInterpreterTool$Outbound
|
|
398
|
+
| ImageGenerationTool$Outbound
|
|
399
|
+
>
|
|
400
|
+
| Array<string>
|
|
401
|
+
| null
|
|
402
|
+
| undefined;
|
|
248
403
|
tool_choice?: ToolChoice$Outbound | string | undefined;
|
|
249
404
|
presence_penalty?: number | undefined;
|
|
250
405
|
frequency_penalty?: number | undefined;
|
|
@@ -255,6 +410,7 @@ export type ChatCompletionRequest$Outbound = {
|
|
|
255
410
|
prompt_mode?: string | null | undefined;
|
|
256
411
|
guardrails?: Array<GuardrailConfig$Outbound> | null | undefined;
|
|
257
412
|
safe_prompt?: boolean | undefined;
|
|
413
|
+
[additionalProperties: string]: unknown;
|
|
258
414
|
};
|
|
259
415
|
|
|
260
416
|
/** @internal */
|
|
@@ -281,7 +437,22 @@ export const ChatCompletionRequest$outboundSchema: z.ZodType<
|
|
|
281
437
|
]),
|
|
282
438
|
),
|
|
283
439
|
responseFormat: ResponseFormat$outboundSchema.optional(),
|
|
284
|
-
tools: z.nullable(
|
|
440
|
+
tools: z.nullable(
|
|
441
|
+
smartUnion([
|
|
442
|
+
z.array(
|
|
443
|
+
smartUnion([
|
|
444
|
+
DocumentLibraryTool$outboundSchema,
|
|
445
|
+
CustomConnector$outboundSchema,
|
|
446
|
+
Tool$outboundSchema,
|
|
447
|
+
WebSearchTool$outboundSchema,
|
|
448
|
+
WebSearchPremiumTool$outboundSchema,
|
|
449
|
+
CodeInterpreterTool$outboundSchema,
|
|
450
|
+
ImageGenerationTool$outboundSchema,
|
|
451
|
+
]),
|
|
452
|
+
),
|
|
453
|
+
z.array(z.string()),
|
|
454
|
+
]),
|
|
455
|
+
).optional(),
|
|
285
456
|
toolChoice: smartUnion([
|
|
286
457
|
ToolChoice$outboundSchema,
|
|
287
458
|
ToolChoiceEnum$outboundSchema,
|
|
@@ -295,20 +466,22 @@ export const ChatCompletionRequest$outboundSchema: z.ZodType<
|
|
|
295
466
|
promptMode: z.nullable(MistralPromptMode$outboundSchema).optional(),
|
|
296
467
|
guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
|
|
297
468
|
safePrompt: z.boolean().optional(),
|
|
298
|
-
}).transform((v) => {
|
|
299
|
-
return
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
469
|
+
}).catchall(z.any()).transform((v) => {
|
|
470
|
+
return {
|
|
471
|
+
...remap$(v, {
|
|
472
|
+
topP: "top_p",
|
|
473
|
+
maxTokens: "max_tokens",
|
|
474
|
+
randomSeed: "random_seed",
|
|
475
|
+
responseFormat: "response_format",
|
|
476
|
+
toolChoice: "tool_choice",
|
|
477
|
+
presencePenalty: "presence_penalty",
|
|
478
|
+
frequencyPenalty: "frequency_penalty",
|
|
479
|
+
parallelToolCalls: "parallel_tool_calls",
|
|
480
|
+
reasoningEffort: "reasoning_effort",
|
|
481
|
+
promptMode: "prompt_mode",
|
|
482
|
+
safePrompt: "safe_prompt",
|
|
483
|
+
}),
|
|
484
|
+
};
|
|
312
485
|
});
|
|
313
486
|
|
|
314
487
|
export function chatCompletionRequestToJSON(
|