@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
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
5
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { catchUnrecognizedEnum, } from "../../types/enums.js";
|
|
8
7
|
import * as models from "../index.js";
|
|
9
8
|
/**
|
|
10
9
|
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
@@ -38,167 +37,47 @@ export const ObjectEmbedding = {
|
|
|
38
37
|
Embedding: "embedding",
|
|
39
38
|
};
|
|
40
39
|
/** @internal */
|
|
41
|
-
export const Input$inboundSchema = z.union([
|
|
42
|
-
z.string(),
|
|
43
|
-
z.array(z.string()),
|
|
44
|
-
z.array(z.number()),
|
|
45
|
-
z.array(z.array(z.number())),
|
|
46
|
-
]);
|
|
47
|
-
/** @internal */
|
|
48
40
|
export const Input$outboundSchema = z.union([
|
|
49
41
|
z.string(),
|
|
50
42
|
z.array(z.string()),
|
|
51
43
|
z.array(z.number()),
|
|
52
44
|
z.array(z.array(z.number())),
|
|
53
45
|
]);
|
|
54
|
-
/**
|
|
55
|
-
* @internal
|
|
56
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
-
*/
|
|
58
|
-
export var Input$;
|
|
59
|
-
(function (Input$) {
|
|
60
|
-
/** @deprecated use `Input$inboundSchema` instead. */
|
|
61
|
-
Input$.inboundSchema = Input$inboundSchema;
|
|
62
|
-
/** @deprecated use `Input$outboundSchema` instead. */
|
|
63
|
-
Input$.outboundSchema = Input$outboundSchema;
|
|
64
|
-
})(Input$ || (Input$ = {}));
|
|
65
46
|
export function inputToJSON(input) {
|
|
66
47
|
return JSON.stringify(Input$outboundSchema.parse(input));
|
|
67
48
|
}
|
|
68
|
-
export function inputFromJSON(jsonString) {
|
|
69
|
-
return safeParse(jsonString, (x) => Input$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Input' from JSON`);
|
|
70
|
-
}
|
|
71
|
-
/** @internal */
|
|
72
|
-
export const DataCollection$inboundSchema = z
|
|
73
|
-
.union([
|
|
74
|
-
z.enum(DataCollection),
|
|
75
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
76
|
-
]);
|
|
77
49
|
/** @internal */
|
|
78
50
|
export const DataCollection$outboundSchema = z.union([
|
|
79
51
|
z.enum(DataCollection),
|
|
80
52
|
z.string().and(z.custom()),
|
|
81
53
|
]);
|
|
82
|
-
/**
|
|
83
|
-
* @internal
|
|
84
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
85
|
-
*/
|
|
86
|
-
export var DataCollection$;
|
|
87
|
-
(function (DataCollection$) {
|
|
88
|
-
/** @deprecated use `DataCollection$inboundSchema` instead. */
|
|
89
|
-
DataCollection$.inboundSchema = DataCollection$inboundSchema;
|
|
90
|
-
/** @deprecated use `DataCollection$outboundSchema` instead. */
|
|
91
|
-
DataCollection$.outboundSchema = DataCollection$outboundSchema;
|
|
92
|
-
})(DataCollection$ || (DataCollection$ = {}));
|
|
93
|
-
/** @internal */
|
|
94
|
-
export const Order$inboundSchema = z.union([
|
|
95
|
-
models.ProviderName$inboundSchema,
|
|
96
|
-
z.string(),
|
|
97
|
-
]);
|
|
98
54
|
/** @internal */
|
|
99
55
|
export const Order$outboundSchema = z.union([
|
|
100
56
|
models.ProviderName$outboundSchema,
|
|
101
57
|
z.string(),
|
|
102
58
|
]);
|
|
103
|
-
/**
|
|
104
|
-
* @internal
|
|
105
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
106
|
-
*/
|
|
107
|
-
export var Order$;
|
|
108
|
-
(function (Order$) {
|
|
109
|
-
/** @deprecated use `Order$inboundSchema` instead. */
|
|
110
|
-
Order$.inboundSchema = Order$inboundSchema;
|
|
111
|
-
/** @deprecated use `Order$outboundSchema` instead. */
|
|
112
|
-
Order$.outboundSchema = Order$outboundSchema;
|
|
113
|
-
})(Order$ || (Order$ = {}));
|
|
114
59
|
export function orderToJSON(order) {
|
|
115
60
|
return JSON.stringify(Order$outboundSchema.parse(order));
|
|
116
61
|
}
|
|
117
|
-
export function orderFromJSON(jsonString) {
|
|
118
|
-
return safeParse(jsonString, (x) => Order$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Order' from JSON`);
|
|
119
|
-
}
|
|
120
|
-
/** @internal */
|
|
121
|
-
export const Only$inboundSchema = z.union([
|
|
122
|
-
models.ProviderName$inboundSchema,
|
|
123
|
-
z.string(),
|
|
124
|
-
]);
|
|
125
62
|
/** @internal */
|
|
126
63
|
export const Only$outboundSchema = z.union([
|
|
127
64
|
models.ProviderName$outboundSchema,
|
|
128
65
|
z.string(),
|
|
129
66
|
]);
|
|
130
|
-
/**
|
|
131
|
-
* @internal
|
|
132
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
133
|
-
*/
|
|
134
|
-
export var Only$;
|
|
135
|
-
(function (Only$) {
|
|
136
|
-
/** @deprecated use `Only$inboundSchema` instead. */
|
|
137
|
-
Only$.inboundSchema = Only$inboundSchema;
|
|
138
|
-
/** @deprecated use `Only$outboundSchema` instead. */
|
|
139
|
-
Only$.outboundSchema = Only$outboundSchema;
|
|
140
|
-
})(Only$ || (Only$ = {}));
|
|
141
67
|
export function onlyToJSON(only) {
|
|
142
68
|
return JSON.stringify(Only$outboundSchema.parse(only));
|
|
143
69
|
}
|
|
144
|
-
export function onlyFromJSON(jsonString) {
|
|
145
|
-
return safeParse(jsonString, (x) => Only$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Only' from JSON`);
|
|
146
|
-
}
|
|
147
|
-
/** @internal */
|
|
148
|
-
export const Ignore$inboundSchema = z.union([
|
|
149
|
-
models.ProviderName$inboundSchema,
|
|
150
|
-
z.string(),
|
|
151
|
-
]);
|
|
152
70
|
/** @internal */
|
|
153
71
|
export const Ignore$outboundSchema = z
|
|
154
72
|
.union([models.ProviderName$outboundSchema, z.string()]);
|
|
155
|
-
/**
|
|
156
|
-
* @internal
|
|
157
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
158
|
-
*/
|
|
159
|
-
export var Ignore$;
|
|
160
|
-
(function (Ignore$) {
|
|
161
|
-
/** @deprecated use `Ignore$inboundSchema` instead. */
|
|
162
|
-
Ignore$.inboundSchema = Ignore$inboundSchema;
|
|
163
|
-
/** @deprecated use `Ignore$outboundSchema` instead. */
|
|
164
|
-
Ignore$.outboundSchema = Ignore$outboundSchema;
|
|
165
|
-
})(Ignore$ || (Ignore$ = {}));
|
|
166
73
|
export function ignoreToJSON(ignore) {
|
|
167
74
|
return JSON.stringify(Ignore$outboundSchema.parse(ignore));
|
|
168
75
|
}
|
|
169
|
-
export function ignoreFromJSON(jsonString) {
|
|
170
|
-
return safeParse(jsonString, (x) => Ignore$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Ignore' from JSON`);
|
|
171
|
-
}
|
|
172
|
-
/** @internal */
|
|
173
|
-
export const Sort$inboundSchema = z
|
|
174
|
-
.union([
|
|
175
|
-
z.enum(Sort),
|
|
176
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
177
|
-
]);
|
|
178
76
|
/** @internal */
|
|
179
77
|
export const Sort$outboundSchema = z.union([
|
|
180
78
|
z.enum(Sort),
|
|
181
79
|
z.string().and(z.custom()),
|
|
182
80
|
]);
|
|
183
|
-
/**
|
|
184
|
-
* @internal
|
|
185
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
186
|
-
*/
|
|
187
|
-
export var Sort$;
|
|
188
|
-
(function (Sort$) {
|
|
189
|
-
/** @deprecated use `Sort$inboundSchema` instead. */
|
|
190
|
-
Sort$.inboundSchema = Sort$inboundSchema;
|
|
191
|
-
/** @deprecated use `Sort$outboundSchema` instead. */
|
|
192
|
-
Sort$.outboundSchema = Sort$outboundSchema;
|
|
193
|
-
})(Sort$ || (Sort$ = {}));
|
|
194
|
-
/** @internal */
|
|
195
|
-
export const MaxPrice$inboundSchema = z.object({
|
|
196
|
-
prompt: z.any().optional(),
|
|
197
|
-
completion: z.any().optional(),
|
|
198
|
-
image: z.any().optional(),
|
|
199
|
-
audio: z.any().optional(),
|
|
200
|
-
request: z.any().optional(),
|
|
201
|
-
});
|
|
202
81
|
/** @internal */
|
|
203
82
|
export const MaxPrice$outboundSchema = z
|
|
204
83
|
.object({
|
|
@@ -208,73 +87,16 @@ export const MaxPrice$outboundSchema = z
|
|
|
208
87
|
audio: z.any().optional(),
|
|
209
88
|
request: z.any().optional(),
|
|
210
89
|
});
|
|
211
|
-
/**
|
|
212
|
-
* @internal
|
|
213
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
214
|
-
*/
|
|
215
|
-
export var MaxPrice$;
|
|
216
|
-
(function (MaxPrice$) {
|
|
217
|
-
/** @deprecated use `MaxPrice$inboundSchema` instead. */
|
|
218
|
-
MaxPrice$.inboundSchema = MaxPrice$inboundSchema;
|
|
219
|
-
/** @deprecated use `MaxPrice$outboundSchema` instead. */
|
|
220
|
-
MaxPrice$.outboundSchema = MaxPrice$outboundSchema;
|
|
221
|
-
})(MaxPrice$ || (MaxPrice$ = {}));
|
|
222
90
|
export function maxPriceToJSON(maxPrice) {
|
|
223
91
|
return JSON.stringify(MaxPrice$outboundSchema.parse(maxPrice));
|
|
224
92
|
}
|
|
225
|
-
export function maxPriceFromJSON(jsonString) {
|
|
226
|
-
return safeParse(jsonString, (x) => MaxPrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MaxPrice' from JSON`);
|
|
227
|
-
}
|
|
228
|
-
/** @internal */
|
|
229
|
-
export const Experimental$inboundSchema = z
|
|
230
|
-
.object({});
|
|
231
|
-
/** @internal */
|
|
232
|
-
export const Experimental$outboundSchema = z.object({});
|
|
233
|
-
/**
|
|
234
|
-
* @internal
|
|
235
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
236
|
-
*/
|
|
237
|
-
export var Experimental$;
|
|
238
|
-
(function (Experimental$) {
|
|
239
|
-
/** @deprecated use `Experimental$inboundSchema` instead. */
|
|
240
|
-
Experimental$.inboundSchema = Experimental$inboundSchema;
|
|
241
|
-
/** @deprecated use `Experimental$outboundSchema` instead. */
|
|
242
|
-
Experimental$.outboundSchema = Experimental$outboundSchema;
|
|
243
|
-
})(Experimental$ || (Experimental$ = {}));
|
|
244
|
-
export function experimentalToJSON(experimental) {
|
|
245
|
-
return JSON.stringify(Experimental$outboundSchema.parse(experimental));
|
|
246
|
-
}
|
|
247
|
-
export function experimentalFromJSON(jsonString) {
|
|
248
|
-
return safeParse(jsonString, (x) => Experimental$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Experimental' from JSON`);
|
|
249
|
-
}
|
|
250
|
-
/** @internal */
|
|
251
|
-
export const CreateEmbeddingsProvider$inboundSchema = z.object({
|
|
252
|
-
allow_fallbacks: z.nullable(z.boolean()).optional(),
|
|
253
|
-
require_parameters: z.nullable(z.boolean()).optional(),
|
|
254
|
-
data_collection: z.nullable(DataCollection$inboundSchema).optional(),
|
|
255
|
-
zdr: z.nullable(z.boolean()).optional(),
|
|
256
|
-
order: z.nullable(z.array(z.union([models.ProviderName$inboundSchema, z.string()]))).optional(),
|
|
257
|
-
only: z.nullable(z.array(z.union([models.ProviderName$inboundSchema, z.string()]))).optional(),
|
|
258
|
-
ignore: z.nullable(z.array(z.union([models.ProviderName$inboundSchema, z.string()]))).optional(),
|
|
259
|
-
quantizations: z.nullable(z.array(models.Quantization$inboundSchema))
|
|
260
|
-
.optional(),
|
|
261
|
-
sort: z.nullable(Sort$inboundSchema).optional(),
|
|
262
|
-
max_price: z.lazy(() => MaxPrice$inboundSchema).optional(),
|
|
263
|
-
experimental: z.nullable(z.lazy(() => Experimental$inboundSchema)).optional(),
|
|
264
|
-
}).transform((v) => {
|
|
265
|
-
return remap$(v, {
|
|
266
|
-
"allow_fallbacks": "allowFallbacks",
|
|
267
|
-
"require_parameters": "requireParameters",
|
|
268
|
-
"data_collection": "dataCollection",
|
|
269
|
-
"max_price": "maxPrice",
|
|
270
|
-
});
|
|
271
|
-
});
|
|
272
93
|
/** @internal */
|
|
273
94
|
export const CreateEmbeddingsProvider$outboundSchema = z.object({
|
|
274
95
|
allowFallbacks: z.nullable(z.boolean()).optional(),
|
|
275
96
|
requireParameters: z.nullable(z.boolean()).optional(),
|
|
276
97
|
dataCollection: z.nullable(DataCollection$outboundSchema).optional(),
|
|
277
98
|
zdr: z.nullable(z.boolean()).optional(),
|
|
99
|
+
enforceDistillableText: z.nullable(z.boolean()).optional(),
|
|
278
100
|
order: z.nullable(z.array(z.union([models.ProviderName$outboundSchema, z.string()]))).optional(),
|
|
279
101
|
only: z.nullable(z.array(z.union([models.ProviderName$outboundSchema, z.string()]))).optional(),
|
|
280
102
|
ignore: z.nullable(z.array(z.union([models.ProviderName$outboundSchema, z.string()]))).optional(),
|
|
@@ -282,110 +104,30 @@ export const CreateEmbeddingsProvider$outboundSchema = z.object({
|
|
|
282
104
|
.optional(),
|
|
283
105
|
sort: z.nullable(Sort$outboundSchema).optional(),
|
|
284
106
|
maxPrice: z.lazy(() => MaxPrice$outboundSchema).optional(),
|
|
285
|
-
experimental: z.nullable(z.lazy(() => Experimental$outboundSchema))
|
|
286
|
-
.optional(),
|
|
287
107
|
}).transform((v) => {
|
|
288
108
|
return remap$(v, {
|
|
289
109
|
allowFallbacks: "allow_fallbacks",
|
|
290
110
|
requireParameters: "require_parameters",
|
|
291
111
|
dataCollection: "data_collection",
|
|
112
|
+
enforceDistillableText: "enforce_distillable_text",
|
|
292
113
|
maxPrice: "max_price",
|
|
293
114
|
});
|
|
294
115
|
});
|
|
295
|
-
/**
|
|
296
|
-
* @internal
|
|
297
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
298
|
-
*/
|
|
299
|
-
export var CreateEmbeddingsProvider$;
|
|
300
|
-
(function (CreateEmbeddingsProvider$) {
|
|
301
|
-
/** @deprecated use `CreateEmbeddingsProvider$inboundSchema` instead. */
|
|
302
|
-
CreateEmbeddingsProvider$.inboundSchema = CreateEmbeddingsProvider$inboundSchema;
|
|
303
|
-
/** @deprecated use `CreateEmbeddingsProvider$outboundSchema` instead. */
|
|
304
|
-
CreateEmbeddingsProvider$.outboundSchema = CreateEmbeddingsProvider$outboundSchema;
|
|
305
|
-
})(CreateEmbeddingsProvider$ || (CreateEmbeddingsProvider$ = {}));
|
|
306
116
|
export function createEmbeddingsProviderToJSON(createEmbeddingsProvider) {
|
|
307
117
|
return JSON.stringify(CreateEmbeddingsProvider$outboundSchema.parse(createEmbeddingsProvider));
|
|
308
118
|
}
|
|
309
|
-
export function createEmbeddingsProviderFromJSON(jsonString) {
|
|
310
|
-
return safeParse(jsonString, (x) => CreateEmbeddingsProvider$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEmbeddingsProvider' from JSON`);
|
|
311
|
-
}
|
|
312
119
|
/** @internal */
|
|
313
|
-
export const EncodingFormatBase64$
|
|
120
|
+
export const EncodingFormatBase64$outboundSchema = z.enum(EncodingFormatBase64);
|
|
314
121
|
/** @internal */
|
|
315
|
-
export const
|
|
316
|
-
/**
|
|
317
|
-
* @internal
|
|
318
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
319
|
-
*/
|
|
320
|
-
export var EncodingFormatBase64$;
|
|
321
|
-
(function (EncodingFormatBase64$) {
|
|
322
|
-
/** @deprecated use `EncodingFormatBase64$inboundSchema` instead. */
|
|
323
|
-
EncodingFormatBase64$.inboundSchema = EncodingFormatBase64$inboundSchema;
|
|
324
|
-
/** @deprecated use `EncodingFormatBase64$outboundSchema` instead. */
|
|
325
|
-
EncodingFormatBase64$.outboundSchema = EncodingFormatBase64$outboundSchema;
|
|
326
|
-
})(EncodingFormatBase64$ || (EncodingFormatBase64$ = {}));
|
|
327
|
-
/** @internal */
|
|
328
|
-
export const EncodingFormatFloat$inboundSchema = z.enum(EncodingFormatFloat);
|
|
329
|
-
/** @internal */
|
|
330
|
-
export const EncodingFormatFloat$outboundSchema = EncodingFormatFloat$inboundSchema;
|
|
331
|
-
/**
|
|
332
|
-
* @internal
|
|
333
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
334
|
-
*/
|
|
335
|
-
export var EncodingFormatFloat$;
|
|
336
|
-
(function (EncodingFormatFloat$) {
|
|
337
|
-
/** @deprecated use `EncodingFormatFloat$inboundSchema` instead. */
|
|
338
|
-
EncodingFormatFloat$.inboundSchema = EncodingFormatFloat$inboundSchema;
|
|
339
|
-
/** @deprecated use `EncodingFormatFloat$outboundSchema` instead. */
|
|
340
|
-
EncodingFormatFloat$.outboundSchema = EncodingFormatFloat$outboundSchema;
|
|
341
|
-
})(EncodingFormatFloat$ || (EncodingFormatFloat$ = {}));
|
|
342
|
-
/** @internal */
|
|
343
|
-
export const EncodingFormat$inboundSchema = z.union([
|
|
344
|
-
EncodingFormatFloat$inboundSchema,
|
|
345
|
-
EncodingFormatBase64$inboundSchema,
|
|
346
|
-
]);
|
|
122
|
+
export const EncodingFormatFloat$outboundSchema = z.enum(EncodingFormatFloat);
|
|
347
123
|
/** @internal */
|
|
348
124
|
export const EncodingFormat$outboundSchema = z.union([
|
|
349
125
|
EncodingFormatFloat$outboundSchema,
|
|
350
126
|
EncodingFormatBase64$outboundSchema,
|
|
351
127
|
]);
|
|
352
|
-
/**
|
|
353
|
-
* @internal
|
|
354
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
355
|
-
*/
|
|
356
|
-
export var EncodingFormat$;
|
|
357
|
-
(function (EncodingFormat$) {
|
|
358
|
-
/** @deprecated use `EncodingFormat$inboundSchema` instead. */
|
|
359
|
-
EncodingFormat$.inboundSchema = EncodingFormat$inboundSchema;
|
|
360
|
-
/** @deprecated use `EncodingFormat$outboundSchema` instead. */
|
|
361
|
-
EncodingFormat$.outboundSchema = EncodingFormat$outboundSchema;
|
|
362
|
-
})(EncodingFormat$ || (EncodingFormat$ = {}));
|
|
363
128
|
export function encodingFormatToJSON(encodingFormat) {
|
|
364
129
|
return JSON.stringify(EncodingFormat$outboundSchema.parse(encodingFormat));
|
|
365
130
|
}
|
|
366
|
-
export function encodingFormatFromJSON(jsonString) {
|
|
367
|
-
return safeParse(jsonString, (x) => EncodingFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EncodingFormat' from JSON`);
|
|
368
|
-
}
|
|
369
|
-
/** @internal */
|
|
370
|
-
export const CreateEmbeddingsRequest$inboundSchema = z.object({
|
|
371
|
-
input: z.union([
|
|
372
|
-
z.string(),
|
|
373
|
-
z.array(z.string()),
|
|
374
|
-
z.array(z.number()),
|
|
375
|
-
z.array(z.array(z.number())),
|
|
376
|
-
]),
|
|
377
|
-
model: z.string(),
|
|
378
|
-
provider: z.lazy(() => CreateEmbeddingsProvider$inboundSchema).optional(),
|
|
379
|
-
encoding_format: z.union([
|
|
380
|
-
EncodingFormatFloat$inboundSchema,
|
|
381
|
-
EncodingFormatBase64$inboundSchema,
|
|
382
|
-
]).optional(),
|
|
383
|
-
user: z.string().optional(),
|
|
384
|
-
}).transform((v) => {
|
|
385
|
-
return remap$(v, {
|
|
386
|
-
"encoding_format": "encodingFormat",
|
|
387
|
-
});
|
|
388
|
-
});
|
|
389
131
|
/** @internal */
|
|
390
132
|
export const CreateEmbeddingsRequest$outboundSchema = z.object({
|
|
391
133
|
input: z.union([
|
|
@@ -406,74 +148,18 @@ export const CreateEmbeddingsRequest$outboundSchema = z.object({
|
|
|
406
148
|
encodingFormat: "encoding_format",
|
|
407
149
|
});
|
|
408
150
|
});
|
|
409
|
-
/**
|
|
410
|
-
* @internal
|
|
411
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
412
|
-
*/
|
|
413
|
-
export var CreateEmbeddingsRequest$;
|
|
414
|
-
(function (CreateEmbeddingsRequest$) {
|
|
415
|
-
/** @deprecated use `CreateEmbeddingsRequest$inboundSchema` instead. */
|
|
416
|
-
CreateEmbeddingsRequest$.inboundSchema = CreateEmbeddingsRequest$inboundSchema;
|
|
417
|
-
/** @deprecated use `CreateEmbeddingsRequest$outboundSchema` instead. */
|
|
418
|
-
CreateEmbeddingsRequest$.outboundSchema = CreateEmbeddingsRequest$outboundSchema;
|
|
419
|
-
})(CreateEmbeddingsRequest$ || (CreateEmbeddingsRequest$ = {}));
|
|
420
151
|
export function createEmbeddingsRequestToJSON(createEmbeddingsRequest) {
|
|
421
152
|
return JSON.stringify(CreateEmbeddingsRequest$outboundSchema.parse(createEmbeddingsRequest));
|
|
422
153
|
}
|
|
423
|
-
export function createEmbeddingsRequestFromJSON(jsonString) {
|
|
424
|
-
return safeParse(jsonString, (x) => CreateEmbeddingsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEmbeddingsRequest' from JSON`);
|
|
425
|
-
}
|
|
426
154
|
/** @internal */
|
|
427
155
|
export const ObjectT$inboundSchema = z.enum(ObjectT);
|
|
428
156
|
/** @internal */
|
|
429
|
-
export const ObjectT$outboundSchema = ObjectT$inboundSchema;
|
|
430
|
-
/**
|
|
431
|
-
* @internal
|
|
432
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
433
|
-
*/
|
|
434
|
-
export var ObjectT$;
|
|
435
|
-
(function (ObjectT$) {
|
|
436
|
-
/** @deprecated use `ObjectT$inboundSchema` instead. */
|
|
437
|
-
ObjectT$.inboundSchema = ObjectT$inboundSchema;
|
|
438
|
-
/** @deprecated use `ObjectT$outboundSchema` instead. */
|
|
439
|
-
ObjectT$.outboundSchema = ObjectT$outboundSchema;
|
|
440
|
-
})(ObjectT$ || (ObjectT$ = {}));
|
|
441
|
-
/** @internal */
|
|
442
157
|
export const ObjectEmbedding$inboundSchema = z.enum(ObjectEmbedding);
|
|
443
158
|
/** @internal */
|
|
444
|
-
export const ObjectEmbedding$outboundSchema = ObjectEmbedding$inboundSchema;
|
|
445
|
-
/**
|
|
446
|
-
* @internal
|
|
447
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
448
|
-
*/
|
|
449
|
-
export var ObjectEmbedding$;
|
|
450
|
-
(function (ObjectEmbedding$) {
|
|
451
|
-
/** @deprecated use `ObjectEmbedding$inboundSchema` instead. */
|
|
452
|
-
ObjectEmbedding$.inboundSchema = ObjectEmbedding$inboundSchema;
|
|
453
|
-
/** @deprecated use `ObjectEmbedding$outboundSchema` instead. */
|
|
454
|
-
ObjectEmbedding$.outboundSchema = ObjectEmbedding$outboundSchema;
|
|
455
|
-
})(ObjectEmbedding$ || (ObjectEmbedding$ = {}));
|
|
456
|
-
/** @internal */
|
|
457
159
|
export const Embedding$inboundSchema = z.union([
|
|
458
160
|
z.array(z.number()),
|
|
459
161
|
z.string(),
|
|
460
162
|
]);
|
|
461
|
-
/** @internal */
|
|
462
|
-
export const Embedding$outboundSchema = z.union([z.array(z.number()), z.string()]);
|
|
463
|
-
/**
|
|
464
|
-
* @internal
|
|
465
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
466
|
-
*/
|
|
467
|
-
export var Embedding$;
|
|
468
|
-
(function (Embedding$) {
|
|
469
|
-
/** @deprecated use `Embedding$inboundSchema` instead. */
|
|
470
|
-
Embedding$.inboundSchema = Embedding$inboundSchema;
|
|
471
|
-
/** @deprecated use `Embedding$outboundSchema` instead. */
|
|
472
|
-
Embedding$.outboundSchema = Embedding$outboundSchema;
|
|
473
|
-
})(Embedding$ || (Embedding$ = {}));
|
|
474
|
-
export function embeddingToJSON(embedding) {
|
|
475
|
-
return JSON.stringify(Embedding$outboundSchema.parse(embedding));
|
|
476
|
-
}
|
|
477
163
|
export function embeddingFromJSON(jsonString) {
|
|
478
164
|
return safeParse(jsonString, (x) => Embedding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Embedding' from JSON`);
|
|
479
165
|
}
|
|
@@ -483,26 +169,6 @@ export const CreateEmbeddingsData$inboundSchema = z.object({
|
|
|
483
169
|
embedding: z.union([z.array(z.number()), z.string()]),
|
|
484
170
|
index: z.number().optional(),
|
|
485
171
|
});
|
|
486
|
-
/** @internal */
|
|
487
|
-
export const CreateEmbeddingsData$outboundSchema = z.object({
|
|
488
|
-
object: ObjectEmbedding$outboundSchema,
|
|
489
|
-
embedding: z.union([z.array(z.number()), z.string()]),
|
|
490
|
-
index: z.number().optional(),
|
|
491
|
-
});
|
|
492
|
-
/**
|
|
493
|
-
* @internal
|
|
494
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
495
|
-
*/
|
|
496
|
-
export var CreateEmbeddingsData$;
|
|
497
|
-
(function (CreateEmbeddingsData$) {
|
|
498
|
-
/** @deprecated use `CreateEmbeddingsData$inboundSchema` instead. */
|
|
499
|
-
CreateEmbeddingsData$.inboundSchema = CreateEmbeddingsData$inboundSchema;
|
|
500
|
-
/** @deprecated use `CreateEmbeddingsData$outboundSchema` instead. */
|
|
501
|
-
CreateEmbeddingsData$.outboundSchema = CreateEmbeddingsData$outboundSchema;
|
|
502
|
-
})(CreateEmbeddingsData$ || (CreateEmbeddingsData$ = {}));
|
|
503
|
-
export function createEmbeddingsDataToJSON(createEmbeddingsData) {
|
|
504
|
-
return JSON.stringify(CreateEmbeddingsData$outboundSchema.parse(createEmbeddingsData));
|
|
505
|
-
}
|
|
506
172
|
export function createEmbeddingsDataFromJSON(jsonString) {
|
|
507
173
|
return safeParse(jsonString, (x) => CreateEmbeddingsData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEmbeddingsData' from JSON`);
|
|
508
174
|
}
|
|
@@ -517,31 +183,6 @@ export const Usage$inboundSchema = z.object({
|
|
|
517
183
|
"total_tokens": "totalTokens",
|
|
518
184
|
});
|
|
519
185
|
});
|
|
520
|
-
/** @internal */
|
|
521
|
-
export const Usage$outboundSchema = z.object({
|
|
522
|
-
promptTokens: z.number(),
|
|
523
|
-
totalTokens: z.number(),
|
|
524
|
-
cost: z.number().optional(),
|
|
525
|
-
}).transform((v) => {
|
|
526
|
-
return remap$(v, {
|
|
527
|
-
promptTokens: "prompt_tokens",
|
|
528
|
-
totalTokens: "total_tokens",
|
|
529
|
-
});
|
|
530
|
-
});
|
|
531
|
-
/**
|
|
532
|
-
* @internal
|
|
533
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
534
|
-
*/
|
|
535
|
-
export var Usage$;
|
|
536
|
-
(function (Usage$) {
|
|
537
|
-
/** @deprecated use `Usage$inboundSchema` instead. */
|
|
538
|
-
Usage$.inboundSchema = Usage$inboundSchema;
|
|
539
|
-
/** @deprecated use `Usage$outboundSchema` instead. */
|
|
540
|
-
Usage$.outboundSchema = Usage$outboundSchema;
|
|
541
|
-
})(Usage$ || (Usage$ = {}));
|
|
542
|
-
export function usageToJSON(usage) {
|
|
543
|
-
return JSON.stringify(Usage$outboundSchema.parse(usage));
|
|
544
|
-
}
|
|
545
186
|
export function usageFromJSON(jsonString) {
|
|
546
187
|
return safeParse(jsonString, (x) => Usage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Usage' from JSON`);
|
|
547
188
|
}
|
|
@@ -553,28 +194,6 @@ export const CreateEmbeddingsResponseBody$inboundSchema = z.object({
|
|
|
553
194
|
model: z.string(),
|
|
554
195
|
usage: z.lazy(() => Usage$inboundSchema).optional(),
|
|
555
196
|
});
|
|
556
|
-
/** @internal */
|
|
557
|
-
export const CreateEmbeddingsResponseBody$outboundSchema = z.object({
|
|
558
|
-
id: z.string().optional(),
|
|
559
|
-
object: ObjectT$outboundSchema,
|
|
560
|
-
data: z.array(z.lazy(() => CreateEmbeddingsData$outboundSchema)),
|
|
561
|
-
model: z.string(),
|
|
562
|
-
usage: z.lazy(() => Usage$outboundSchema).optional(),
|
|
563
|
-
});
|
|
564
|
-
/**
|
|
565
|
-
* @internal
|
|
566
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
567
|
-
*/
|
|
568
|
-
export var CreateEmbeddingsResponseBody$;
|
|
569
|
-
(function (CreateEmbeddingsResponseBody$) {
|
|
570
|
-
/** @deprecated use `CreateEmbeddingsResponseBody$inboundSchema` instead. */
|
|
571
|
-
CreateEmbeddingsResponseBody$.inboundSchema = CreateEmbeddingsResponseBody$inboundSchema;
|
|
572
|
-
/** @deprecated use `CreateEmbeddingsResponseBody$outboundSchema` instead. */
|
|
573
|
-
CreateEmbeddingsResponseBody$.outboundSchema = CreateEmbeddingsResponseBody$outboundSchema;
|
|
574
|
-
})(CreateEmbeddingsResponseBody$ || (CreateEmbeddingsResponseBody$ = {}));
|
|
575
|
-
export function createEmbeddingsResponseBodyToJSON(createEmbeddingsResponseBody) {
|
|
576
|
-
return JSON.stringify(CreateEmbeddingsResponseBody$outboundSchema.parse(createEmbeddingsResponseBody));
|
|
577
|
-
}
|
|
578
197
|
export function createEmbeddingsResponseBodyFromJSON(jsonString) {
|
|
579
198
|
return safeParse(jsonString, (x) => CreateEmbeddingsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEmbeddingsResponseBody' from JSON`);
|
|
580
199
|
}
|
|
@@ -583,25 +202,6 @@ export const CreateEmbeddingsResponse$inboundSchema = z.union([
|
|
|
583
202
|
z.lazy(() => CreateEmbeddingsResponseBody$inboundSchema),
|
|
584
203
|
z.string(),
|
|
585
204
|
]);
|
|
586
|
-
/** @internal */
|
|
587
|
-
export const CreateEmbeddingsResponse$outboundSchema = z.union([
|
|
588
|
-
z.lazy(() => CreateEmbeddingsResponseBody$outboundSchema),
|
|
589
|
-
z.string(),
|
|
590
|
-
]);
|
|
591
|
-
/**
|
|
592
|
-
* @internal
|
|
593
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
594
|
-
*/
|
|
595
|
-
export var CreateEmbeddingsResponse$;
|
|
596
|
-
(function (CreateEmbeddingsResponse$) {
|
|
597
|
-
/** @deprecated use `CreateEmbeddingsResponse$inboundSchema` instead. */
|
|
598
|
-
CreateEmbeddingsResponse$.inboundSchema = CreateEmbeddingsResponse$inboundSchema;
|
|
599
|
-
/** @deprecated use `CreateEmbeddingsResponse$outboundSchema` instead. */
|
|
600
|
-
CreateEmbeddingsResponse$.outboundSchema = CreateEmbeddingsResponse$outboundSchema;
|
|
601
|
-
})(CreateEmbeddingsResponse$ || (CreateEmbeddingsResponse$ = {}));
|
|
602
|
-
export function createEmbeddingsResponseToJSON(createEmbeddingsResponse) {
|
|
603
|
-
return JSON.stringify(CreateEmbeddingsResponse$outboundSchema.parse(createEmbeddingsResponse));
|
|
604
|
-
}
|
|
605
205
|
export function createEmbeddingsResponseFromJSON(jsonString) {
|
|
606
206
|
return safeParse(jsonString, (x) => CreateEmbeddingsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEmbeddingsResponse' from JSON`);
|
|
607
207
|
}
|
|
@@ -123,21 +123,7 @@ export type CreateKeysResponse = {
|
|
|
123
123
|
key: string;
|
|
124
124
|
};
|
|
125
125
|
/** @internal */
|
|
126
|
-
export declare const CreateKeysLimitReset$inboundSchema: z.ZodType<CreateKeysLimitReset, unknown>;
|
|
127
|
-
/** @internal */
|
|
128
126
|
export declare const CreateKeysLimitReset$outboundSchema: z.ZodType<CreateKeysLimitReset, CreateKeysLimitReset>;
|
|
129
|
-
/**
|
|
130
|
-
* @internal
|
|
131
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
132
|
-
*/
|
|
133
|
-
export declare namespace CreateKeysLimitReset$ {
|
|
134
|
-
/** @deprecated use `CreateKeysLimitReset$inboundSchema` instead. */
|
|
135
|
-
const inboundSchema: z.ZodType<CreateKeysLimitReset, unknown, z.core.$ZodTypeInternals<CreateKeysLimitReset, unknown>>;
|
|
136
|
-
/** @deprecated use `CreateKeysLimitReset$outboundSchema` instead. */
|
|
137
|
-
const outboundSchema: z.ZodType<CreateKeysLimitReset, CreateKeysLimitReset, z.core.$ZodTypeInternals<CreateKeysLimitReset, CreateKeysLimitReset>>;
|
|
138
|
-
}
|
|
139
|
-
/** @internal */
|
|
140
|
-
export declare const CreateKeysRequest$inboundSchema: z.ZodType<CreateKeysRequest, unknown>;
|
|
141
127
|
/** @internal */
|
|
142
128
|
export type CreateKeysRequest$Outbound = {
|
|
143
129
|
name: string;
|
|
@@ -147,80 +133,11 @@ export type CreateKeysRequest$Outbound = {
|
|
|
147
133
|
};
|
|
148
134
|
/** @internal */
|
|
149
135
|
export declare const CreateKeysRequest$outboundSchema: z.ZodType<CreateKeysRequest$Outbound, CreateKeysRequest>;
|
|
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 CreateKeysRequest$ {
|
|
155
|
-
/** @deprecated use `CreateKeysRequest$inboundSchema` instead. */
|
|
156
|
-
const inboundSchema: z.ZodType<CreateKeysRequest, unknown, z.core.$ZodTypeInternals<CreateKeysRequest, unknown>>;
|
|
157
|
-
/** @deprecated use `CreateKeysRequest$outboundSchema` instead. */
|
|
158
|
-
const outboundSchema: z.ZodType<CreateKeysRequest$Outbound, CreateKeysRequest, z.core.$ZodTypeInternals<CreateKeysRequest$Outbound, CreateKeysRequest>>;
|
|
159
|
-
/** @deprecated use `CreateKeysRequest$Outbound` instead. */
|
|
160
|
-
type Outbound = CreateKeysRequest$Outbound;
|
|
161
|
-
}
|
|
162
136
|
export declare function createKeysRequestToJSON(createKeysRequest: CreateKeysRequest): string;
|
|
163
|
-
export declare function createKeysRequestFromJSON(jsonString: string): SafeParseResult<CreateKeysRequest, SDKValidationError>;
|
|
164
137
|
/** @internal */
|
|
165
138
|
export declare const CreateKeysData$inboundSchema: z.ZodType<CreateKeysData, unknown>;
|
|
166
|
-
/** @internal */
|
|
167
|
-
export type CreateKeysData$Outbound = {
|
|
168
|
-
hash: string;
|
|
169
|
-
name: string;
|
|
170
|
-
label: string;
|
|
171
|
-
disabled: boolean;
|
|
172
|
-
limit: number | null;
|
|
173
|
-
limit_remaining: number | null;
|
|
174
|
-
limit_reset: string | null;
|
|
175
|
-
include_byok_in_limit: boolean;
|
|
176
|
-
usage: number;
|
|
177
|
-
usage_daily: number;
|
|
178
|
-
usage_weekly: number;
|
|
179
|
-
usage_monthly: number;
|
|
180
|
-
byok_usage: number;
|
|
181
|
-
byok_usage_daily: number;
|
|
182
|
-
byok_usage_weekly: number;
|
|
183
|
-
byok_usage_monthly: number;
|
|
184
|
-
created_at: string;
|
|
185
|
-
updated_at: string | null;
|
|
186
|
-
};
|
|
187
|
-
/** @internal */
|
|
188
|
-
export declare const CreateKeysData$outboundSchema: z.ZodType<CreateKeysData$Outbound, CreateKeysData>;
|
|
189
|
-
/**
|
|
190
|
-
* @internal
|
|
191
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
192
|
-
*/
|
|
193
|
-
export declare namespace CreateKeysData$ {
|
|
194
|
-
/** @deprecated use `CreateKeysData$inboundSchema` instead. */
|
|
195
|
-
const inboundSchema: z.ZodType<CreateKeysData, unknown, z.core.$ZodTypeInternals<CreateKeysData, unknown>>;
|
|
196
|
-
/** @deprecated use `CreateKeysData$outboundSchema` instead. */
|
|
197
|
-
const outboundSchema: z.ZodType<CreateKeysData$Outbound, CreateKeysData, z.core.$ZodTypeInternals<CreateKeysData$Outbound, CreateKeysData>>;
|
|
198
|
-
/** @deprecated use `CreateKeysData$Outbound` instead. */
|
|
199
|
-
type Outbound = CreateKeysData$Outbound;
|
|
200
|
-
}
|
|
201
|
-
export declare function createKeysDataToJSON(createKeysData: CreateKeysData): string;
|
|
202
139
|
export declare function createKeysDataFromJSON(jsonString: string): SafeParseResult<CreateKeysData, SDKValidationError>;
|
|
203
140
|
/** @internal */
|
|
204
141
|
export declare const CreateKeysResponse$inboundSchema: z.ZodType<CreateKeysResponse, unknown>;
|
|
205
|
-
/** @internal */
|
|
206
|
-
export type CreateKeysResponse$Outbound = {
|
|
207
|
-
data: CreateKeysData$Outbound;
|
|
208
|
-
key: string;
|
|
209
|
-
};
|
|
210
|
-
/** @internal */
|
|
211
|
-
export declare const CreateKeysResponse$outboundSchema: z.ZodType<CreateKeysResponse$Outbound, CreateKeysResponse>;
|
|
212
|
-
/**
|
|
213
|
-
* @internal
|
|
214
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
215
|
-
*/
|
|
216
|
-
export declare namespace CreateKeysResponse$ {
|
|
217
|
-
/** @deprecated use `CreateKeysResponse$inboundSchema` instead. */
|
|
218
|
-
const inboundSchema: z.ZodType<CreateKeysResponse, unknown, z.core.$ZodTypeInternals<CreateKeysResponse, unknown>>;
|
|
219
|
-
/** @deprecated use `CreateKeysResponse$outboundSchema` instead. */
|
|
220
|
-
const outboundSchema: z.ZodType<CreateKeysResponse$Outbound, CreateKeysResponse, z.core.$ZodTypeInternals<CreateKeysResponse$Outbound, CreateKeysResponse>>;
|
|
221
|
-
/** @deprecated use `CreateKeysResponse$Outbound` instead. */
|
|
222
|
-
type Outbound = CreateKeysResponse$Outbound;
|
|
223
|
-
}
|
|
224
|
-
export declare function createKeysResponseToJSON(createKeysResponse: CreateKeysResponse): string;
|
|
225
142
|
export declare function createKeysResponseFromJSON(jsonString: string): SafeParseResult<CreateKeysResponse, SDKValidationError>;
|
|
226
143
|
//# sourceMappingURL=createkeys.d.ts.map
|