@openrouter/sdk 0.1.2 → 0.1.4
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/esm/funcs/modelsListEmbeddings.d.ts +18 -0
- package/esm/funcs/modelsListEmbeddings.js +72 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/activityitem.d.ts +0 -29
- package/esm/models/activityitem.js +0 -38
- package/esm/models/assistantmessage.d.ts +0 -24
- package/esm/models/assistantmessage.js +0 -22
- package/esm/models/badgatewayresponseerrordata.d.ts +0 -23
- package/esm/models/badgatewayresponseerrordata.js +0 -20
- package/esm/models/badrequestresponseerrordata.d.ts +0 -23
- package/esm/models/badrequestresponseerrordata.js +0 -20
- package/esm/models/chatcompletionfinishreason.d.ts +0 -12
- package/esm/models/chatcompletionfinishreason.js +1 -17
- package/esm/models/chaterror.d.ts +0 -39
- package/esm/models/chaterror.js +0 -40
- package/esm/models/chatgenerationparams.d.ts +3 -122
- package/esm/models/chatgenerationparams.js +7 -195
- package/esm/models/chatgenerationtokenusage.d.ts +6 -70
- package/esm/models/chatgenerationtokenusage.js +7 -89
- package/esm/models/chatmessagecontentitem.d.ts +5 -12
- package/esm/models/chatmessagecontentitem.js +7 -11
- package/esm/models/chatmessagecontentitemaudio.d.ts +0 -34
- package/esm/models/chatmessagecontentitemaudio.js +0 -33
- package/esm/models/chatmessagecontentitemimage.d.ts +0 -34
- package/esm/models/chatmessagecontentitemimage.js +0 -33
- package/esm/models/chatmessagecontentitemtext.d.ts +0 -12
- package/esm/models/chatmessagecontentitemtext.js +0 -11
- package/esm/models/chatmessagecontentitemvideo.d.ts +32 -0
- package/esm/models/chatmessagecontentitemvideo.js +46 -0
- package/esm/models/chatmessagetokenlogprob.d.ts +0 -43
- package/esm/models/chatmessagetokenlogprob.js +0 -45
- package/esm/models/chatmessagetokenlogprobs.d.ts +1 -21
- package/esm/models/chatmessagetokenlogprobs.js +1 -20
- package/esm/models/chatmessagetoolcall.d.ts +0 -24
- package/esm/models/chatmessagetoolcall.js +0 -22
- package/esm/models/chatresponse.d.ts +2 -27
- package/esm/models/chatresponse.js +2 -30
- package/esm/models/chatresponsechoice.d.ts +2 -24
- package/esm/models/chatresponsechoice.js +3 -28
- package/esm/models/chatstreamingchoice.d.ts +2 -24
- package/esm/models/chatstreamingchoice.js +3 -28
- package/esm/models/chatstreamingmessagechunk.d.ts +1 -40
- package/esm/models/chatstreamingmessagechunk.js +1 -40
- package/esm/models/chatstreamingmessagetoolcall.d.ts +0 -42
- package/esm/models/chatstreamingmessagetoolcall.js +0 -41
- package/esm/models/chatstreamingresponsechunk.d.ts +2 -67
- package/esm/models/chatstreamingresponsechunk.js +2 -69
- package/esm/models/chatstreamoptions.d.ts +0 -17
- package/esm/models/chatstreamoptions.js +0 -23
- package/esm/models/completionchoice.d.ts +1 -35
- package/esm/models/completionchoice.js +2 -43
- package/esm/models/completioncreateparams.d.ts +0 -122
- package/esm/models/completioncreateparams.js +2 -200
- package/esm/models/completionlogprobs.d.ts +0 -24
- package/esm/models/completionlogprobs.js +0 -27
- package/esm/models/completionresponse.d.ts +2 -27
- package/esm/models/completionresponse.js +2 -30
- package/esm/models/completionusage.d.ts +0 -21
- package/esm/models/completionusage.js +0 -26
- package/esm/models/createchargerequest.d.ts +0 -29
- package/esm/models/createchargerequest.js +0 -43
- package/esm/models/defaultparameters.d.ts +0 -21
- package/esm/models/defaultparameters.js +0 -25
- package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +0 -23
- package/esm/models/edgenetworktimeoutresponseerrordata.js +0 -20
- package/esm/models/endpointstatus.d.ts +0 -12
- package/esm/models/endpointstatus.js +1 -17
- package/esm/models/errors/badgatewayresponseerror.d.ts +0 -19
- package/esm/models/errors/badgatewayresponseerror.js +0 -22
- package/esm/models/errors/badrequestresponseerror.d.ts +0 -19
- package/esm/models/errors/badrequestresponseerror.js +0 -22
- package/esm/models/errors/chaterror.d.ts +0 -18
- package/esm/models/errors/chaterror.js +0 -17
- package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +0 -19
- package/esm/models/errors/edgenetworktimeoutresponseerror.js +0 -22
- package/esm/models/errors/forbiddenresponseerror.d.ts +0 -19
- package/esm/models/errors/forbiddenresponseerror.js +0 -22
- package/esm/models/errors/internalserverresponseerror.d.ts +0 -19
- package/esm/models/errors/internalserverresponseerror.js +0 -22
- package/esm/models/errors/notfoundresponseerror.d.ts +0 -19
- package/esm/models/errors/notfoundresponseerror.js +0 -22
- package/esm/models/errors/payloadtoolargeresponseerror.d.ts +0 -19
- package/esm/models/errors/payloadtoolargeresponseerror.js +0 -22
- package/esm/models/errors/paymentrequiredresponseerror.d.ts +0 -19
- package/esm/models/errors/paymentrequiredresponseerror.js +0 -22
- package/esm/models/errors/provideroverloadedresponseerror.d.ts +0 -19
- package/esm/models/errors/provideroverloadedresponseerror.js +0 -22
- package/esm/models/errors/requesttimeoutresponseerror.d.ts +0 -19
- package/esm/models/errors/requesttimeoutresponseerror.js +0 -22
- package/esm/models/errors/serviceunavailableresponseerror.d.ts +0 -19
- package/esm/models/errors/serviceunavailableresponseerror.js +0 -22
- package/esm/models/errors/toomanyrequestsresponseerror.d.ts +0 -19
- package/esm/models/errors/toomanyrequestsresponseerror.js +0 -22
- package/esm/models/errors/unauthorizedresponseerror.d.ts +0 -19
- package/esm/models/errors/unauthorizedresponseerror.js +0 -22
- package/esm/models/errors/unprocessableentityresponseerror.d.ts +0 -19
- package/esm/models/errors/unprocessableentityresponseerror.js +0 -22
- package/esm/models/filecitation.d.ts +0 -26
- package/esm/models/filecitation.js +0 -22
- package/esm/models/filepath.d.ts +0 -26
- package/esm/models/filepath.js +0 -22
- package/esm/models/forbiddenresponseerrordata.d.ts +0 -23
- package/esm/models/forbiddenresponseerrordata.js +0 -20
- package/esm/models/imagegenerationstatus.d.ts +0 -10
- package/esm/models/imagegenerationstatus.js +0 -11
- package/esm/models/index.d.ts +2 -1
- package/esm/models/index.js +2 -1
- package/esm/models/inputmodality.d.ts +0 -12
- package/esm/models/inputmodality.js +1 -17
- package/esm/models/instructtype.d.ts +0 -12
- package/esm/models/instructtype.js +1 -17
- package/esm/models/internalserverresponseerrordata.d.ts +0 -23
- package/esm/models/internalserverresponseerrordata.js +0 -20
- package/esm/models/jsonschemaconfig.d.ts +0 -17
- package/esm/models/jsonschemaconfig.js +0 -22
- package/esm/models/listendpointsresponse.d.ts +1 -60
- package/esm/models/listendpointsresponse.js +5 -73
- package/esm/models/message.d.ts +0 -47
- package/esm/models/message.js +5 -67
- package/esm/models/model.d.ts +5 -36
- package/esm/models/model.js +6 -46
- package/esm/models/modelarchitecture.d.ts +0 -35
- package/esm/models/modelarchitecture.js +4 -49
- package/esm/models/modelgroup.d.ts +0 -12
- package/esm/models/modelgroup.js +1 -18
- package/esm/models/modelscountresponse.d.ts +0 -38
- package/esm/models/modelscountresponse.js +0 -36
- package/esm/models/modelslistresponse.d.ts +1 -20
- package/esm/models/modelslistresponse.js +1 -19
- package/esm/models/namedtoolchoice.d.ts +0 -32
- package/esm/models/namedtoolchoice.js +0 -38
- package/esm/models/notfoundresponseerrordata.d.ts +0 -23
- package/esm/models/notfoundresponseerrordata.js +0 -20
- package/esm/models/openairesponsesannotation.d.ts +0 -12
- package/esm/models/openairesponsesannotation.js +0 -11
- package/esm/models/openairesponsesincludable.d.ts +0 -12
- package/esm/models/openairesponsesincludable.js +0 -18
- package/esm/models/openairesponsesincompletedetails.d.ts +0 -31
- package/esm/models/openairesponsesincompletedetails.js +1 -35
- package/esm/models/openairesponsesinputunion.d.ts +6 -431
- package/esm/models/openairesponsesinputunion.js +7 -463
- package/esm/models/openairesponsesprompt.d.ts +0 -24
- package/esm/models/openairesponsesprompt.js +0 -22
- package/esm/models/openairesponsesreasoningconfig.d.ts +0 -20
- package/esm/models/openairesponsesreasoningconfig.js +2 -21
- package/esm/models/openairesponsesreasoningeffort.d.ts +0 -10
- package/esm/models/openairesponsesreasoningeffort.js +0 -11
- package/esm/models/openairesponsesrefusalcontent.d.ts +0 -26
- package/esm/models/openairesponsesrefusalcontent.js +0 -22
- package/esm/models/openairesponsesresponsestatus.d.ts +0 -12
- package/esm/models/openairesponsesresponsestatus.js +1 -17
- package/esm/models/openairesponsesservicetier.d.ts +0 -12
- package/esm/models/openairesponsesservicetier.js +1 -17
- package/esm/models/openairesponsestoolchoiceunion.d.ts +0 -132
- package/esm/models/openairesponsestoolchoiceunion.js +0 -110
- package/esm/models/openairesponsestruncation.d.ts +0 -12
- package/esm/models/openairesponsestruncation.js +1 -17
- package/esm/models/openresponseseasyinputmessage.d.ts +0 -142
- package/esm/models/openresponseseasyinputmessage.js +9 -198
- package/esm/models/openresponseserrorevent.d.ts +0 -39
- package/esm/models/openresponseserrorevent.js +0 -39
- package/esm/models/openresponsesfunctioncalloutput.d.ts +0 -33
- package/esm/models/openresponsesfunctioncalloutput.js +2 -42
- package/esm/models/openresponsesfunctiontoolcall.d.ts +0 -33
- package/esm/models/openresponsesfunctiontoolcall.js +2 -43
- package/esm/models/openresponsesimagegencallcompleted.d.ts +0 -38
- package/esm/models/openresponsesimagegencallcompleted.js +0 -40
- package/esm/models/openresponsesimagegencallgenerating.d.ts +0 -38
- package/esm/models/openresponsesimagegencallgenerating.js +0 -40
- package/esm/models/openresponsesimagegencallinprogress.d.ts +0 -38
- package/esm/models/openresponsesimagegencallinprogress.js +0 -40
- package/esm/models/openresponsesimagegencallpartialimage.d.ts +0 -40
- package/esm/models/openresponsesimagegencallpartialimage.js +0 -44
- package/esm/models/openresponsesinput.d.ts +0 -32
- package/esm/models/openresponsesinput.js +11 -71
- package/esm/models/openresponsesinputmessageitem.d.ts +0 -111
- package/esm/models/openresponsesinputmessageitem.js +8 -148
- package/esm/models/openresponseslogprobs.d.ts +1 -22
- package/esm/models/openresponseslogprobs.js +1 -25
- package/esm/models/openresponsesnonstreamingresponse.d.ts +13 -138
- package/esm/models/openresponsesnonstreamingresponse.js +16 -157
- package/esm/models/openresponsesreasoning.d.ts +0 -108
- package/esm/models/openresponsesreasoning.js +6 -130
- package/esm/models/openresponsesreasoningconfig.d.ts +0 -17
- package/esm/models/openresponsesreasoningconfig.js +2 -28
- package/esm/models/openresponsesreasoningdeltaevent.d.ts +0 -40
- package/esm/models/openresponsesreasoningdeltaevent.js +0 -43
- package/esm/models/openresponsesreasoningdoneevent.d.ts +0 -40
- package/esm/models/openresponsesreasoningdoneevent.js +0 -43
- package/esm/models/openresponsesreasoningsummarypartaddedevent.d.ts +1 -41
- package/esm/models/openresponsesreasoningsummarypartaddedevent.js +1 -44
- package/esm/models/openresponsesreasoningsummarytextdeltaevent.d.ts +0 -40
- package/esm/models/openresponsesreasoningsummarytextdeltaevent.js +0 -43
- package/esm/models/openresponsesreasoningsummarytextdoneevent.d.ts +0 -40
- package/esm/models/openresponsesreasoningsummarytextdoneevent.js +0 -43
- package/esm/models/openresponsesrequest.d.ts +5 -356
- package/esm/models/openresponsesrequest.js +18 -530
- package/esm/models/openresponsesresponsetext.d.ts +0 -29
- package/esm/models/openresponsesresponsetext.js +1 -40
- package/esm/models/openresponsesstreamevent.d.ts +18 -732
- package/esm/models/openresponsesstreamevent.js +18 -808
- package/esm/models/openresponsestoplogprobs.d.ts +0 -20
- package/esm/models/openresponsestoplogprobs.js +0 -19
- package/esm/models/openresponsesusage.d.ts +0 -85
- package/esm/models/openresponsesusage.js +0 -105
- package/esm/models/openresponseswebsearch20250826tool.d.ts +0 -38
- package/esm/models/openresponseswebsearch20250826tool.js +0 -33
- package/esm/models/openresponseswebsearchpreview20250311tool.d.ts +0 -26
- package/esm/models/openresponseswebsearchpreview20250311tool.js +0 -22
- package/esm/models/openresponseswebsearchpreviewtool.d.ts +0 -26
- package/esm/models/openresponseswebsearchpreviewtool.js +0 -22
- package/esm/models/openresponseswebsearchtool.d.ts +0 -38
- package/esm/models/openresponseswebsearchtool.js +0 -33
- package/esm/models/operations/createauthkeyscode.d.ts +0 -67
- package/esm/models/operations/createauthkeyscode.js +0 -89
- package/esm/models/operations/createcoinbasecharge.d.ts +0 -144
- package/esm/models/operations/createcoinbasecharge.js +0 -170
- package/esm/models/operations/createembeddings.d.ts +5 -330
- package/esm/models/operations/createembeddings.js +4 -404
- package/esm/models/operations/createkeys.d.ts +0 -83
- package/esm/models/operations/createkeys.js +0 -113
- package/esm/models/operations/createresponses.d.ts +0 -36
- package/esm/models/operations/createresponses.js +0 -37
- package/esm/models/operations/deletekeys.d.ts +0 -34
- package/esm/models/operations/deletekeys.js +0 -36
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +0 -47
- package/esm/models/operations/exchangeauthcodeforapikey.js +0 -66
- package/esm/models/operations/getcredits.d.ts +0 -17
- package/esm/models/operations/getcredits.js +0 -16
- package/esm/models/operations/getcurrentkey.d.ts +0 -74
- package/esm/models/operations/getcurrentkey.js +0 -87
- package/esm/models/operations/getgeneration.d.ts +0 -101
- package/esm/models/operations/getgeneration.js +1 -134
- package/esm/models/operations/getkey.d.ts +0 -70
- package/esm/models/operations/getkey.js +0 -87
- package/esm/models/operations/getmodels.d.ts +0 -17
- package/esm/models/operations/getmodels.js +0 -24
- package/esm/models/operations/getparameters.d.ts +0 -93
- package/esm/models/operations/getparameters.js +0 -112
- package/esm/models/operations/getuseractivity.d.ts +0 -34
- package/esm/models/operations/getuseractivity.js +0 -36
- package/esm/models/operations/list.d.ts +0 -70
- package/esm/models/operations/list.js +0 -93
- package/esm/models/operations/listendpoints.d.ts +0 -34
- package/esm/models/operations/listendpoints.js +0 -37
- package/esm/models/operations/listendpointszdr.d.ts +0 -19
- package/esm/models/operations/listendpointszdr.js +0 -18
- package/esm/models/operations/listmodelsuser.d.ts +0 -17
- package/esm/models/operations/listmodelsuser.js +0 -19
- package/esm/models/operations/listproviders.d.ts +0 -42
- package/esm/models/operations/listproviders.js +0 -46
- package/esm/models/operations/sendchatcompletionrequest.d.ts +0 -17
- package/esm/models/operations/sendchatcompletionrequest.js +0 -16
- package/esm/models/operations/updatekeys.d.ts +0 -97
- package/esm/models/operations/updatekeys.js +0 -136
- package/esm/models/outputitemimagegenerationcall.d.ts +0 -38
- package/esm/models/outputitemimagegenerationcall.js +1 -35
- package/esm/models/outputmessage.d.ts +2 -139
- package/esm/models/outputmessage.js +2 -135
- package/esm/models/outputmodality.d.ts +0 -12
- package/esm/models/outputmodality.js +1 -17
- package/esm/models/parameter.d.ts +0 -12
- package/esm/models/parameter.js +1 -18
- package/esm/models/payloadtoolargeresponseerrordata.d.ts +0 -23
- package/esm/models/payloadtoolargeresponseerrordata.js +0 -20
- package/esm/models/paymentrequiredresponseerrordata.d.ts +0 -23
- package/esm/models/paymentrequiredresponseerrordata.js +0 -20
- package/esm/models/perrequestlimits.d.ts +0 -20
- package/esm/models/perrequestlimits.js +0 -24
- package/esm/models/providername.d.ts +0 -10
- package/esm/models/providername.js +0 -11
- package/esm/models/provideroverloadedresponseerrordata.d.ts +0 -23
- package/esm/models/provideroverloadedresponseerrordata.js +0 -20
- package/esm/models/publicendpoint.d.ts +0 -73
- package/esm/models/publicendpoint.js +4 -100
- package/esm/models/publicpricing.d.ts +0 -30
- package/esm/models/publicpricing.js +0 -38
- package/esm/models/quantization.d.ts +0 -12
- package/esm/models/quantization.js +0 -18
- package/esm/models/reasoningsummarytext.d.ts +0 -26
- package/esm/models/reasoningsummarytext.js +0 -22
- package/esm/models/reasoningsummaryverbosity.d.ts +0 -10
- package/esm/models/reasoningsummaryverbosity.js +0 -11
- package/esm/models/reasoningtextcontent.d.ts +0 -26
- package/esm/models/reasoningtextcontent.js +0 -22
- package/esm/models/requesttimeoutresponseerrordata.d.ts +0 -23
- package/esm/models/requesttimeoutresponseerrordata.js +0 -20
- package/esm/models/responseformatjsonschema.d.ts +0 -17
- package/esm/models/responseformatjsonschema.js +1 -25
- package/esm/models/responseformattextconfig.d.ts +0 -12
- package/esm/models/responseformattextconfig.js +0 -11
- package/esm/models/responseformattextgrammar.d.ts +0 -17
- package/esm/models/responseformattextgrammar.js +0 -20
- package/esm/models/responseinputaudio.d.ts +0 -48
- package/esm/models/responseinputaudio.js +0 -44
- package/esm/models/responseinputfile.d.ts +0 -26
- package/esm/models/responseinputfile.js +0 -22
- package/esm/models/responseinputimage.d.ts +0 -36
- package/esm/models/responseinputimage.js +0 -33
- package/esm/models/responseinputtext.d.ts +0 -26
- package/esm/models/responseinputtext.js +0 -22
- package/esm/models/responseoutputtext.d.ts +0 -26
- package/esm/models/responseoutputtext.js +0 -22
- package/esm/models/responseserrorfield.d.ts +0 -32
- package/esm/models/responseserrorfield.js +1 -36
- package/esm/models/responsesformatjsonobject.d.ts +0 -26
- package/esm/models/responsesformatjsonobject.js +0 -22
- package/esm/models/responsesformattext.d.ts +0 -26
- package/esm/models/responsesformattext.js +0 -22
- package/esm/models/responsesformattextjsonschemaconfig.d.ts +0 -26
- package/esm/models/responsesformattextjsonschemaconfig.js +0 -22
- package/esm/models/responsesimagegenerationcall.d.ts +0 -26
- package/esm/models/responsesimagegenerationcall.js +0 -22
- package/esm/models/responsesoutputitem.d.ts +6 -23
- package/esm/models/responsesoutputitem.js +6 -29
- package/esm/models/responsesoutputitemfilesearchcall.d.ts +0 -26
- package/esm/models/responsesoutputitemfilesearchcall.js +0 -22
- package/esm/models/responsesoutputitemfunctioncall.d.ts +0 -80
- package/esm/models/responsesoutputitemfunctioncall.js +0 -66
- package/esm/models/responsesoutputitemreasoning.d.ts +0 -80
- package/esm/models/responsesoutputitemreasoning.js +0 -66
- package/esm/models/responsesoutputmessage.d.ts +0 -106
- package/esm/models/responsesoutputmessage.js +0 -88
- package/esm/models/responsessearchcontextsize.d.ts +0 -10
- package/esm/models/responsessearchcontextsize.js +0 -11
- package/esm/models/responseswebsearchcalloutput.d.ts +0 -26
- package/esm/models/responseswebsearchcalloutput.js +0 -22
- package/esm/models/responseswebsearchuserlocation.d.ts +0 -26
- package/esm/models/responseswebsearchuserlocation.js +0 -22
- package/esm/models/responsetextconfig.d.ts +1 -33
- package/esm/models/responsetextconfig.js +2 -37
- package/esm/models/security.d.ts +0 -17
- package/esm/models/security.js +0 -19
- package/esm/models/serviceunavailableresponseerrordata.d.ts +0 -23
- package/esm/models/serviceunavailableresponseerrordata.js +0 -20
- package/esm/models/systemmessage.d.ts +0 -32
- package/esm/models/systemmessage.js +1 -42
- package/esm/models/toolcallstatus.d.ts +0 -10
- package/esm/models/toolcallstatus.js +0 -11
- package/esm/models/tooldefinitionjson.d.ts +34 -0
- package/esm/models/tooldefinitionjson.js +23 -0
- package/esm/models/toolresponsemessage.d.ts +0 -32
- package/esm/models/toolresponsemessage.js +1 -42
- package/esm/models/toomanyrequestsresponseerrordata.d.ts +0 -23
- package/esm/models/toomanyrequestsresponseerrordata.js +0 -20
- package/esm/models/topproviderinfo.d.ts +0 -21
- package/esm/models/topproviderinfo.js +0 -26
- package/esm/models/unauthorizedresponseerrordata.d.ts +0 -23
- package/esm/models/unauthorizedresponseerrordata.js +0 -20
- package/esm/models/unprocessableentityresponseerrordata.d.ts +0 -23
- package/esm/models/unprocessableentityresponseerrordata.js +0 -20
- package/esm/models/urlcitation.d.ts +0 -26
- package/esm/models/urlcitation.js +0 -22
- package/esm/models/usermessage.d.ts +0 -32
- package/esm/models/usermessage.js +1 -42
- package/esm/models/websearchpreviewtooluserlocation.d.ts +0 -26
- package/esm/models/websearchpreviewtooluserlocation.js +0 -22
- package/esm/models/websearchstatus.d.ts +0 -10
- package/esm/models/websearchstatus.js +0 -11
- package/esm/react-query/index.d.ts +1 -0
- package/esm/react-query/index.js +1 -0
- package/esm/react-query/modelsListEmbeddings.d.ts +29 -0
- package/esm/react-query/modelsListEmbeddings.js +66 -0
- package/esm/sdk/models.d.ts +7 -0
- package/esm/sdk/models.js +10 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/esm/models/tool.d.ts +0 -66
- package/esm/models/tool.js +0 -65
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
3
|
import { ChatStreamOptions, ChatStreamOptions$Outbound } from "./chatstreamoptions.js";
|
|
5
|
-
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
4
|
import { Message, Message$Outbound } from "./message.js";
|
|
7
5
|
import { ReasoningSummaryVerbosity } from "./reasoningsummaryverbosity.js";
|
|
8
6
|
import { ResponseFormatJSONSchema, ResponseFormatJSONSchema$Outbound } from "./responseformatjsonschema.js";
|
|
9
7
|
import { ResponseFormatTextGrammar, ResponseFormatTextGrammar$Outbound } from "./responseformattextgrammar.js";
|
|
10
|
-
import {
|
|
8
|
+
import { ToolDefinitionJson, ToolDefinitionJson$Outbound } from "./tooldefinitionjson.js";
|
|
11
9
|
export declare const Effort: {
|
|
12
10
|
readonly Minimal: "minimal";
|
|
13
11
|
readonly Low: "low";
|
|
@@ -54,26 +52,12 @@ export type ChatGenerationParams = {
|
|
|
54
52
|
streamOptions?: ChatStreamOptions | null | undefined;
|
|
55
53
|
temperature?: number | null | undefined;
|
|
56
54
|
toolChoice?: any | undefined;
|
|
57
|
-
tools?: Array<
|
|
55
|
+
tools?: Array<ToolDefinitionJson> | undefined;
|
|
58
56
|
topP?: number | null | undefined;
|
|
59
57
|
user?: string | undefined;
|
|
60
58
|
};
|
|
61
59
|
/** @internal */
|
|
62
|
-
export declare const Effort$inboundSchema: z.ZodType<Effort, unknown>;
|
|
63
|
-
/** @internal */
|
|
64
60
|
export declare const Effort$outboundSchema: z.ZodType<Effort, Effort>;
|
|
65
|
-
/**
|
|
66
|
-
* @internal
|
|
67
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
68
|
-
*/
|
|
69
|
-
export declare namespace Effort$ {
|
|
70
|
-
/** @deprecated use `Effort$inboundSchema` instead. */
|
|
71
|
-
const inboundSchema: z.ZodType<Effort, unknown, z.core.$ZodTypeInternals<Effort, unknown>>;
|
|
72
|
-
/** @deprecated use `Effort$outboundSchema` instead. */
|
|
73
|
-
const outboundSchema: z.ZodType<Effort, Effort, z.core.$ZodTypeInternals<Effort, Effort>>;
|
|
74
|
-
}
|
|
75
|
-
/** @internal */
|
|
76
|
-
export declare const Reasoning$inboundSchema: z.ZodType<Reasoning, unknown>;
|
|
77
61
|
/** @internal */
|
|
78
62
|
export type Reasoning$Outbound = {
|
|
79
63
|
effort?: string | null | undefined;
|
|
@@ -81,128 +65,38 @@ export type Reasoning$Outbound = {
|
|
|
81
65
|
};
|
|
82
66
|
/** @internal */
|
|
83
67
|
export declare const Reasoning$outboundSchema: z.ZodType<Reasoning$Outbound, Reasoning>;
|
|
84
|
-
/**
|
|
85
|
-
* @internal
|
|
86
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
87
|
-
*/
|
|
88
|
-
export declare namespace Reasoning$ {
|
|
89
|
-
/** @deprecated use `Reasoning$inboundSchema` instead. */
|
|
90
|
-
const inboundSchema: z.ZodType<Reasoning, unknown, z.core.$ZodTypeInternals<Reasoning, unknown>>;
|
|
91
|
-
/** @deprecated use `Reasoning$outboundSchema` instead. */
|
|
92
|
-
const outboundSchema: z.ZodType<Reasoning$Outbound, Reasoning, z.core.$ZodTypeInternals<Reasoning$Outbound, Reasoning>>;
|
|
93
|
-
/** @deprecated use `Reasoning$Outbound` instead. */
|
|
94
|
-
type Outbound = Reasoning$Outbound;
|
|
95
|
-
}
|
|
96
68
|
export declare function reasoningToJSON(reasoning: Reasoning): string;
|
|
97
|
-
export declare function reasoningFromJSON(jsonString: string): SafeParseResult<Reasoning, SDKValidationError>;
|
|
98
|
-
/** @internal */
|
|
99
|
-
export declare const ChatGenerationParamsResponseFormatPython$inboundSchema: z.ZodType<ChatGenerationParamsResponseFormatPython, unknown>;
|
|
100
69
|
/** @internal */
|
|
101
70
|
export type ChatGenerationParamsResponseFormatPython$Outbound = {
|
|
102
71
|
type: "python";
|
|
103
72
|
};
|
|
104
73
|
/** @internal */
|
|
105
74
|
export declare const ChatGenerationParamsResponseFormatPython$outboundSchema: z.ZodType<ChatGenerationParamsResponseFormatPython$Outbound, ChatGenerationParamsResponseFormatPython>;
|
|
106
|
-
/**
|
|
107
|
-
* @internal
|
|
108
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
109
|
-
*/
|
|
110
|
-
export declare namespace ChatGenerationParamsResponseFormatPython$ {
|
|
111
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatPython$inboundSchema` instead. */
|
|
112
|
-
const inboundSchema: z.ZodType<ChatGenerationParamsResponseFormatPython, unknown, z.core.$ZodTypeInternals<ChatGenerationParamsResponseFormatPython, unknown>>;
|
|
113
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatPython$outboundSchema` instead. */
|
|
114
|
-
const outboundSchema: z.ZodType<ChatGenerationParamsResponseFormatPython$Outbound, ChatGenerationParamsResponseFormatPython, z.core.$ZodTypeInternals<ChatGenerationParamsResponseFormatPython$Outbound, ChatGenerationParamsResponseFormatPython>>;
|
|
115
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatPython$Outbound` instead. */
|
|
116
|
-
type Outbound = ChatGenerationParamsResponseFormatPython$Outbound;
|
|
117
|
-
}
|
|
118
75
|
export declare function chatGenerationParamsResponseFormatPythonToJSON(chatGenerationParamsResponseFormatPython: ChatGenerationParamsResponseFormatPython): string;
|
|
119
|
-
export declare function chatGenerationParamsResponseFormatPythonFromJSON(jsonString: string): SafeParseResult<ChatGenerationParamsResponseFormatPython, SDKValidationError>;
|
|
120
|
-
/** @internal */
|
|
121
|
-
export declare const ChatGenerationParamsResponseFormatJSONObject$inboundSchema: z.ZodType<ChatGenerationParamsResponseFormatJSONObject, unknown>;
|
|
122
76
|
/** @internal */
|
|
123
77
|
export type ChatGenerationParamsResponseFormatJSONObject$Outbound = {
|
|
124
78
|
type: "json_object";
|
|
125
79
|
};
|
|
126
80
|
/** @internal */
|
|
127
81
|
export declare const ChatGenerationParamsResponseFormatJSONObject$outboundSchema: z.ZodType<ChatGenerationParamsResponseFormatJSONObject$Outbound, ChatGenerationParamsResponseFormatJSONObject>;
|
|
128
|
-
/**
|
|
129
|
-
* @internal
|
|
130
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
131
|
-
*/
|
|
132
|
-
export declare namespace ChatGenerationParamsResponseFormatJSONObject$ {
|
|
133
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatJSONObject$inboundSchema` instead. */
|
|
134
|
-
const inboundSchema: z.ZodType<ChatGenerationParamsResponseFormatJSONObject, unknown, z.core.$ZodTypeInternals<ChatGenerationParamsResponseFormatJSONObject, unknown>>;
|
|
135
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatJSONObject$outboundSchema` instead. */
|
|
136
|
-
const outboundSchema: z.ZodType<ChatGenerationParamsResponseFormatJSONObject$Outbound, ChatGenerationParamsResponseFormatJSONObject, z.core.$ZodTypeInternals<ChatGenerationParamsResponseFormatJSONObject$Outbound, ChatGenerationParamsResponseFormatJSONObject>>;
|
|
137
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatJSONObject$Outbound` instead. */
|
|
138
|
-
type Outbound = ChatGenerationParamsResponseFormatJSONObject$Outbound;
|
|
139
|
-
}
|
|
140
82
|
export declare function chatGenerationParamsResponseFormatJSONObjectToJSON(chatGenerationParamsResponseFormatJSONObject: ChatGenerationParamsResponseFormatJSONObject): string;
|
|
141
|
-
export declare function chatGenerationParamsResponseFormatJSONObjectFromJSON(jsonString: string): SafeParseResult<ChatGenerationParamsResponseFormatJSONObject, SDKValidationError>;
|
|
142
|
-
/** @internal */
|
|
143
|
-
export declare const ChatGenerationParamsResponseFormatText$inboundSchema: z.ZodType<ChatGenerationParamsResponseFormatText, unknown>;
|
|
144
83
|
/** @internal */
|
|
145
84
|
export type ChatGenerationParamsResponseFormatText$Outbound = {
|
|
146
85
|
type: "text";
|
|
147
86
|
};
|
|
148
87
|
/** @internal */
|
|
149
88
|
export declare const ChatGenerationParamsResponseFormatText$outboundSchema: z.ZodType<ChatGenerationParamsResponseFormatText$Outbound, ChatGenerationParamsResponseFormatText>;
|
|
150
|
-
/**
|
|
151
|
-
* @internal
|
|
152
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
153
|
-
*/
|
|
154
|
-
export declare namespace ChatGenerationParamsResponseFormatText$ {
|
|
155
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatText$inboundSchema` instead. */
|
|
156
|
-
const inboundSchema: z.ZodType<ChatGenerationParamsResponseFormatText, unknown, z.core.$ZodTypeInternals<ChatGenerationParamsResponseFormatText, unknown>>;
|
|
157
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatText$outboundSchema` instead. */
|
|
158
|
-
const outboundSchema: z.ZodType<ChatGenerationParamsResponseFormatText$Outbound, ChatGenerationParamsResponseFormatText, z.core.$ZodTypeInternals<ChatGenerationParamsResponseFormatText$Outbound, ChatGenerationParamsResponseFormatText>>;
|
|
159
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatText$Outbound` instead. */
|
|
160
|
-
type Outbound = ChatGenerationParamsResponseFormatText$Outbound;
|
|
161
|
-
}
|
|
162
89
|
export declare function chatGenerationParamsResponseFormatTextToJSON(chatGenerationParamsResponseFormatText: ChatGenerationParamsResponseFormatText): string;
|
|
163
|
-
export declare function chatGenerationParamsResponseFormatTextFromJSON(jsonString: string): SafeParseResult<ChatGenerationParamsResponseFormatText, SDKValidationError>;
|
|
164
|
-
/** @internal */
|
|
165
|
-
export declare const ChatGenerationParamsResponseFormatUnion$inboundSchema: z.ZodType<ChatGenerationParamsResponseFormatUnion, unknown>;
|
|
166
90
|
/** @internal */
|
|
167
91
|
export type ChatGenerationParamsResponseFormatUnion$Outbound = ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | ChatGenerationParamsResponseFormatText$Outbound | ChatGenerationParamsResponseFormatJSONObject$Outbound | ChatGenerationParamsResponseFormatPython$Outbound;
|
|
168
92
|
/** @internal */
|
|
169
93
|
export declare const ChatGenerationParamsResponseFormatUnion$outboundSchema: z.ZodType<ChatGenerationParamsResponseFormatUnion$Outbound, ChatGenerationParamsResponseFormatUnion>;
|
|
170
|
-
/**
|
|
171
|
-
* @internal
|
|
172
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
173
|
-
*/
|
|
174
|
-
export declare namespace ChatGenerationParamsResponseFormatUnion$ {
|
|
175
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatUnion$inboundSchema` instead. */
|
|
176
|
-
const inboundSchema: z.ZodType<ChatGenerationParamsResponseFormatUnion, unknown, z.core.$ZodTypeInternals<ChatGenerationParamsResponseFormatUnion, unknown>>;
|
|
177
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatUnion$outboundSchema` instead. */
|
|
178
|
-
const outboundSchema: z.ZodType<ChatGenerationParamsResponseFormatUnion$Outbound, ChatGenerationParamsResponseFormatUnion, z.core.$ZodTypeInternals<ChatGenerationParamsResponseFormatUnion$Outbound, ChatGenerationParamsResponseFormatUnion>>;
|
|
179
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatUnion$Outbound` instead. */
|
|
180
|
-
type Outbound = ChatGenerationParamsResponseFormatUnion$Outbound;
|
|
181
|
-
}
|
|
182
94
|
export declare function chatGenerationParamsResponseFormatUnionToJSON(chatGenerationParamsResponseFormatUnion: ChatGenerationParamsResponseFormatUnion): string;
|
|
183
|
-
export declare function chatGenerationParamsResponseFormatUnionFromJSON(jsonString: string): SafeParseResult<ChatGenerationParamsResponseFormatUnion, SDKValidationError>;
|
|
184
|
-
/** @internal */
|
|
185
|
-
export declare const ChatGenerationParamsStop$inboundSchema: z.ZodType<ChatGenerationParamsStop, unknown>;
|
|
186
95
|
/** @internal */
|
|
187
96
|
export type ChatGenerationParamsStop$Outbound = string | Array<string>;
|
|
188
97
|
/** @internal */
|
|
189
98
|
export declare const ChatGenerationParamsStop$outboundSchema: z.ZodType<ChatGenerationParamsStop$Outbound, ChatGenerationParamsStop>;
|
|
190
|
-
/**
|
|
191
|
-
* @internal
|
|
192
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
193
|
-
*/
|
|
194
|
-
export declare namespace ChatGenerationParamsStop$ {
|
|
195
|
-
/** @deprecated use `ChatGenerationParamsStop$inboundSchema` instead. */
|
|
196
|
-
const inboundSchema: z.ZodType<ChatGenerationParamsStop, unknown, z.core.$ZodTypeInternals<ChatGenerationParamsStop, unknown>>;
|
|
197
|
-
/** @deprecated use `ChatGenerationParamsStop$outboundSchema` instead. */
|
|
198
|
-
const outboundSchema: z.ZodType<ChatGenerationParamsStop$Outbound, ChatGenerationParamsStop, z.core.$ZodTypeInternals<ChatGenerationParamsStop$Outbound, ChatGenerationParamsStop>>;
|
|
199
|
-
/** @deprecated use `ChatGenerationParamsStop$Outbound` instead. */
|
|
200
|
-
type Outbound = ChatGenerationParamsStop$Outbound;
|
|
201
|
-
}
|
|
202
99
|
export declare function chatGenerationParamsStopToJSON(chatGenerationParamsStop: ChatGenerationParamsStop): string;
|
|
203
|
-
export declare function chatGenerationParamsStopFromJSON(jsonString: string): SafeParseResult<ChatGenerationParamsStop, SDKValidationError>;
|
|
204
|
-
/** @internal */
|
|
205
|
-
export declare const ChatGenerationParams$inboundSchema: z.ZodType<ChatGenerationParams, unknown>;
|
|
206
100
|
/** @internal */
|
|
207
101
|
export type ChatGenerationParams$Outbound = {
|
|
208
102
|
messages: Array<Message$Outbound>;
|
|
@@ -228,24 +122,11 @@ export type ChatGenerationParams$Outbound = {
|
|
|
228
122
|
stream_options?: ChatStreamOptions$Outbound | null | undefined;
|
|
229
123
|
temperature?: number | null | undefined;
|
|
230
124
|
tool_choice?: any | undefined;
|
|
231
|
-
tools?: Array<
|
|
125
|
+
tools?: Array<ToolDefinitionJson$Outbound> | undefined;
|
|
232
126
|
top_p?: number | null | undefined;
|
|
233
127
|
user?: string | undefined;
|
|
234
128
|
};
|
|
235
129
|
/** @internal */
|
|
236
130
|
export declare const ChatGenerationParams$outboundSchema: z.ZodType<ChatGenerationParams$Outbound, ChatGenerationParams>;
|
|
237
|
-
/**
|
|
238
|
-
* @internal
|
|
239
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
240
|
-
*/
|
|
241
|
-
export declare namespace ChatGenerationParams$ {
|
|
242
|
-
/** @deprecated use `ChatGenerationParams$inboundSchema` instead. */
|
|
243
|
-
const inboundSchema: z.ZodType<ChatGenerationParams, unknown, z.core.$ZodTypeInternals<ChatGenerationParams, unknown>>;
|
|
244
|
-
/** @deprecated use `ChatGenerationParams$outboundSchema` instead. */
|
|
245
|
-
const outboundSchema: z.ZodType<ChatGenerationParams$Outbound, ChatGenerationParams, z.core.$ZodTypeInternals<ChatGenerationParams$Outbound, ChatGenerationParams>>;
|
|
246
|
-
/** @deprecated use `ChatGenerationParams$Outbound` instead. */
|
|
247
|
-
type Outbound = ChatGenerationParams$Outbound;
|
|
248
|
-
}
|
|
249
131
|
export declare function chatGenerationParamsToJSON(chatGenerationParams: ChatGenerationParams): string;
|
|
250
|
-
export declare function chatGenerationParamsFromJSON(jsonString: string): SafeParseResult<ChatGenerationParams, SDKValidationError>;
|
|
251
132
|
//# sourceMappingURL=chatgenerationparams.d.ts.map
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { ResponseFormatTextGrammar$inboundSchema, ResponseFormatTextGrammar$outboundSchema, } from "./responseformattextgrammar.js";
|
|
13
|
-
import { Tool$inboundSchema, Tool$outboundSchema, } from "./tool.js";
|
|
6
|
+
import { ChatStreamOptions$outboundSchema, } from "./chatstreamoptions.js";
|
|
7
|
+
import { Message$outboundSchema, } from "./message.js";
|
|
8
|
+
import { ReasoningSummaryVerbosity$outboundSchema, } from "./reasoningsummaryverbosity.js";
|
|
9
|
+
import { ResponseFormatJSONSchema$outboundSchema, } from "./responseformatjsonschema.js";
|
|
10
|
+
import { ResponseFormatTextGrammar$outboundSchema, } from "./responseformattextgrammar.js";
|
|
11
|
+
import { ToolDefinitionJson$outboundSchema, } from "./tooldefinitionjson.js";
|
|
14
12
|
export const Effort = {
|
|
15
13
|
Minimal: "minimal",
|
|
16
14
|
Low: "low",
|
|
@@ -18,137 +16,39 @@ export const Effort = {
|
|
|
18
16
|
High: "high",
|
|
19
17
|
};
|
|
20
18
|
/** @internal */
|
|
21
|
-
export const Effort$inboundSchema = z
|
|
22
|
-
.union([
|
|
23
|
-
z.enum(Effort),
|
|
24
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
25
|
-
]);
|
|
26
|
-
/** @internal */
|
|
27
19
|
export const Effort$outboundSchema = z.union([
|
|
28
20
|
z.enum(Effort),
|
|
29
21
|
z.string().and(z.custom()),
|
|
30
22
|
]);
|
|
31
|
-
/**
|
|
32
|
-
* @internal
|
|
33
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
34
|
-
*/
|
|
35
|
-
export var Effort$;
|
|
36
|
-
(function (Effort$) {
|
|
37
|
-
/** @deprecated use `Effort$inboundSchema` instead. */
|
|
38
|
-
Effort$.inboundSchema = Effort$inboundSchema;
|
|
39
|
-
/** @deprecated use `Effort$outboundSchema` instead. */
|
|
40
|
-
Effort$.outboundSchema = Effort$outboundSchema;
|
|
41
|
-
})(Effort$ || (Effort$ = {}));
|
|
42
|
-
/** @internal */
|
|
43
|
-
export const Reasoning$inboundSchema = z.object({
|
|
44
|
-
effort: z.nullable(Effort$inboundSchema).optional(),
|
|
45
|
-
summary: z.nullable(ReasoningSummaryVerbosity$inboundSchema).optional(),
|
|
46
|
-
});
|
|
47
23
|
/** @internal */
|
|
48
24
|
export const Reasoning$outboundSchema = z.object({
|
|
49
25
|
effort: z.nullable(Effort$outboundSchema).optional(),
|
|
50
26
|
summary: z.nullable(ReasoningSummaryVerbosity$outboundSchema).optional(),
|
|
51
27
|
});
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
-
*/
|
|
56
|
-
export var Reasoning$;
|
|
57
|
-
(function (Reasoning$) {
|
|
58
|
-
/** @deprecated use `Reasoning$inboundSchema` instead. */
|
|
59
|
-
Reasoning$.inboundSchema = Reasoning$inboundSchema;
|
|
60
|
-
/** @deprecated use `Reasoning$outboundSchema` instead. */
|
|
61
|
-
Reasoning$.outboundSchema = Reasoning$outboundSchema;
|
|
62
|
-
})(Reasoning$ || (Reasoning$ = {}));
|
|
63
28
|
export function reasoningToJSON(reasoning) {
|
|
64
29
|
return JSON.stringify(Reasoning$outboundSchema.parse(reasoning));
|
|
65
30
|
}
|
|
66
|
-
export function reasoningFromJSON(jsonString) {
|
|
67
|
-
return safeParse(jsonString, (x) => Reasoning$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Reasoning' from JSON`);
|
|
68
|
-
}
|
|
69
|
-
/** @internal */
|
|
70
|
-
export const ChatGenerationParamsResponseFormatPython$inboundSchema = z.object({
|
|
71
|
-
type: z.literal("python"),
|
|
72
|
-
});
|
|
73
31
|
/** @internal */
|
|
74
32
|
export const ChatGenerationParamsResponseFormatPython$outboundSchema = z.object({
|
|
75
33
|
type: z.literal("python"),
|
|
76
34
|
});
|
|
77
|
-
/**
|
|
78
|
-
* @internal
|
|
79
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
|
-
*/
|
|
81
|
-
export var ChatGenerationParamsResponseFormatPython$;
|
|
82
|
-
(function (ChatGenerationParamsResponseFormatPython$) {
|
|
83
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatPython$inboundSchema` instead. */
|
|
84
|
-
ChatGenerationParamsResponseFormatPython$.inboundSchema = ChatGenerationParamsResponseFormatPython$inboundSchema;
|
|
85
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatPython$outboundSchema` instead. */
|
|
86
|
-
ChatGenerationParamsResponseFormatPython$.outboundSchema = ChatGenerationParamsResponseFormatPython$outboundSchema;
|
|
87
|
-
})(ChatGenerationParamsResponseFormatPython$ || (ChatGenerationParamsResponseFormatPython$ = {}));
|
|
88
35
|
export function chatGenerationParamsResponseFormatPythonToJSON(chatGenerationParamsResponseFormatPython) {
|
|
89
36
|
return JSON.stringify(ChatGenerationParamsResponseFormatPython$outboundSchema.parse(chatGenerationParamsResponseFormatPython));
|
|
90
37
|
}
|
|
91
|
-
export function chatGenerationParamsResponseFormatPythonFromJSON(jsonString) {
|
|
92
|
-
return safeParse(jsonString, (x) => ChatGenerationParamsResponseFormatPython$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatGenerationParamsResponseFormatPython' from JSON`);
|
|
93
|
-
}
|
|
94
|
-
/** @internal */
|
|
95
|
-
export const ChatGenerationParamsResponseFormatJSONObject$inboundSchema = z.object({
|
|
96
|
-
type: z.literal("json_object"),
|
|
97
|
-
});
|
|
98
38
|
/** @internal */
|
|
99
39
|
export const ChatGenerationParamsResponseFormatJSONObject$outboundSchema = z.object({
|
|
100
40
|
type: z.literal("json_object"),
|
|
101
41
|
});
|
|
102
|
-
/**
|
|
103
|
-
* @internal
|
|
104
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
105
|
-
*/
|
|
106
|
-
export var ChatGenerationParamsResponseFormatJSONObject$;
|
|
107
|
-
(function (ChatGenerationParamsResponseFormatJSONObject$) {
|
|
108
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatJSONObject$inboundSchema` instead. */
|
|
109
|
-
ChatGenerationParamsResponseFormatJSONObject$.inboundSchema = ChatGenerationParamsResponseFormatJSONObject$inboundSchema;
|
|
110
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatJSONObject$outboundSchema` instead. */
|
|
111
|
-
ChatGenerationParamsResponseFormatJSONObject$.outboundSchema = ChatGenerationParamsResponseFormatJSONObject$outboundSchema;
|
|
112
|
-
})(ChatGenerationParamsResponseFormatJSONObject$ || (ChatGenerationParamsResponseFormatJSONObject$ = {}));
|
|
113
42
|
export function chatGenerationParamsResponseFormatJSONObjectToJSON(chatGenerationParamsResponseFormatJSONObject) {
|
|
114
43
|
return JSON.stringify(ChatGenerationParamsResponseFormatJSONObject$outboundSchema.parse(chatGenerationParamsResponseFormatJSONObject));
|
|
115
44
|
}
|
|
116
|
-
export function chatGenerationParamsResponseFormatJSONObjectFromJSON(jsonString) {
|
|
117
|
-
return safeParse(jsonString, (x) => ChatGenerationParamsResponseFormatJSONObject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatGenerationParamsResponseFormatJSONObject' from JSON`);
|
|
118
|
-
}
|
|
119
|
-
/** @internal */
|
|
120
|
-
export const ChatGenerationParamsResponseFormatText$inboundSchema = z.object({
|
|
121
|
-
type: z.literal("text"),
|
|
122
|
-
});
|
|
123
45
|
/** @internal */
|
|
124
46
|
export const ChatGenerationParamsResponseFormatText$outboundSchema = z.object({
|
|
125
47
|
type: z.literal("text"),
|
|
126
48
|
});
|
|
127
|
-
/**
|
|
128
|
-
* @internal
|
|
129
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
130
|
-
*/
|
|
131
|
-
export var ChatGenerationParamsResponseFormatText$;
|
|
132
|
-
(function (ChatGenerationParamsResponseFormatText$) {
|
|
133
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatText$inboundSchema` instead. */
|
|
134
|
-
ChatGenerationParamsResponseFormatText$.inboundSchema = ChatGenerationParamsResponseFormatText$inboundSchema;
|
|
135
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatText$outboundSchema` instead. */
|
|
136
|
-
ChatGenerationParamsResponseFormatText$.outboundSchema = ChatGenerationParamsResponseFormatText$outboundSchema;
|
|
137
|
-
})(ChatGenerationParamsResponseFormatText$ || (ChatGenerationParamsResponseFormatText$ = {}));
|
|
138
49
|
export function chatGenerationParamsResponseFormatTextToJSON(chatGenerationParamsResponseFormatText) {
|
|
139
50
|
return JSON.stringify(ChatGenerationParamsResponseFormatText$outboundSchema.parse(chatGenerationParamsResponseFormatText));
|
|
140
51
|
}
|
|
141
|
-
export function chatGenerationParamsResponseFormatTextFromJSON(jsonString) {
|
|
142
|
-
return safeParse(jsonString, (x) => ChatGenerationParamsResponseFormatText$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatGenerationParamsResponseFormatText' from JSON`);
|
|
143
|
-
}
|
|
144
|
-
/** @internal */
|
|
145
|
-
export const ChatGenerationParamsResponseFormatUnion$inboundSchema = z.union([
|
|
146
|
-
ResponseFormatJSONSchema$inboundSchema,
|
|
147
|
-
ResponseFormatTextGrammar$inboundSchema,
|
|
148
|
-
z.lazy(() => ChatGenerationParamsResponseFormatText$inboundSchema),
|
|
149
|
-
z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$inboundSchema),
|
|
150
|
-
z.lazy(() => ChatGenerationParamsResponseFormatPython$inboundSchema),
|
|
151
|
-
]);
|
|
152
52
|
/** @internal */
|
|
153
53
|
export const ChatGenerationParamsResponseFormatUnion$outboundSchema = z.union([
|
|
154
54
|
ResponseFormatJSONSchema$outboundSchema,
|
|
@@ -157,88 +57,14 @@ export const ChatGenerationParamsResponseFormatUnion$outboundSchema = z.union([
|
|
|
157
57
|
z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$outboundSchema),
|
|
158
58
|
z.lazy(() => ChatGenerationParamsResponseFormatPython$outboundSchema),
|
|
159
59
|
]);
|
|
160
|
-
/**
|
|
161
|
-
* @internal
|
|
162
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
163
|
-
*/
|
|
164
|
-
export var ChatGenerationParamsResponseFormatUnion$;
|
|
165
|
-
(function (ChatGenerationParamsResponseFormatUnion$) {
|
|
166
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatUnion$inboundSchema` instead. */
|
|
167
|
-
ChatGenerationParamsResponseFormatUnion$.inboundSchema = ChatGenerationParamsResponseFormatUnion$inboundSchema;
|
|
168
|
-
/** @deprecated use `ChatGenerationParamsResponseFormatUnion$outboundSchema` instead. */
|
|
169
|
-
ChatGenerationParamsResponseFormatUnion$.outboundSchema = ChatGenerationParamsResponseFormatUnion$outboundSchema;
|
|
170
|
-
})(ChatGenerationParamsResponseFormatUnion$ || (ChatGenerationParamsResponseFormatUnion$ = {}));
|
|
171
60
|
export function chatGenerationParamsResponseFormatUnionToJSON(chatGenerationParamsResponseFormatUnion) {
|
|
172
61
|
return JSON.stringify(ChatGenerationParamsResponseFormatUnion$outboundSchema.parse(chatGenerationParamsResponseFormatUnion));
|
|
173
62
|
}
|
|
174
|
-
export function chatGenerationParamsResponseFormatUnionFromJSON(jsonString) {
|
|
175
|
-
return safeParse(jsonString, (x) => ChatGenerationParamsResponseFormatUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatGenerationParamsResponseFormatUnion' from JSON`);
|
|
176
|
-
}
|
|
177
|
-
/** @internal */
|
|
178
|
-
export const ChatGenerationParamsStop$inboundSchema = z.union([z.string(), z.array(z.string())]);
|
|
179
63
|
/** @internal */
|
|
180
64
|
export const ChatGenerationParamsStop$outboundSchema = z.union([z.string(), z.array(z.string())]);
|
|
181
|
-
/**
|
|
182
|
-
* @internal
|
|
183
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
184
|
-
*/
|
|
185
|
-
export var ChatGenerationParamsStop$;
|
|
186
|
-
(function (ChatGenerationParamsStop$) {
|
|
187
|
-
/** @deprecated use `ChatGenerationParamsStop$inboundSchema` instead. */
|
|
188
|
-
ChatGenerationParamsStop$.inboundSchema = ChatGenerationParamsStop$inboundSchema;
|
|
189
|
-
/** @deprecated use `ChatGenerationParamsStop$outboundSchema` instead. */
|
|
190
|
-
ChatGenerationParamsStop$.outboundSchema = ChatGenerationParamsStop$outboundSchema;
|
|
191
|
-
})(ChatGenerationParamsStop$ || (ChatGenerationParamsStop$ = {}));
|
|
192
65
|
export function chatGenerationParamsStopToJSON(chatGenerationParamsStop) {
|
|
193
66
|
return JSON.stringify(ChatGenerationParamsStop$outboundSchema.parse(chatGenerationParamsStop));
|
|
194
67
|
}
|
|
195
|
-
export function chatGenerationParamsStopFromJSON(jsonString) {
|
|
196
|
-
return safeParse(jsonString, (x) => ChatGenerationParamsStop$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatGenerationParamsStop' from JSON`);
|
|
197
|
-
}
|
|
198
|
-
/** @internal */
|
|
199
|
-
export const ChatGenerationParams$inboundSchema = z.object({
|
|
200
|
-
messages: z.array(Message$inboundSchema),
|
|
201
|
-
model: z.string().optional(),
|
|
202
|
-
models: z.array(z.string()).optional(),
|
|
203
|
-
frequency_penalty: z.nullable(z.number()).optional(),
|
|
204
|
-
logit_bias: z.nullable(z.record(z.string(), z.number())).optional(),
|
|
205
|
-
logprobs: z.nullable(z.boolean()).optional(),
|
|
206
|
-
top_logprobs: z.nullable(z.number()).optional(),
|
|
207
|
-
max_completion_tokens: z.nullable(z.number()).optional(),
|
|
208
|
-
max_tokens: z.nullable(z.number()).optional(),
|
|
209
|
-
metadata: z.record(z.string(), z.string()).optional(),
|
|
210
|
-
presence_penalty: z.nullable(z.number()).optional(),
|
|
211
|
-
reasoning: z.lazy(() => Reasoning$inboundSchema).optional(),
|
|
212
|
-
response_format: z.union([
|
|
213
|
-
ResponseFormatJSONSchema$inboundSchema,
|
|
214
|
-
ResponseFormatTextGrammar$inboundSchema,
|
|
215
|
-
z.lazy(() => ChatGenerationParamsResponseFormatText$inboundSchema),
|
|
216
|
-
z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$inboundSchema),
|
|
217
|
-
z.lazy(() => ChatGenerationParamsResponseFormatPython$inboundSchema),
|
|
218
|
-
]).optional(),
|
|
219
|
-
seed: z.nullable(z.number().int()).optional(),
|
|
220
|
-
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
221
|
-
stream: z.boolean().default(false),
|
|
222
|
-
stream_options: z.nullable(ChatStreamOptions$inboundSchema).optional(),
|
|
223
|
-
temperature: z.nullable(z.number()).optional(),
|
|
224
|
-
tool_choice: z.any().optional(),
|
|
225
|
-
tools: z.array(Tool$inboundSchema).optional(),
|
|
226
|
-
top_p: z.nullable(z.number()).optional(),
|
|
227
|
-
user: z.string().optional(),
|
|
228
|
-
}).transform((v) => {
|
|
229
|
-
return remap$(v, {
|
|
230
|
-
"frequency_penalty": "frequencyPenalty",
|
|
231
|
-
"logit_bias": "logitBias",
|
|
232
|
-
"top_logprobs": "topLogprobs",
|
|
233
|
-
"max_completion_tokens": "maxCompletionTokens",
|
|
234
|
-
"max_tokens": "maxTokens",
|
|
235
|
-
"presence_penalty": "presencePenalty",
|
|
236
|
-
"response_format": "responseFormat",
|
|
237
|
-
"stream_options": "streamOptions",
|
|
238
|
-
"tool_choice": "toolChoice",
|
|
239
|
-
"top_p": "topP",
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
68
|
/** @internal */
|
|
243
69
|
export const ChatGenerationParams$outboundSchema = z.object({
|
|
244
70
|
messages: z.array(Message$outboundSchema),
|
|
@@ -266,7 +92,7 @@ export const ChatGenerationParams$outboundSchema = z.object({
|
|
|
266
92
|
streamOptions: z.nullable(ChatStreamOptions$outboundSchema).optional(),
|
|
267
93
|
temperature: z.nullable(z.number()).optional(),
|
|
268
94
|
toolChoice: z.any().optional(),
|
|
269
|
-
tools: z.array(
|
|
95
|
+
tools: z.array(ToolDefinitionJson$outboundSchema).optional(),
|
|
270
96
|
topP: z.nullable(z.number()).optional(),
|
|
271
97
|
user: z.string().optional(),
|
|
272
98
|
}).transform((v) => {
|
|
@@ -283,21 +109,7 @@ export const ChatGenerationParams$outboundSchema = z.object({
|
|
|
283
109
|
topP: "top_p",
|
|
284
110
|
});
|
|
285
111
|
});
|
|
286
|
-
/**
|
|
287
|
-
* @internal
|
|
288
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
289
|
-
*/
|
|
290
|
-
export var ChatGenerationParams$;
|
|
291
|
-
(function (ChatGenerationParams$) {
|
|
292
|
-
/** @deprecated use `ChatGenerationParams$inboundSchema` instead. */
|
|
293
|
-
ChatGenerationParams$.inboundSchema = ChatGenerationParams$inboundSchema;
|
|
294
|
-
/** @deprecated use `ChatGenerationParams$outboundSchema` instead. */
|
|
295
|
-
ChatGenerationParams$.outboundSchema = ChatGenerationParams$outboundSchema;
|
|
296
|
-
})(ChatGenerationParams$ || (ChatGenerationParams$ = {}));
|
|
297
112
|
export function chatGenerationParamsToJSON(chatGenerationParams) {
|
|
298
113
|
return JSON.stringify(ChatGenerationParams$outboundSchema.parse(chatGenerationParams));
|
|
299
114
|
}
|
|
300
|
-
export function chatGenerationParamsFromJSON(jsonString) {
|
|
301
|
-
return safeParse(jsonString, (x) => ChatGenerationParams$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatGenerationParams' from JSON`);
|
|
302
|
-
}
|
|
303
115
|
//# sourceMappingURL=chatgenerationparams.js.map
|
|
@@ -2,94 +2,30 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
export type CompletionTokensDetails = {
|
|
5
|
-
reasoningTokens?: number | undefined;
|
|
6
|
-
audioTokens?: number | undefined;
|
|
7
|
-
acceptedPredictionTokens?: number | undefined;
|
|
8
|
-
rejectedPredictionTokens?: number | undefined;
|
|
5
|
+
reasoningTokens?: number | null | undefined;
|
|
6
|
+
audioTokens?: number | null | undefined;
|
|
7
|
+
acceptedPredictionTokens?: number | null | undefined;
|
|
8
|
+
rejectedPredictionTokens?: number | null | undefined;
|
|
9
9
|
};
|
|
10
10
|
export type PromptTokensDetails = {
|
|
11
11
|
cachedTokens?: number | undefined;
|
|
12
12
|
audioTokens?: number | undefined;
|
|
13
|
+
videoTokens?: number | undefined;
|
|
13
14
|
};
|
|
14
15
|
export type ChatGenerationTokenUsage = {
|
|
15
16
|
completionTokens: number;
|
|
16
17
|
promptTokens: number;
|
|
17
18
|
totalTokens: number;
|
|
18
|
-
completionTokensDetails?: CompletionTokensDetails | undefined;
|
|
19
|
+
completionTokensDetails?: CompletionTokensDetails | null | undefined;
|
|
19
20
|
promptTokensDetails?: PromptTokensDetails | null | undefined;
|
|
20
21
|
};
|
|
21
22
|
/** @internal */
|
|
22
23
|
export declare const CompletionTokensDetails$inboundSchema: z.ZodType<CompletionTokensDetails, unknown>;
|
|
23
|
-
/** @internal */
|
|
24
|
-
export type CompletionTokensDetails$Outbound = {
|
|
25
|
-
reasoning_tokens?: number | undefined;
|
|
26
|
-
audio_tokens?: number | undefined;
|
|
27
|
-
accepted_prediction_tokens?: number | undefined;
|
|
28
|
-
rejected_prediction_tokens?: number | undefined;
|
|
29
|
-
};
|
|
30
|
-
/** @internal */
|
|
31
|
-
export declare const CompletionTokensDetails$outboundSchema: z.ZodType<CompletionTokensDetails$Outbound, CompletionTokensDetails>;
|
|
32
|
-
/**
|
|
33
|
-
* @internal
|
|
34
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
35
|
-
*/
|
|
36
|
-
export declare namespace CompletionTokensDetails$ {
|
|
37
|
-
/** @deprecated use `CompletionTokensDetails$inboundSchema` instead. */
|
|
38
|
-
const inboundSchema: z.ZodType<CompletionTokensDetails, unknown, z.core.$ZodTypeInternals<CompletionTokensDetails, unknown>>;
|
|
39
|
-
/** @deprecated use `CompletionTokensDetails$outboundSchema` instead. */
|
|
40
|
-
const outboundSchema: z.ZodType<CompletionTokensDetails$Outbound, CompletionTokensDetails, z.core.$ZodTypeInternals<CompletionTokensDetails$Outbound, CompletionTokensDetails>>;
|
|
41
|
-
/** @deprecated use `CompletionTokensDetails$Outbound` instead. */
|
|
42
|
-
type Outbound = CompletionTokensDetails$Outbound;
|
|
43
|
-
}
|
|
44
|
-
export declare function completionTokensDetailsToJSON(completionTokensDetails: CompletionTokensDetails): string;
|
|
45
24
|
export declare function completionTokensDetailsFromJSON(jsonString: string): SafeParseResult<CompletionTokensDetails, SDKValidationError>;
|
|
46
25
|
/** @internal */
|
|
47
26
|
export declare const PromptTokensDetails$inboundSchema: z.ZodType<PromptTokensDetails, unknown>;
|
|
48
|
-
/** @internal */
|
|
49
|
-
export type PromptTokensDetails$Outbound = {
|
|
50
|
-
cached_tokens?: number | undefined;
|
|
51
|
-
audio_tokens?: number | undefined;
|
|
52
|
-
};
|
|
53
|
-
/** @internal */
|
|
54
|
-
export declare const PromptTokensDetails$outboundSchema: z.ZodType<PromptTokensDetails$Outbound, PromptTokensDetails>;
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
-
*/
|
|
59
|
-
export declare namespace PromptTokensDetails$ {
|
|
60
|
-
/** @deprecated use `PromptTokensDetails$inboundSchema` instead. */
|
|
61
|
-
const inboundSchema: z.ZodType<PromptTokensDetails, unknown, z.core.$ZodTypeInternals<PromptTokensDetails, unknown>>;
|
|
62
|
-
/** @deprecated use `PromptTokensDetails$outboundSchema` instead. */
|
|
63
|
-
const outboundSchema: z.ZodType<PromptTokensDetails$Outbound, PromptTokensDetails, z.core.$ZodTypeInternals<PromptTokensDetails$Outbound, PromptTokensDetails>>;
|
|
64
|
-
/** @deprecated use `PromptTokensDetails$Outbound` instead. */
|
|
65
|
-
type Outbound = PromptTokensDetails$Outbound;
|
|
66
|
-
}
|
|
67
|
-
export declare function promptTokensDetailsToJSON(promptTokensDetails: PromptTokensDetails): string;
|
|
68
27
|
export declare function promptTokensDetailsFromJSON(jsonString: string): SafeParseResult<PromptTokensDetails, SDKValidationError>;
|
|
69
28
|
/** @internal */
|
|
70
29
|
export declare const ChatGenerationTokenUsage$inboundSchema: z.ZodType<ChatGenerationTokenUsage, unknown>;
|
|
71
|
-
/** @internal */
|
|
72
|
-
export type ChatGenerationTokenUsage$Outbound = {
|
|
73
|
-
completion_tokens: number;
|
|
74
|
-
prompt_tokens: number;
|
|
75
|
-
total_tokens: number;
|
|
76
|
-
completion_tokens_details?: CompletionTokensDetails$Outbound | undefined;
|
|
77
|
-
prompt_tokens_details?: PromptTokensDetails$Outbound | null | undefined;
|
|
78
|
-
};
|
|
79
|
-
/** @internal */
|
|
80
|
-
export declare const ChatGenerationTokenUsage$outboundSchema: z.ZodType<ChatGenerationTokenUsage$Outbound, ChatGenerationTokenUsage>;
|
|
81
|
-
/**
|
|
82
|
-
* @internal
|
|
83
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
84
|
-
*/
|
|
85
|
-
export declare namespace ChatGenerationTokenUsage$ {
|
|
86
|
-
/** @deprecated use `ChatGenerationTokenUsage$inboundSchema` instead. */
|
|
87
|
-
const inboundSchema: z.ZodType<ChatGenerationTokenUsage, unknown, z.core.$ZodTypeInternals<ChatGenerationTokenUsage, unknown>>;
|
|
88
|
-
/** @deprecated use `ChatGenerationTokenUsage$outboundSchema` instead. */
|
|
89
|
-
const outboundSchema: z.ZodType<ChatGenerationTokenUsage$Outbound, ChatGenerationTokenUsage, z.core.$ZodTypeInternals<ChatGenerationTokenUsage$Outbound, ChatGenerationTokenUsage>>;
|
|
90
|
-
/** @deprecated use `ChatGenerationTokenUsage$Outbound` instead. */
|
|
91
|
-
type Outbound = ChatGenerationTokenUsage$Outbound;
|
|
92
|
-
}
|
|
93
|
-
export declare function chatGenerationTokenUsageToJSON(chatGenerationTokenUsage: ChatGenerationTokenUsage): string;
|
|
94
30
|
export declare function chatGenerationTokenUsageFromJSON(jsonString: string): SafeParseResult<ChatGenerationTokenUsage, SDKValidationError>;
|
|
95
31
|
//# sourceMappingURL=chatgenerationtokenusage.d.ts.map
|