@openrouter/sdk 0.0.0-beta.4 → 0.0.0-beta.7
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/FUNCTIONS.md +3 -1
- package/REACT_QUERY.md +10 -6
- package/README.md +29 -36
- package/dist/commonjs/funcs/analyticsGetActivity.js +2 -3
- package/dist/commonjs/funcs/analyticsGetActivity.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js +2 -3
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js +2 -3
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKey.js +2 -3
- package/dist/commonjs/funcs/apiKeysGetKey.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.js +2 -3
- package/dist/commonjs/funcs/apiKeysGetKeys.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js +2 -3
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js +2 -3
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.js +2 -3
- package/dist/commonjs/funcs/apiKeysPostKeys.js.map +1 -1
- package/dist/commonjs/funcs/{chatSend.d.ts → chatGenerateResponse.d.ts} +6 -6
- package/dist/commonjs/funcs/chatGenerateResponse.d.ts.map +1 -0
- package/dist/commonjs/funcs/{chatSend.js → chatGenerateResponse.js} +13 -14
- package/dist/commonjs/funcs/chatGenerateResponse.js.map +1 -0
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.js +2 -3
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.js.map +1 -1
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js +2 -3
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js.map +1 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js +2 -3
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -1
- package/dist/commonjs/funcs/generationsGetGeneration.js +2 -3
- package/dist/commonjs/funcs/generationsGetGeneration.js.map +1 -1
- package/dist/commonjs/funcs/getCredits.js +2 -3
- package/dist/commonjs/funcs/getCredits.js.map +1 -1
- package/dist/commonjs/funcs/getProviders.js +2 -3
- package/dist/commonjs/funcs/getProviders.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModels.js +2 -3
- package/dist/commonjs/funcs/modelsGetModels.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.js +2 -3
- package/dist/commonjs/funcs/modelsGetModelsCount.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.js +7 -12
- package/dist/commonjs/funcs/modelsGetModelsUser.js.map +1 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.d.ts +1 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.d.ts.map +1 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.js +7 -12
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.js.map +1 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.d.ts +1 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.d.ts.map +1 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.js +7 -12
- package/dist/commonjs/funcs/postCreditsCoinbase.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +8 -4
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/env.d.ts +2 -1
- package/dist/commonjs/lib/env.d.ts.map +1 -1
- package/dist/commonjs/lib/env.js +2 -1
- package/dist/commonjs/lib/env.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +7 -1
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/models/chatcompletion.d.ts +43 -0
- package/dist/commonjs/models/chatcompletion.d.ts.map +1 -0
- package/dist/commonjs/models/{chatresponse.js → chatcompletion.js} +22 -22
- package/dist/commonjs/models/chatcompletion.js.map +1 -0
- package/dist/commonjs/models/chatcompletionchoice.d.ts +72 -0
- package/dist/commonjs/models/chatcompletionchoice.d.ts.map +1 -0
- package/dist/commonjs/models/{chatstreamingchoice.js → chatcompletionchoice.js} +32 -32
- package/dist/commonjs/models/chatcompletionchoice.js.map +1 -0
- package/dist/commonjs/models/chatcompletionchunk.d.ts +68 -0
- package/dist/commonjs/models/chatcompletionchunk.d.ts.map +1 -0
- package/dist/commonjs/models/{chatstreamingresponsechunk.js → chatcompletionchunk.js} +22 -55
- package/dist/commonjs/models/chatcompletionchunk.js.map +1 -0
- package/dist/commonjs/models/chatcompletionchunkchoice.d.ts +72 -0
- package/dist/commonjs/models/chatcompletionchunkchoice.d.ts.map +1 -0
- package/dist/commonjs/models/chatcompletionchunkchoice.js +108 -0
- package/dist/commonjs/models/chatcompletionchunkchoice.js.map +1 -0
- package/dist/commonjs/models/chatcompletionchunkchoicedelta.d.ts +61 -0
- package/dist/commonjs/models/chatcompletionchunkchoicedelta.d.ts.map +1 -0
- package/dist/commonjs/models/{chatstreamingmessagechunk.js → chatcompletionchunkchoicedelta.js} +22 -20
- package/dist/commonjs/models/chatcompletionchunkchoicedelta.js.map +1 -0
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.d.ts +62 -0
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.d.ts.map +1 -0
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.js +104 -0
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.js.map +1 -0
- package/dist/commonjs/models/chatcompletionerror.d.ts +35 -0
- package/dist/commonjs/models/chatcompletionerror.d.ts.map +1 -0
- package/dist/commonjs/models/chatcompletionerror.js +75 -0
- package/dist/commonjs/models/chatcompletionerror.js.map +1 -0
- package/dist/commonjs/models/chatcompletionmessage.d.ts +62 -0
- package/dist/commonjs/models/chatcompletionmessage.d.ts.map +1 -0
- package/dist/commonjs/models/chatcompletionmessage.js +113 -0
- package/dist/commonjs/models/chatcompletionmessage.js.map +1 -0
- package/dist/commonjs/models/errorresponse.d.ts +8 -8
- package/dist/commonjs/models/errorresponse.d.ts.map +1 -1
- package/dist/commonjs/models/errorresponse.js +13 -14
- package/dist/commonjs/models/errorresponse.js.map +1 -1
- package/dist/commonjs/models/errors/chatcompletionerror.d.ts +37 -0
- package/dist/commonjs/models/errors/chatcompletionerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/{chaterror.js → chatcompletionerror.js} +17 -17
- package/dist/commonjs/models/errors/chatcompletionerror.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +1 -1
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -1
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +9 -8
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +9 -8
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/message.d.ts +19 -54
- package/dist/commonjs/models/message.d.ts.map +1 -1
- package/dist/commonjs/models/message.js +22 -73
- package/dist/commonjs/models/message.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelsuser.d.ts +0 -25
- package/dist/commonjs/models/operations/getmodelsuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelsuser.js +2 -29
- package/dist/commonjs/models/operations/getmodelsuser.js.map +1 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts +0 -25
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.js +1 -28
- package/dist/commonjs/models/operations/getparametersauthorslug.js.map +1 -1
- package/dist/commonjs/models/operations/postchatcompletions.d.ts +3 -3
- package/dist/commonjs/models/operations/postchatcompletions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postchatcompletions.js +3 -3
- package/dist/commonjs/models/operations/postchatcompletions.js.map +1 -1
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts +0 -25
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postcreditscoinbase.js +1 -28
- package/dist/commonjs/models/operations/postcreditscoinbase.js.map +1 -1
- package/dist/commonjs/models/security.d.ts +4 -2
- package/dist/commonjs/models/security.d.ts.map +1 -1
- package/dist/commonjs/models/security.js +4 -2
- package/dist/commonjs/models/security.js.map +1 -1
- package/dist/commonjs/models/toolmessage.d.ts +55 -0
- package/dist/commonjs/models/toolmessage.d.ts.map +1 -0
- package/dist/commonjs/models/{toolresponsemessage.js → toolmessage.js} +32 -32
- package/dist/commonjs/models/toolmessage.js.map +1 -0
- package/dist/commonjs/react-query/chatGenerateResponse.d.ts +28 -0
- package/dist/commonjs/react-query/chatGenerateResponse.d.ts.map +1 -0
- package/dist/commonjs/react-query/chatGenerateResponse.js +50 -0
- package/dist/commonjs/react-query/chatGenerateResponse.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +1 -1
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -1
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts +4 -4
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/commonjs/react-query/modelsGetModelsUser.js +8 -8
- package/dist/commonjs/react-query/modelsGetModelsUser.js.map +1 -1
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts +4 -4
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts.map +1 -1
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js +8 -8
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js.map +1 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts +0 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts.map +1 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.js +2 -2
- package/dist/commonjs/react-query/postCreditsCoinbase.js.map +1 -1
- package/dist/commonjs/sdk/chat.d.ts +5 -5
- package/dist/commonjs/sdk/chat.d.ts.map +1 -1
- package/dist/commonjs/sdk/chat.js +7 -7
- package/dist/commonjs/sdk/chat.js.map +1 -1
- package/dist/commonjs/sdk/models.d.ts +1 -1
- package/dist/commonjs/sdk/models.d.ts.map +1 -1
- package/dist/commonjs/sdk/models.js +2 -2
- package/dist/commonjs/sdk/models.js.map +1 -1
- package/dist/commonjs/sdk/parameters.d.ts +1 -1
- package/dist/commonjs/sdk/parameters.d.ts.map +1 -1
- package/dist/commonjs/sdk/parameters.js +2 -2
- package/dist/commonjs/sdk/parameters.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +1 -1
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +2 -2
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/analyticsGetActivity.js +2 -3
- package/dist/esm/funcs/analyticsGetActivity.js.map +1 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js +2 -3
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.js +2 -3
- package/dist/esm/funcs/apiKeysGetAuthKey.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKey.js +2 -3
- package/dist/esm/funcs/apiKeysGetKey.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeys.js +2 -3
- package/dist/esm/funcs/apiKeysGetKeys.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.js +2 -3
- package/dist/esm/funcs/apiKeysGetKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.js +2 -3
- package/dist/esm/funcs/apiKeysPatchKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysPostKeys.js +2 -3
- package/dist/esm/funcs/apiKeysPostKeys.js.map +1 -1
- package/dist/esm/funcs/{chatSend.d.ts → chatGenerateResponse.d.ts} +6 -6
- package/dist/esm/funcs/chatGenerateResponse.d.ts.map +1 -0
- package/dist/esm/funcs/{chatSend.js → chatGenerateResponse.js} +11 -12
- package/dist/esm/funcs/chatGenerateResponse.js.map +1 -0
- package/dist/esm/funcs/embeddingsPostEmbeddings.js +2 -3
- package/dist/esm/funcs/embeddingsPostEmbeddings.js.map +1 -1
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js +2 -3
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js.map +1 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js +2 -3
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -1
- package/dist/esm/funcs/generationsGetGeneration.js +2 -3
- package/dist/esm/funcs/generationsGetGeneration.js.map +1 -1
- package/dist/esm/funcs/getCredits.js +2 -3
- package/dist/esm/funcs/getCredits.js.map +1 -1
- package/dist/esm/funcs/getProviders.js +2 -3
- package/dist/esm/funcs/getProviders.js.map +1 -1
- package/dist/esm/funcs/modelsGetModels.js +2 -3
- package/dist/esm/funcs/modelsGetModels.js.map +1 -1
- package/dist/esm/funcs/modelsGetModelsCount.js +2 -3
- package/dist/esm/funcs/modelsGetModelsCount.js.map +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.d.ts +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.js +8 -13
- package/dist/esm/funcs/modelsGetModelsUser.js.map +1 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.d.ts +1 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.d.ts.map +1 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.js +8 -13
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.js.map +1 -1
- package/dist/esm/funcs/postCreditsCoinbase.d.ts +1 -1
- package/dist/esm/funcs/postCreditsCoinbase.d.ts.map +1 -1
- package/dist/esm/funcs/postCreditsCoinbase.js +8 -13
- package/dist/esm/funcs/postCreditsCoinbase.js.map +1 -1
- package/dist/esm/lib/config.d.ts +8 -4
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/env.d.ts +2 -1
- package/dist/esm/lib/env.d.ts.map +1 -1
- package/dist/esm/lib/env.js +2 -1
- package/dist/esm/lib/env.js.map +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +7 -1
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/models/chatcompletion.d.ts +43 -0
- package/dist/esm/models/chatcompletion.d.ts.map +1 -0
- package/dist/esm/models/chatcompletion.js +54 -0
- package/dist/esm/models/chatcompletion.js.map +1 -0
- package/dist/esm/models/chatcompletionchoice.d.ts +72 -0
- package/dist/esm/models/chatcompletionchoice.d.ts.map +1 -0
- package/dist/esm/models/chatcompletionchoice.js +70 -0
- package/dist/esm/models/chatcompletionchoice.js.map +1 -0
- package/dist/esm/models/chatcompletionchunk.d.ts +68 -0
- package/dist/esm/models/chatcompletionchunk.d.ts.map +1 -0
- package/dist/esm/models/chatcompletionchunk.js +91 -0
- package/dist/esm/models/chatcompletionchunk.js.map +1 -0
- package/dist/esm/models/chatcompletionchunkchoice.d.ts +72 -0
- package/dist/esm/models/chatcompletionchunkchoice.d.ts.map +1 -0
- package/dist/esm/models/chatcompletionchunkchoice.js +70 -0
- package/dist/esm/models/chatcompletionchunkchoice.js.map +1 -0
- package/dist/esm/models/chatcompletionchunkchoicedelta.d.ts +61 -0
- package/dist/esm/models/chatcompletionchunkchoicedelta.d.ts.map +1 -0
- package/dist/esm/models/{chatstreamingmessagechunk.js → chatcompletionchunkchoicedelta.js} +19 -17
- package/dist/esm/models/chatcompletionchunkchoicedelta.js.map +1 -0
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.d.ts +62 -0
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.d.ts.map +1 -0
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.js +64 -0
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.js.map +1 -0
- package/dist/esm/models/chatcompletionerror.d.ts +35 -0
- package/dist/esm/models/chatcompletionerror.d.ts.map +1 -0
- package/dist/esm/models/chatcompletionerror.js +37 -0
- package/dist/esm/models/chatcompletionerror.js.map +1 -0
- package/dist/esm/models/chatcompletionmessage.d.ts +62 -0
- package/dist/esm/models/chatcompletionmessage.d.ts.map +1 -0
- package/dist/esm/models/chatcompletionmessage.js +73 -0
- package/dist/esm/models/chatcompletionmessage.js.map +1 -0
- package/dist/esm/models/errorresponse.d.ts +8 -8
- package/dist/esm/models/errorresponse.d.ts.map +1 -1
- package/dist/esm/models/errorresponse.js +12 -13
- package/dist/esm/models/errorresponse.js.map +1 -1
- package/dist/esm/models/errors/chatcompletionerror.d.ts +37 -0
- package/dist/esm/models/errors/chatcompletionerror.d.ts.map +1 -0
- package/dist/esm/models/errors/chatcompletionerror.js +48 -0
- package/dist/esm/models/errors/chatcompletionerror.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +1 -1
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -1
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/index.d.ts +9 -8
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +9 -8
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/message.d.ts +19 -54
- package/dist/esm/models/message.d.ts.map +1 -1
- package/dist/esm/models/message.js +21 -68
- package/dist/esm/models/message.js.map +1 -1
- package/dist/esm/models/operations/getmodelsuser.d.ts +0 -25
- package/dist/esm/models/operations/getmodelsuser.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelsuser.js +0 -25
- package/dist/esm/models/operations/getmodelsuser.js.map +1 -1
- package/dist/esm/models/operations/getparametersauthorslug.d.ts +0 -25
- package/dist/esm/models/operations/getparametersauthorslug.d.ts.map +1 -1
- package/dist/esm/models/operations/getparametersauthorslug.js +0 -25
- package/dist/esm/models/operations/getparametersauthorslug.js.map +1 -1
- package/dist/esm/models/operations/postchatcompletions.d.ts +3 -3
- package/dist/esm/models/operations/postchatcompletions.d.ts.map +1 -1
- package/dist/esm/models/operations/postchatcompletions.js +3 -3
- package/dist/esm/models/operations/postchatcompletions.js.map +1 -1
- package/dist/esm/models/operations/postcreditscoinbase.d.ts +0 -25
- package/dist/esm/models/operations/postcreditscoinbase.d.ts.map +1 -1
- package/dist/esm/models/operations/postcreditscoinbase.js +0 -25
- package/dist/esm/models/operations/postcreditscoinbase.js.map +1 -1
- package/dist/esm/models/security.d.ts +4 -2
- package/dist/esm/models/security.d.ts.map +1 -1
- package/dist/esm/models/security.js +4 -2
- package/dist/esm/models/security.js.map +1 -1
- package/dist/esm/models/toolmessage.d.ts +55 -0
- package/dist/esm/models/toolmessage.d.ts.map +1 -0
- package/dist/esm/models/toolmessage.js +69 -0
- package/dist/esm/models/toolmessage.js.map +1 -0
- package/dist/esm/react-query/chatGenerateResponse.d.ts +28 -0
- package/dist/esm/react-query/chatGenerateResponse.d.ts.map +1 -0
- package/dist/esm/react-query/chatGenerateResponse.js +43 -0
- package/dist/esm/react-query/chatGenerateResponse.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +1 -1
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -1
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/modelsGetModelsUser.d.ts +4 -4
- package/dist/esm/react-query/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/esm/react-query/modelsGetModelsUser.js +8 -8
- package/dist/esm/react-query/modelsGetModelsUser.js.map +1 -1
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts +4 -4
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts.map +1 -1
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js +8 -8
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js.map +1 -1
- package/dist/esm/react-query/postCreditsCoinbase.d.ts +0 -1
- package/dist/esm/react-query/postCreditsCoinbase.d.ts.map +1 -1
- package/dist/esm/react-query/postCreditsCoinbase.js +2 -2
- package/dist/esm/react-query/postCreditsCoinbase.js.map +1 -1
- package/dist/esm/sdk/chat.d.ts +5 -5
- package/dist/esm/sdk/chat.d.ts.map +1 -1
- package/dist/esm/sdk/chat.js +5 -5
- package/dist/esm/sdk/chat.js.map +1 -1
- package/dist/esm/sdk/models.d.ts +1 -1
- package/dist/esm/sdk/models.d.ts.map +1 -1
- package/dist/esm/sdk/models.js +2 -2
- package/dist/esm/sdk/models.js.map +1 -1
- package/dist/esm/sdk/parameters.d.ts +1 -1
- package/dist/esm/sdk/parameters.d.ts.map +1 -1
- package/dist/esm/sdk/parameters.js +2 -2
- package/dist/esm/sdk/parameters.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +1 -1
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +2 -2
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/analytics/README.md +6 -2
- package/docs/sdks/apikeys/README.md +42 -14
- package/docs/sdks/chat/README.md +17 -13
- package/docs/sdks/embeddings/README.md +6 -2
- package/docs/sdks/endpoints/README.md +12 -4
- package/docs/sdks/generations/README.md +6 -2
- package/docs/sdks/models/README.md +24 -13
- package/docs/sdks/openrouter/README.md +24 -13
- package/docs/sdks/parameters/README.md +10 -7
- package/examples/getCredits.example.ts +3 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/analyticsGetActivity.ts +2 -3
- package/src/funcs/apiKeysDeleteKeysHash.ts +2 -3
- package/src/funcs/apiKeysGetAuthKey.ts +2 -3
- package/src/funcs/apiKeysGetKey.ts +2 -3
- package/src/funcs/apiKeysGetKeys.ts +2 -3
- package/src/funcs/apiKeysGetKeysHash.ts +2 -3
- package/src/funcs/apiKeysPatchKeysHash.ts +2 -3
- package/src/funcs/apiKeysPostKeys.ts +2 -3
- package/src/funcs/{chatSend.ts → chatGenerateResponse.ts} +16 -13
- package/src/funcs/embeddingsPostEmbeddings.ts +2 -3
- package/src/funcs/endpointsGetEndpointsZdr.ts +2 -3
- package/src/funcs/endpointsGetModelsAuthorSlugEndpoints.ts +2 -3
- package/src/funcs/generationsGetGeneration.ts +2 -3
- package/src/funcs/getCredits.ts +2 -3
- package/src/funcs/getProviders.ts +2 -3
- package/src/funcs/modelsGetModels.ts +2 -3
- package/src/funcs/modelsGetModelsCount.ts +2 -3
- package/src/funcs/modelsGetModelsUser.ts +5 -15
- package/src/funcs/parametersGetParametersAuthorSlug.ts +5 -15
- package/src/funcs/postCreditsCoinbase.ts +5 -15
- package/src/lib/config.ts +8 -4
- package/src/lib/env.ts +4 -2
- package/src/lib/security.ts +8 -1
- package/src/models/{chatresponse.ts → chatcompletion.ts} +34 -34
- package/src/models/chatcompletionchoice.ts +132 -0
- package/src/models/chatcompletionchunk.ts +169 -0
- package/src/models/chatcompletionchunkchoice.ts +139 -0
- package/src/models/{chatstreamingmessagechunk.ts → chatcompletionchunkchoicedelta.ts} +36 -30
- package/src/models/chatcompletionchunkchoicedeltatoolcall.ts +166 -0
- package/src/models/chatcompletionerror.ts +78 -0
- package/src/models/chatcompletionmessage.ts +167 -0
- package/src/models/errorresponse.ts +15 -14
- package/src/models/errors/chatcompletionerror.ts +79 -0
- package/src/models/errors/index.ts +1 -1
- package/src/models/index.ts +9 -8
- package/src/models/message.ts +49 -151
- package/src/models/operations/getmodelsuser.ts +0 -58
- package/src/models/operations/getparametersauthorslug.ts +0 -60
- package/src/models/operations/postchatcompletions.ts +6 -8
- package/src/models/operations/postcreditscoinbase.ts +0 -60
- package/src/models/security.ts +8 -4
- package/src/models/toolmessage.ts +140 -0
- package/src/react-query/{chatSend.ts → chatGenerateResponse.ts} +30 -20
- package/src/react-query/index.ts +1 -1
- package/src/react-query/modelsGetModelsUser.ts +0 -8
- package/src/react-query/parametersGetParametersAuthorSlug.ts +0 -8
- package/src/react-query/postCreditsCoinbase.ts +0 -3
- package/src/sdk/chat.ts +11 -6
- package/src/sdk/models.ts +0 -2
- package/src/sdk/parameters.ts +0 -2
- package/src/sdk/sdk.ts +0 -2
- package/dist/commonjs/funcs/chatSend.d.ts.map +0 -1
- package/dist/commonjs/funcs/chatSend.js.map +0 -1
- package/dist/commonjs/models/chaterror.d.ts +0 -56
- package/dist/commonjs/models/chaterror.d.ts.map +0 -1
- package/dist/commonjs/models/chaterror.js +0 -99
- package/dist/commonjs/models/chaterror.js.map +0 -1
- package/dist/commonjs/models/chatresponse.d.ts +0 -43
- package/dist/commonjs/models/chatresponse.d.ts.map +0 -1
- package/dist/commonjs/models/chatresponse.js.map +0 -1
- package/dist/commonjs/models/chatresponsechoice.d.ts +0 -72
- package/dist/commonjs/models/chatresponsechoice.d.ts.map +0 -1
- package/dist/commonjs/models/chatresponsechoice.js +0 -108
- package/dist/commonjs/models/chatresponsechoice.js.map +0 -1
- package/dist/commonjs/models/chatstreamingchoice.d.ts +0 -72
- package/dist/commonjs/models/chatstreamingchoice.d.ts.map +0 -1
- package/dist/commonjs/models/chatstreamingchoice.js.map +0 -1
- package/dist/commonjs/models/chatstreamingmessagechunk.d.ts +0 -61
- package/dist/commonjs/models/chatstreamingmessagechunk.d.ts.map +0 -1
- package/dist/commonjs/models/chatstreamingmessagechunk.js.map +0 -1
- package/dist/commonjs/models/chatstreamingmessagetoolcall.d.ts +0 -62
- package/dist/commonjs/models/chatstreamingmessagetoolcall.d.ts.map +0 -1
- package/dist/commonjs/models/chatstreamingmessagetoolcall.js +0 -106
- package/dist/commonjs/models/chatstreamingmessagetoolcall.js.map +0 -1
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts +0 -97
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts.map +0 -1
- package/dist/commonjs/models/chatstreamingresponsechunk.js.map +0 -1
- package/dist/commonjs/models/errors/chaterror.d.ts +0 -37
- package/dist/commonjs/models/errors/chaterror.d.ts.map +0 -1
- package/dist/commonjs/models/errors/chaterror.js.map +0 -1
- package/dist/commonjs/models/toolresponsemessage.d.ts +0 -55
- package/dist/commonjs/models/toolresponsemessage.d.ts.map +0 -1
- package/dist/commonjs/models/toolresponsemessage.js.map +0 -1
- package/dist/commonjs/react-query/chatSend.d.ts +0 -28
- package/dist/commonjs/react-query/chatSend.d.ts.map +0 -1
- package/dist/commonjs/react-query/chatSend.js +0 -50
- package/dist/commonjs/react-query/chatSend.js.map +0 -1
- package/dist/esm/funcs/chatSend.d.ts.map +0 -1
- package/dist/esm/funcs/chatSend.js.map +0 -1
- package/dist/esm/models/chaterror.d.ts +0 -56
- package/dist/esm/models/chaterror.d.ts.map +0 -1
- package/dist/esm/models/chaterror.js +0 -59
- package/dist/esm/models/chaterror.js.map +0 -1
- package/dist/esm/models/chatresponse.d.ts +0 -43
- package/dist/esm/models/chatresponse.d.ts.map +0 -1
- package/dist/esm/models/chatresponse.js +0 -54
- package/dist/esm/models/chatresponse.js.map +0 -1
- package/dist/esm/models/chatresponsechoice.d.ts +0 -72
- package/dist/esm/models/chatresponsechoice.d.ts.map +0 -1
- package/dist/esm/models/chatresponsechoice.js +0 -70
- package/dist/esm/models/chatresponsechoice.js.map +0 -1
- package/dist/esm/models/chatstreamingchoice.d.ts +0 -72
- package/dist/esm/models/chatstreamingchoice.d.ts.map +0 -1
- package/dist/esm/models/chatstreamingchoice.js +0 -70
- package/dist/esm/models/chatstreamingchoice.js.map +0 -1
- package/dist/esm/models/chatstreamingmessagechunk.d.ts +0 -61
- package/dist/esm/models/chatstreamingmessagechunk.d.ts.map +0 -1
- package/dist/esm/models/chatstreamingmessagechunk.js.map +0 -1
- package/dist/esm/models/chatstreamingmessagetoolcall.d.ts +0 -62
- package/dist/esm/models/chatstreamingmessagetoolcall.d.ts.map +0 -1
- package/dist/esm/models/chatstreamingmessagetoolcall.js +0 -66
- package/dist/esm/models/chatstreamingmessagetoolcall.js.map +0 -1
- package/dist/esm/models/chatstreamingresponsechunk.d.ts +0 -97
- package/dist/esm/models/chatstreamingresponsechunk.d.ts.map +0 -1
- package/dist/esm/models/chatstreamingresponsechunk.js +0 -122
- package/dist/esm/models/chatstreamingresponsechunk.js.map +0 -1
- package/dist/esm/models/errors/chaterror.d.ts +0 -37
- package/dist/esm/models/errors/chaterror.d.ts.map +0 -1
- package/dist/esm/models/errors/chaterror.js +0 -48
- package/dist/esm/models/errors/chaterror.js.map +0 -1
- package/dist/esm/models/toolresponsemessage.d.ts +0 -55
- package/dist/esm/models/toolresponsemessage.d.ts.map +0 -1
- package/dist/esm/models/toolresponsemessage.js +0 -69
- package/dist/esm/models/toolresponsemessage.js.map +0 -1
- package/dist/esm/react-query/chatSend.d.ts +0 -28
- package/dist/esm/react-query/chatSend.d.ts.map +0 -1
- package/dist/esm/react-query/chatSend.js +0 -43
- package/dist/esm/react-query/chatSend.js.map +0 -1
- package/src/models/chaterror.ts +0 -114
- package/src/models/chatresponsechoice.ts +0 -132
- package/src/models/chatstreamingchoice.ts +0 -132
- package/src/models/chatstreamingmessagetoolcall.ts +0 -149
- package/src/models/chatstreamingresponsechunk.ts +0 -239
- package/src/models/errors/chaterror.ts +0 -79
- package/src/models/toolresponsemessage.ts +0 -144
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
export * from "./
|
|
5
|
+
export * from "./chatcompletionerror.js";
|
|
6
6
|
export * from "./getproviders.js";
|
|
7
7
|
export * from "./httpclienterrors.js";
|
|
8
8
|
export * from "./openrouterdefaulterror.js";
|
package/src/models/index.ts
CHANGED
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
export * from "./activityitem.js";
|
|
6
6
|
export * from "./assistantmessage.js";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./chatcompletion.js";
|
|
8
|
+
export * from "./chatcompletionchoice.js";
|
|
9
|
+
export * from "./chatcompletionchunk.js";
|
|
10
|
+
export * from "./chatcompletionchunkchoice.js";
|
|
11
|
+
export * from "./chatcompletionchunkchoicedelta.js";
|
|
12
|
+
export * from "./chatcompletionchunkchoicedeltatoolcall.js";
|
|
13
|
+
export * from "./chatcompletionerror.js";
|
|
14
|
+
export * from "./chatcompletionmessage.js";
|
|
8
15
|
export * from "./chatgenerationparams.js";
|
|
9
16
|
export * from "./chatgenerationtokenusage.js";
|
|
10
17
|
export * from "./chatmessagecontentitem.js";
|
|
@@ -14,12 +21,6 @@ export * from "./chatmessagecontentitemtext.js";
|
|
|
14
21
|
export * from "./chatmessagetokenlogprob.js";
|
|
15
22
|
export * from "./chatmessagetokenlogprobs.js";
|
|
16
23
|
export * from "./chatmessagetoolcall.js";
|
|
17
|
-
export * from "./chatresponse.js";
|
|
18
|
-
export * from "./chatresponsechoice.js";
|
|
19
|
-
export * from "./chatstreamingchoice.js";
|
|
20
|
-
export * from "./chatstreamingmessagechunk.js";
|
|
21
|
-
export * from "./chatstreamingmessagetoolcall.js";
|
|
22
|
-
export * from "./chatstreamingresponsechunk.js";
|
|
23
24
|
export * from "./chatstreamoptions.js";
|
|
24
25
|
export * from "./errorresponse.js";
|
|
25
26
|
export * from "./message.js";
|
|
@@ -27,5 +28,5 @@ export * from "./namedtoolchoice.js";
|
|
|
27
28
|
export * from "./security.js";
|
|
28
29
|
export * from "./systemmessage.js";
|
|
29
30
|
export * from "./tool.js";
|
|
30
|
-
export * from "./
|
|
31
|
+
export * from "./toolmessage.js";
|
|
31
32
|
export * from "./usermessage.js";
|
package/src/models/message.ts
CHANGED
|
@@ -11,12 +11,6 @@ import {
|
|
|
11
11
|
AssistantMessage$Outbound,
|
|
12
12
|
AssistantMessage$outboundSchema,
|
|
13
13
|
} from "./assistantmessage.js";
|
|
14
|
-
import {
|
|
15
|
-
ChatMessageContentItemText,
|
|
16
|
-
ChatMessageContentItemText$inboundSchema,
|
|
17
|
-
ChatMessageContentItemText$Outbound,
|
|
18
|
-
ChatMessageContentItemText$outboundSchema,
|
|
19
|
-
} from "./chatmessagecontentitemtext.js";
|
|
20
14
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
21
15
|
import {
|
|
22
16
|
SystemMessage,
|
|
@@ -25,11 +19,11 @@ import {
|
|
|
25
19
|
SystemMessage$outboundSchema,
|
|
26
20
|
} from "./systemmessage.js";
|
|
27
21
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} from "./
|
|
22
|
+
ToolMessage,
|
|
23
|
+
ToolMessage$inboundSchema,
|
|
24
|
+
ToolMessage$Outbound,
|
|
25
|
+
ToolMessage$outboundSchema,
|
|
26
|
+
} from "./toolmessage.js";
|
|
33
27
|
import {
|
|
34
28
|
UserMessage,
|
|
35
29
|
UserMessage$inboundSchema,
|
|
@@ -37,150 +31,43 @@ import {
|
|
|
37
31
|
UserMessage$outboundSchema,
|
|
38
32
|
} from "./usermessage.js";
|
|
39
33
|
|
|
40
|
-
export type MessageContent = string | Array<ChatMessageContentItemText>;
|
|
41
|
-
|
|
42
|
-
export type MessageDeveloper = {
|
|
43
|
-
role: "developer";
|
|
44
|
-
content: string | Array<ChatMessageContentItemText>;
|
|
45
|
-
name?: string | undefined;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
34
|
export type Message =
|
|
49
|
-
|
|
|
50
|
-
| SystemMessage
|
|
51
|
-
| UserMessage
|
|
52
|
-
|
|
|
53
|
-
| AssistantMessage;
|
|
54
|
-
|
|
55
|
-
/** @internal */
|
|
56
|
-
export const MessageContent$inboundSchema: z.ZodType<
|
|
57
|
-
MessageContent,
|
|
58
|
-
z.ZodTypeDef,
|
|
59
|
-
unknown
|
|
60
|
-
> = z.union([z.string(), z.array(ChatMessageContentItemText$inboundSchema)]);
|
|
61
|
-
|
|
62
|
-
/** @internal */
|
|
63
|
-
export type MessageContent$Outbound =
|
|
64
|
-
| string
|
|
65
|
-
| Array<ChatMessageContentItemText$Outbound>;
|
|
66
|
-
|
|
67
|
-
/** @internal */
|
|
68
|
-
export const MessageContent$outboundSchema: z.ZodType<
|
|
69
|
-
MessageContent$Outbound,
|
|
70
|
-
z.ZodTypeDef,
|
|
71
|
-
MessageContent
|
|
72
|
-
> = z.union([z.string(), z.array(ChatMessageContentItemText$outboundSchema)]);
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @internal
|
|
76
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
77
|
-
*/
|
|
78
|
-
export namespace MessageContent$ {
|
|
79
|
-
/** @deprecated use `MessageContent$inboundSchema` instead. */
|
|
80
|
-
export const inboundSchema = MessageContent$inboundSchema;
|
|
81
|
-
/** @deprecated use `MessageContent$outboundSchema` instead. */
|
|
82
|
-
export const outboundSchema = MessageContent$outboundSchema;
|
|
83
|
-
/** @deprecated use `MessageContent$Outbound` instead. */
|
|
84
|
-
export type Outbound = MessageContent$Outbound;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export function messageContentToJSON(messageContent: MessageContent): string {
|
|
88
|
-
return JSON.stringify(MessageContent$outboundSchema.parse(messageContent));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export function messageContentFromJSON(
|
|
92
|
-
jsonString: string,
|
|
93
|
-
): SafeParseResult<MessageContent, SDKValidationError> {
|
|
94
|
-
return safeParse(
|
|
95
|
-
jsonString,
|
|
96
|
-
(x) => MessageContent$inboundSchema.parse(JSON.parse(x)),
|
|
97
|
-
`Failed to parse 'MessageContent' from JSON`,
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/** @internal */
|
|
102
|
-
export const MessageDeveloper$inboundSchema: z.ZodType<
|
|
103
|
-
MessageDeveloper,
|
|
104
|
-
z.ZodTypeDef,
|
|
105
|
-
unknown
|
|
106
|
-
> = z.object({
|
|
107
|
-
role: z.literal("developer"),
|
|
108
|
-
content: z.union([
|
|
109
|
-
z.string(),
|
|
110
|
-
z.array(ChatMessageContentItemText$inboundSchema),
|
|
111
|
-
]),
|
|
112
|
-
name: z.string().optional(),
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
/** @internal */
|
|
116
|
-
export type MessageDeveloper$Outbound = {
|
|
117
|
-
role: "developer";
|
|
118
|
-
content: string | Array<ChatMessageContentItemText$Outbound>;
|
|
119
|
-
name?: string | undefined;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
/** @internal */
|
|
123
|
-
export const MessageDeveloper$outboundSchema: z.ZodType<
|
|
124
|
-
MessageDeveloper$Outbound,
|
|
125
|
-
z.ZodTypeDef,
|
|
126
|
-
MessageDeveloper
|
|
127
|
-
> = z.object({
|
|
128
|
-
role: z.literal("developer"),
|
|
129
|
-
content: z.union([
|
|
130
|
-
z.string(),
|
|
131
|
-
z.array(ChatMessageContentItemText$outboundSchema),
|
|
132
|
-
]),
|
|
133
|
-
name: z.string().optional(),
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* @internal
|
|
138
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
139
|
-
*/
|
|
140
|
-
export namespace MessageDeveloper$ {
|
|
141
|
-
/** @deprecated use `MessageDeveloper$inboundSchema` instead. */
|
|
142
|
-
export const inboundSchema = MessageDeveloper$inboundSchema;
|
|
143
|
-
/** @deprecated use `MessageDeveloper$outboundSchema` instead. */
|
|
144
|
-
export const outboundSchema = MessageDeveloper$outboundSchema;
|
|
145
|
-
/** @deprecated use `MessageDeveloper$Outbound` instead. */
|
|
146
|
-
export type Outbound = MessageDeveloper$Outbound;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export function messageDeveloperToJSON(
|
|
150
|
-
messageDeveloper: MessageDeveloper,
|
|
151
|
-
): string {
|
|
152
|
-
return JSON.stringify(
|
|
153
|
-
MessageDeveloper$outboundSchema.parse(messageDeveloper),
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export function messageDeveloperFromJSON(
|
|
158
|
-
jsonString: string,
|
|
159
|
-
): SafeParseResult<MessageDeveloper, SDKValidationError> {
|
|
160
|
-
return safeParse(
|
|
161
|
-
jsonString,
|
|
162
|
-
(x) => MessageDeveloper$inboundSchema.parse(JSON.parse(x)),
|
|
163
|
-
`Failed to parse 'MessageDeveloper' from JSON`,
|
|
164
|
-
);
|
|
165
|
-
}
|
|
35
|
+
| (ToolMessage & { role: "tool" })
|
|
36
|
+
| (SystemMessage & { role: "system" })
|
|
37
|
+
| (UserMessage & { role: "user" })
|
|
38
|
+
| (AssistantMessage & { role: "assistant" });
|
|
166
39
|
|
|
167
40
|
/** @internal */
|
|
168
41
|
export const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown> =
|
|
169
42
|
z.union([
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
43
|
+
ToolMessage$inboundSchema.and(
|
|
44
|
+
z.object({ role: z.literal("tool") }).transform((v) => ({
|
|
45
|
+
role: v.role,
|
|
46
|
+
})),
|
|
47
|
+
),
|
|
48
|
+
SystemMessage$inboundSchema.and(
|
|
49
|
+
z.object({ role: z.literal("system") }).transform((v) => ({
|
|
50
|
+
role: v.role,
|
|
51
|
+
})),
|
|
52
|
+
),
|
|
53
|
+
UserMessage$inboundSchema.and(
|
|
54
|
+
z.object({ role: z.literal("user") }).transform((v) => ({
|
|
55
|
+
role: v.role,
|
|
56
|
+
})),
|
|
57
|
+
),
|
|
58
|
+
AssistantMessage$inboundSchema.and(
|
|
59
|
+
z.object({ role: z.literal("assistant") }).transform((v) => ({
|
|
60
|
+
role: v.role,
|
|
61
|
+
})),
|
|
62
|
+
),
|
|
175
63
|
]);
|
|
176
64
|
|
|
177
65
|
/** @internal */
|
|
178
66
|
export type Message$Outbound =
|
|
179
|
-
|
|
|
180
|
-
| SystemMessage$Outbound
|
|
181
|
-
| UserMessage$Outbound
|
|
182
|
-
|
|
|
183
|
-
| AssistantMessage$Outbound;
|
|
67
|
+
| (ToolMessage$Outbound & { role: "tool" })
|
|
68
|
+
| (SystemMessage$Outbound & { role: "system" })
|
|
69
|
+
| (UserMessage$Outbound & { role: "user" })
|
|
70
|
+
| (AssistantMessage$Outbound & { role: "assistant" });
|
|
184
71
|
|
|
185
72
|
/** @internal */
|
|
186
73
|
export const Message$outboundSchema: z.ZodType<
|
|
@@ -188,11 +75,22 @@ export const Message$outboundSchema: z.ZodType<
|
|
|
188
75
|
z.ZodTypeDef,
|
|
189
76
|
Message
|
|
190
77
|
> = z.union([
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
78
|
+
ToolMessage$outboundSchema.and(
|
|
79
|
+
z.object({ role: z.literal("tool") }).transform((v) => ({ role: v.role })),
|
|
80
|
+
),
|
|
81
|
+
SystemMessage$outboundSchema.and(
|
|
82
|
+
z.object({ role: z.literal("system") }).transform((v) => ({
|
|
83
|
+
role: v.role,
|
|
84
|
+
})),
|
|
85
|
+
),
|
|
86
|
+
UserMessage$outboundSchema.and(
|
|
87
|
+
z.object({ role: z.literal("user") }).transform((v) => ({ role: v.role })),
|
|
88
|
+
),
|
|
89
|
+
AssistantMessage$outboundSchema.and(
|
|
90
|
+
z.object({ role: z.literal("assistant") }).transform((v) => ({
|
|
91
|
+
role: v.role,
|
|
92
|
+
})),
|
|
93
|
+
),
|
|
196
94
|
]);
|
|
197
95
|
|
|
198
96
|
/**
|
|
@@ -10,10 +10,6 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
import * as models from "../index.js";
|
|
12
12
|
|
|
13
|
-
export type GetModelsUserSecurity = {
|
|
14
|
-
bearer: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
13
|
export type GetModelsUserPrompt = number | string | any;
|
|
18
14
|
|
|
19
15
|
export type GetModelsUserCompletion = number | string | any;
|
|
@@ -288,60 +284,6 @@ export type GetModelsUserResponse =
|
|
|
288
284
|
| GetModelsUserResponseBody
|
|
289
285
|
| models.ErrorResponse;
|
|
290
286
|
|
|
291
|
-
/** @internal */
|
|
292
|
-
export const GetModelsUserSecurity$inboundSchema: z.ZodType<
|
|
293
|
-
GetModelsUserSecurity,
|
|
294
|
-
z.ZodTypeDef,
|
|
295
|
-
unknown
|
|
296
|
-
> = z.object({
|
|
297
|
-
bearer: z.string(),
|
|
298
|
-
});
|
|
299
|
-
|
|
300
|
-
/** @internal */
|
|
301
|
-
export type GetModelsUserSecurity$Outbound = {
|
|
302
|
-
bearer: string;
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
/** @internal */
|
|
306
|
-
export const GetModelsUserSecurity$outboundSchema: z.ZodType<
|
|
307
|
-
GetModelsUserSecurity$Outbound,
|
|
308
|
-
z.ZodTypeDef,
|
|
309
|
-
GetModelsUserSecurity
|
|
310
|
-
> = z.object({
|
|
311
|
-
bearer: z.string(),
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* @internal
|
|
316
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
317
|
-
*/
|
|
318
|
-
export namespace GetModelsUserSecurity$ {
|
|
319
|
-
/** @deprecated use `GetModelsUserSecurity$inboundSchema` instead. */
|
|
320
|
-
export const inboundSchema = GetModelsUserSecurity$inboundSchema;
|
|
321
|
-
/** @deprecated use `GetModelsUserSecurity$outboundSchema` instead. */
|
|
322
|
-
export const outboundSchema = GetModelsUserSecurity$outboundSchema;
|
|
323
|
-
/** @deprecated use `GetModelsUserSecurity$Outbound` instead. */
|
|
324
|
-
export type Outbound = GetModelsUserSecurity$Outbound;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
export function getModelsUserSecurityToJSON(
|
|
328
|
-
getModelsUserSecurity: GetModelsUserSecurity,
|
|
329
|
-
): string {
|
|
330
|
-
return JSON.stringify(
|
|
331
|
-
GetModelsUserSecurity$outboundSchema.parse(getModelsUserSecurity),
|
|
332
|
-
);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export function getModelsUserSecurityFromJSON(
|
|
336
|
-
jsonString: string,
|
|
337
|
-
): SafeParseResult<GetModelsUserSecurity, SDKValidationError> {
|
|
338
|
-
return safeParse(
|
|
339
|
-
jsonString,
|
|
340
|
-
(x) => GetModelsUserSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
341
|
-
`Failed to parse 'GetModelsUserSecurity' from JSON`,
|
|
342
|
-
);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
287
|
/** @internal */
|
|
346
288
|
export const GetModelsUserPrompt$inboundSchema: z.ZodType<
|
|
347
289
|
GetModelsUserPrompt,
|
|
@@ -10,10 +10,6 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
import * as models from "../index.js";
|
|
12
12
|
|
|
13
|
-
export type GetParametersAuthorSlugSecurity = {
|
|
14
|
-
bearer: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
13
|
export const GetParametersAuthorSlugProvider = {
|
|
18
14
|
Ai21: "AI21",
|
|
19
15
|
AionLabs: "AionLabs",
|
|
@@ -146,62 +142,6 @@ export type GetParametersAuthorSlugResponse =
|
|
|
146
142
|
| GetParametersAuthorSlugResponseBody
|
|
147
143
|
| models.ErrorResponse;
|
|
148
144
|
|
|
149
|
-
/** @internal */
|
|
150
|
-
export const GetParametersAuthorSlugSecurity$inboundSchema: z.ZodType<
|
|
151
|
-
GetParametersAuthorSlugSecurity,
|
|
152
|
-
z.ZodTypeDef,
|
|
153
|
-
unknown
|
|
154
|
-
> = z.object({
|
|
155
|
-
bearer: z.string(),
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
/** @internal */
|
|
159
|
-
export type GetParametersAuthorSlugSecurity$Outbound = {
|
|
160
|
-
bearer: string;
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
/** @internal */
|
|
164
|
-
export const GetParametersAuthorSlugSecurity$outboundSchema: z.ZodType<
|
|
165
|
-
GetParametersAuthorSlugSecurity$Outbound,
|
|
166
|
-
z.ZodTypeDef,
|
|
167
|
-
GetParametersAuthorSlugSecurity
|
|
168
|
-
> = z.object({
|
|
169
|
-
bearer: z.string(),
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* @internal
|
|
174
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
175
|
-
*/
|
|
176
|
-
export namespace GetParametersAuthorSlugSecurity$ {
|
|
177
|
-
/** @deprecated use `GetParametersAuthorSlugSecurity$inboundSchema` instead. */
|
|
178
|
-
export const inboundSchema = GetParametersAuthorSlugSecurity$inboundSchema;
|
|
179
|
-
/** @deprecated use `GetParametersAuthorSlugSecurity$outboundSchema` instead. */
|
|
180
|
-
export const outboundSchema = GetParametersAuthorSlugSecurity$outboundSchema;
|
|
181
|
-
/** @deprecated use `GetParametersAuthorSlugSecurity$Outbound` instead. */
|
|
182
|
-
export type Outbound = GetParametersAuthorSlugSecurity$Outbound;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export function getParametersAuthorSlugSecurityToJSON(
|
|
186
|
-
getParametersAuthorSlugSecurity: GetParametersAuthorSlugSecurity,
|
|
187
|
-
): string {
|
|
188
|
-
return JSON.stringify(
|
|
189
|
-
GetParametersAuthorSlugSecurity$outboundSchema.parse(
|
|
190
|
-
getParametersAuthorSlugSecurity,
|
|
191
|
-
),
|
|
192
|
-
);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export function getParametersAuthorSlugSecurityFromJSON(
|
|
196
|
-
jsonString: string,
|
|
197
|
-
): SafeParseResult<GetParametersAuthorSlugSecurity, SDKValidationError> {
|
|
198
|
-
return safeParse(
|
|
199
|
-
jsonString,
|
|
200
|
-
(x) => GetParametersAuthorSlugSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
201
|
-
`Failed to parse 'GetParametersAuthorSlugSecurity' from JSON`,
|
|
202
|
-
);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
145
|
/** @internal */
|
|
206
146
|
export const GetParametersAuthorSlugProvider$inboundSchema: z.ZodNativeEnum<
|
|
207
147
|
typeof GetParametersAuthorSlugProvider
|
|
@@ -10,8 +10,8 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
10
10
|
import * as models from "../index.js";
|
|
11
11
|
|
|
12
12
|
export type PostChatCompletionsResponse =
|
|
13
|
-
| models.
|
|
14
|
-
| EventStream<models.
|
|
13
|
+
| models.ChatCompletion
|
|
14
|
+
| EventStream<models.ChatCompletionChunk>;
|
|
15
15
|
|
|
16
16
|
/** @internal */
|
|
17
17
|
export const PostChatCompletionsResponse$inboundSchema: z.ZodType<
|
|
@@ -19,16 +19,14 @@ export const PostChatCompletionsResponse$inboundSchema: z.ZodType<
|
|
|
19
19
|
z.ZodTypeDef,
|
|
20
20
|
unknown
|
|
21
21
|
> = z.union([
|
|
22
|
-
models.
|
|
22
|
+
models.ChatCompletion$inboundSchema,
|
|
23
23
|
z
|
|
24
24
|
.instanceof(ReadableStream<Uint8Array>)
|
|
25
25
|
.transform(stream => {
|
|
26
26
|
return new EventStream(stream, rawEvent => {
|
|
27
27
|
if (rawEvent.data === "[DONE]") return { done: true };
|
|
28
28
|
return {
|
|
29
|
-
value: models.
|
|
30
|
-
rawEvent,
|
|
31
|
-
),
|
|
29
|
+
value: models.ChatCompletionChunk$inboundSchema.parse(rawEvent),
|
|
32
30
|
};
|
|
33
31
|
});
|
|
34
32
|
}),
|
|
@@ -36,7 +34,7 @@ export const PostChatCompletionsResponse$inboundSchema: z.ZodType<
|
|
|
36
34
|
|
|
37
35
|
/** @internal */
|
|
38
36
|
export type PostChatCompletionsResponse$Outbound =
|
|
39
|
-
| models.
|
|
37
|
+
| models.ChatCompletion$Outbound
|
|
40
38
|
| never;
|
|
41
39
|
|
|
42
40
|
/** @internal */
|
|
@@ -44,7 +42,7 @@ export const PostChatCompletionsResponse$outboundSchema: z.ZodType<
|
|
|
44
42
|
PostChatCompletionsResponse$Outbound,
|
|
45
43
|
z.ZodTypeDef,
|
|
46
44
|
PostChatCompletionsResponse
|
|
47
|
-
> = z.union([models.
|
|
45
|
+
> = z.union([models.ChatCompletion$outboundSchema, z.never()]);
|
|
48
46
|
|
|
49
47
|
/**
|
|
50
48
|
* @internal
|
|
@@ -10,10 +10,6 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
import * as models from "../index.js";
|
|
12
12
|
|
|
13
|
-
export type PostCreditsCoinbaseSecurity = {
|
|
14
|
-
bearer: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
13
|
export const ChainId = {
|
|
18
14
|
One: 1,
|
|
19
15
|
OneHundredAndThirtySeven: 137,
|
|
@@ -73,62 +69,6 @@ export type PostCreditsCoinbaseResponse =
|
|
|
73
69
|
| PostCreditsCoinbaseResponseBody
|
|
74
70
|
| models.ErrorResponse;
|
|
75
71
|
|
|
76
|
-
/** @internal */
|
|
77
|
-
export const PostCreditsCoinbaseSecurity$inboundSchema: z.ZodType<
|
|
78
|
-
PostCreditsCoinbaseSecurity,
|
|
79
|
-
z.ZodTypeDef,
|
|
80
|
-
unknown
|
|
81
|
-
> = z.object({
|
|
82
|
-
bearer: z.string(),
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
/** @internal */
|
|
86
|
-
export type PostCreditsCoinbaseSecurity$Outbound = {
|
|
87
|
-
bearer: string;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/** @internal */
|
|
91
|
-
export const PostCreditsCoinbaseSecurity$outboundSchema: z.ZodType<
|
|
92
|
-
PostCreditsCoinbaseSecurity$Outbound,
|
|
93
|
-
z.ZodTypeDef,
|
|
94
|
-
PostCreditsCoinbaseSecurity
|
|
95
|
-
> = z.object({
|
|
96
|
-
bearer: z.string(),
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @internal
|
|
101
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
102
|
-
*/
|
|
103
|
-
export namespace PostCreditsCoinbaseSecurity$ {
|
|
104
|
-
/** @deprecated use `PostCreditsCoinbaseSecurity$inboundSchema` instead. */
|
|
105
|
-
export const inboundSchema = PostCreditsCoinbaseSecurity$inboundSchema;
|
|
106
|
-
/** @deprecated use `PostCreditsCoinbaseSecurity$outboundSchema` instead. */
|
|
107
|
-
export const outboundSchema = PostCreditsCoinbaseSecurity$outboundSchema;
|
|
108
|
-
/** @deprecated use `PostCreditsCoinbaseSecurity$Outbound` instead. */
|
|
109
|
-
export type Outbound = PostCreditsCoinbaseSecurity$Outbound;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export function postCreditsCoinbaseSecurityToJSON(
|
|
113
|
-
postCreditsCoinbaseSecurity: PostCreditsCoinbaseSecurity,
|
|
114
|
-
): string {
|
|
115
|
-
return JSON.stringify(
|
|
116
|
-
PostCreditsCoinbaseSecurity$outboundSchema.parse(
|
|
117
|
-
postCreditsCoinbaseSecurity,
|
|
118
|
-
),
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export function postCreditsCoinbaseSecurityFromJSON(
|
|
123
|
-
jsonString: string,
|
|
124
|
-
): SafeParseResult<PostCreditsCoinbaseSecurity, SDKValidationError> {
|
|
125
|
-
return safeParse(
|
|
126
|
-
jsonString,
|
|
127
|
-
(x) => PostCreditsCoinbaseSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
128
|
-
`Failed to parse 'PostCreditsCoinbaseSecurity' from JSON`,
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
72
|
/** @internal */
|
|
133
73
|
export const ChainId$inboundSchema: z.ZodNativeEnum<typeof ChainId> = z
|
|
134
74
|
.nativeEnum(ChainId);
|
package/src/models/security.ts
CHANGED
|
@@ -8,7 +8,8 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
8
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
10
|
export type Security = {
|
|
11
|
-
|
|
11
|
+
apiKeyAuth?: string | undefined;
|
|
12
|
+
bearerAuth?: string | undefined;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
/** @internal */
|
|
@@ -17,12 +18,14 @@ export const Security$inboundSchema: z.ZodType<
|
|
|
17
18
|
z.ZodTypeDef,
|
|
18
19
|
unknown
|
|
19
20
|
> = z.object({
|
|
20
|
-
|
|
21
|
+
apiKeyAuth: z.string().optional(),
|
|
22
|
+
bearerAuth: z.string().optional(),
|
|
21
23
|
});
|
|
22
24
|
|
|
23
25
|
/** @internal */
|
|
24
26
|
export type Security$Outbound = {
|
|
25
|
-
|
|
27
|
+
apiKeyAuth?: string | undefined;
|
|
28
|
+
bearerAuth?: string | undefined;
|
|
26
29
|
};
|
|
27
30
|
|
|
28
31
|
/** @internal */
|
|
@@ -31,7 +34,8 @@ export const Security$outboundSchema: z.ZodType<
|
|
|
31
34
|
z.ZodTypeDef,
|
|
32
35
|
Security
|
|
33
36
|
> = z.object({
|
|
34
|
-
|
|
37
|
+
apiKeyAuth: z.string().optional(),
|
|
38
|
+
bearerAuth: z.string().optional(),
|
|
35
39
|
});
|
|
36
40
|
|
|
37
41
|
/**
|