tekimax-ts 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -26
- package/dist/adapter-BtbeHotF.d.cts +81 -0
- package/dist/adapter-BtbeHotF.d.ts +81 -0
- package/dist/adapter-C5iFgx6o.d.cts +162 -0
- package/dist/adapter-C5iFgx6o.d.ts +162 -0
- package/dist/adapter-CMu9Gvvm.d.cts +81 -0
- package/dist/adapter-CMu9Gvvm.d.ts +81 -0
- package/dist/adapter-DeUJcFAn.d.cts +43 -0
- package/dist/adapter-DeUJcFAn.d.ts +43 -0
- package/dist/adapter-K9NFtBg8.d.cts +81 -0
- package/dist/adapter-K9NFtBg8.d.ts +81 -0
- package/dist/adapter-TuDzMu0Y.d.cts +43 -0
- package/dist/adapter-TuDzMu0Y.d.ts +43 -0
- package/dist/adapter-YcdKK3By.d.cts +63 -0
- package/dist/adapter-YcdKK3By.d.ts +63 -0
- package/dist/adapter-xdRwibId.d.cts +144 -0
- package/dist/adapter-xdRwibId.d.ts +144 -0
- package/dist/adapter-zXqUGXCx.d.cts +81 -0
- package/dist/adapter-zXqUGXCx.d.ts +81 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/gen/index.js +1572 -378
- package/dist/gen/types.js +290 -201
- package/dist/gen/zod/allowedToolChoiceSchema.js +17 -13
- package/dist/gen/zod/allowedToolsParamSchema.js +28 -13
- package/dist/gen/zod/annotationSchema.js +16 -11
- package/dist/gen/zod/assistantMessageItemParamSchema.js +52 -19
- package/dist/gen/zod/createResponseBodySchema.js +142 -44
- package/dist/gen/zod/createresponseSchema.js +23 -12
- package/dist/gen/zod/detailEnumSchema.js +8 -8
- package/dist/gen/zod/developerMessageItemParamSchema.js +35 -16
- package/dist/gen/zod/emptyModelParamSchema.js +8 -8
- package/dist/gen/zod/errorPayloadSchema.js +27 -14
- package/dist/gen/zod/errorSchema.js +17 -11
- package/dist/gen/zod/errorStreamingEventSchema.js +23 -13
- package/dist/gen/zod/functionCallItemParamSchema.js +38 -15
- package/dist/gen/zod/functionCallItemStatusSchema.js +12 -8
- package/dist/gen/zod/functionCallOutputItemParamSchema.js +90 -27
- package/dist/gen/zod/functionCallOutputSchema.js +67 -24
- package/dist/gen/zod/functionCallOutputStatusEnumSchema.js +12 -8
- package/dist/gen/zod/functionCallSchema.js +29 -16
- package/dist/gen/zod/functionCallStatusSchema.js +12 -8
- package/dist/gen/zod/functionToolChoiceSchema.js +10 -10
- package/dist/gen/zod/functionToolParamSchema.js +25 -14
- package/dist/gen/zod/functionToolSchema.js +24 -14
- package/dist/gen/zod/imageDetailSchema.js +8 -8
- package/dist/gen/zod/includeEnumSchema.js +11 -8
- package/dist/gen/zod/incompleteDetailsSchema.js +14 -10
- package/dist/gen/zod/index.js +871 -213
- package/dist/gen/zod/inputFileContentParamSchema.js +24 -13
- package/dist/gen/zod/inputFileContentSchema.js +23 -12
- package/dist/gen/zod/inputImageContentParamAutoParamSchema.js +29 -13
- package/dist/gen/zod/inputImageContentSchema.js +22 -13
- package/dist/gen/zod/inputTextContentParamSchema.js +19 -11
- package/dist/gen/zod/inputTextContentSchema.js +16 -11
- package/dist/gen/zod/inputTokensDetailsSchema.js +15 -10
- package/dist/gen/zod/inputVideoContentSchema.js +17 -11
- package/dist/gen/zod/itemFieldSchema.js +45 -20
- package/dist/gen/zod/itemParamSchema.js +55 -23
- package/dist/gen/zod/itemReferenceParamSchema.js +15 -11
- package/dist/gen/zod/jsonObjectResponseFormatSchema.js +9 -9
- package/dist/gen/zod/jsonSchemaResponseFormatParamSchema.js +38 -13
- package/dist/gen/zod/jsonSchemaResponseFormatSchema.js +13 -13
- package/dist/gen/zod/logProbSchema.js +20 -14
- package/dist/gen/zod/messageRoleSchema.js +13 -8
- package/dist/gen/zod/messageSchema.js +109 -43
- package/dist/gen/zod/messageStatusSchema.js +12 -8
- package/dist/gen/zod/metadataParamSchema.js +13 -8
- package/dist/gen/zod/outputTextContentParamSchema.js +21 -12
- package/dist/gen/zod/outputTextContentSchema.js +30 -15
- package/dist/gen/zod/outputTokensDetailsSchema.js +17 -10
- package/dist/gen/zod/reasoningBodySchema.js +173 -54
- package/dist/gen/zod/reasoningEffortEnumSchema.js +14 -8
- package/dist/gen/zod/reasoningItemParamSchema.js +26 -14
- package/dist/gen/zod/reasoningParamSchema.js +33 -13
- package/dist/gen/zod/reasoningSchema.js +27 -13
- package/dist/gen/zod/reasoningSummaryContentParamSchema.js +13 -10
- package/dist/gen/zod/reasoningSummaryEnumSchema.js +12 -8
- package/dist/gen/zod/reasoningTextContentSchema.js +16 -11
- package/dist/gen/zod/refusalContentParamSchema.js +13 -10
- package/dist/gen/zod/refusalContentSchema.js +18 -11
- package/dist/gen/zod/responseCompletedStreamingEventSchema.js +23 -13
- package/dist/gen/zod/responseContentPartAddedStreamingEventSchema.js +98 -39
- package/dist/gen/zod/responseContentPartDoneStreamingEventSchema.js +98 -39
- package/dist/gen/zod/responseCreatedStreamingEventSchema.js +23 -13
- package/dist/gen/zod/responseFailedStreamingEventSchema.js +23 -13
- package/dist/gen/zod/responseFunctionCallArgumentsDeltaStreamingEventSchema.js +38 -15
- package/dist/gen/zod/responseFunctionCallArgumentsDoneStreamingEventSchema.js +33 -14
- package/dist/gen/zod/responseInProgressStreamingEventSchema.js +23 -13
- package/dist/gen/zod/responseIncompleteStreamingEventSchema.js +23 -13
- package/dist/gen/zod/responseOutputItemAddedStreamingEventSchema.js +32 -14
- package/dist/gen/zod/responseOutputItemDoneStreamingEventSchema.js +30 -14
- package/dist/gen/zod/responseOutputTextAnnotationAddedStreamingEventSchema.js +43 -17
- package/dist/gen/zod/responseOutputTextDeltaStreamingEventSchema.js +48 -18
- package/dist/gen/zod/responseOutputTextDoneStreamingEventSchema.js +39 -17
- package/dist/gen/zod/responseQueuedStreamingEventSchema.js +23 -13
- package/dist/gen/zod/responseReasoningDeltaStreamingEventSchema.js +40 -16
- package/dist/gen/zod/responseReasoningDoneStreamingEventSchema.js +31 -15
- package/dist/gen/zod/responseReasoningSummaryDeltaStreamingEventSchema.js +42 -16
- package/dist/gen/zod/responseReasoningSummaryDoneStreamingEventSchema.js +33 -15
- package/dist/gen/zod/responseReasoningSummaryPartAddedStreamingEventSchema.js +102 -39
- package/dist/gen/zod/responseReasoningSummaryPartDoneStreamingEventSchema.js +102 -39
- package/dist/gen/zod/responseRefusalDeltaStreamingEventSchema.js +33 -15
- package/dist/gen/zod/responseRefusalDoneStreamingEventSchema.js +31 -15
- package/dist/gen/zod/responseResourceSchema.js +146 -51
- package/dist/gen/zod/responsesToolParamSchema.js +15 -11
- package/dist/gen/zod/serviceTierEnumSchema.js +13 -8
- package/dist/gen/zod/specificFunctionParamSchema.js +13 -10
- package/dist/gen/zod/specificToolChoiceParamSchema.js +11 -9
- package/dist/gen/zod/streamOptionsParamSchema.js +18 -10
- package/dist/gen/zod/summaryTextContentSchema.js +18 -11
- package/dist/gen/zod/systemMessageItemParamSchema.js +35 -16
- package/dist/gen/zod/textContentSchema.js +13 -11
- package/dist/gen/zod/textFieldSchema.js +24 -14
- package/dist/gen/zod/textFormatParamSchema.js +16 -10
- package/dist/gen/zod/textParamSchema.js +23 -12
- package/dist/gen/zod/textResponseFormatSchema.js +9 -9
- package/dist/gen/zod/toolChoiceParamSchema.js +21 -11
- package/dist/gen/zod/toolChoiceValueEnumSchema.js +8 -8
- package/dist/gen/zod/toolSchema.js +16 -11
- package/dist/gen/zod/topLogProbSchema.js +14 -12
- package/dist/gen/zod/truncationEnumSchema.js +8 -8
- package/dist/gen/zod/urlCitationBodySchema.js +29 -14
- package/dist/gen/zod/urlCitationParamSchema.js +28 -13
- package/dist/gen/zod/usageSchema.js +35 -16
- package/dist/gen/zod/userMessageItemParamSchema.js +64 -22
- package/dist/gen/zod/verbosityEnumSchema.js +8 -8
- package/dist/index.cjs +1574 -0
- package/dist/index.d.cts +2823 -0
- package/dist/index.d.mts +51000 -31111
- package/dist/index.d.ts +407 -29296
- package/dist/index.js +1136 -1405
- package/dist/index.mjs +2441 -1010
- package/dist/react/index.cjs +216 -0
- package/dist/react/index.d.cts +25 -0
- package/dist/react/index.d.ts +25 -0
- package/dist/react/index.js +191 -0
- package/dist/tekimax-C-DJ0z27.d.cts +283 -0
- package/dist/tekimax-C-DJ0z27.d.ts +283 -0
- package/package.json +47 -9
- package/.dockerignore +0 -5
- package/Dockerfile +0 -25
- package/kubb.config.js +0 -30
- package/kubb.config.ts +0 -35
- package/public/logos/tekimax-logo-ScreenRGB-2.png +0 -0
- package/spec/openapi.json +0 -3876
- package/src/client.ts +0 -129
- package/src/gen/.kubb/config.ts +0 -43
- package/src/gen/client/createresponse.ts +0 -27
- package/src/gen/client/index.ts +0 -1
- package/src/gen/index.ts +0 -187
- package/src/gen/schemas/allowedToolChoice.json +0 -1
- package/src/gen/schemas/allowedToolsParam.json +0 -1
- package/src/gen/schemas/annotation.json +0 -1
- package/src/gen/schemas/assistantMessageItemParam.json +0 -1
- package/src/gen/schemas/createResponseBody.json +0 -1
- package/src/gen/schemas/detailEnum.json +0 -1
- package/src/gen/schemas/developerMessageItemParam.json +0 -1
- package/src/gen/schemas/emptyModelParam.json +0 -1
- package/src/gen/schemas/error.json +0 -1
- package/src/gen/schemas/errorPayload.json +0 -1
- package/src/gen/schemas/errorStreamingEvent.json +0 -1
- package/src/gen/schemas/functionCall.json +0 -1
- package/src/gen/schemas/functionCallItemParam.json +0 -1
- package/src/gen/schemas/functionCallItemStatus.json +0 -1
- package/src/gen/schemas/functionCallOutput.json +0 -1
- package/src/gen/schemas/functionCallOutputItemParam.json +0 -1
- package/src/gen/schemas/functionCallOutputStatusEnum.json +0 -1
- package/src/gen/schemas/functionCallStatus.json +0 -1
- package/src/gen/schemas/functionTool.json +0 -1
- package/src/gen/schemas/functionToolChoice.json +0 -1
- package/src/gen/schemas/functionToolParam.json +0 -1
- package/src/gen/schemas/imageDetail.json +0 -1
- package/src/gen/schemas/includeEnum.json +0 -1
- package/src/gen/schemas/incompleteDetails.json +0 -1
- package/src/gen/schemas/inputFileContent.json +0 -1
- package/src/gen/schemas/inputFileContentParam.json +0 -1
- package/src/gen/schemas/inputImageContent.json +0 -1
- package/src/gen/schemas/inputImageContentParamAutoParam.json +0 -1
- package/src/gen/schemas/inputTextContent.json +0 -1
- package/src/gen/schemas/inputTextContentParam.json +0 -1
- package/src/gen/schemas/inputTokensDetails.json +0 -1
- package/src/gen/schemas/inputVideoContent.json +0 -1
- package/src/gen/schemas/itemField.json +0 -1
- package/src/gen/schemas/itemParam.json +0 -1
- package/src/gen/schemas/itemReferenceParam.json +0 -1
- package/src/gen/schemas/jsonObjectResponseFormat.json +0 -1
- package/src/gen/schemas/jsonSchemaResponseFormat.json +0 -1
- package/src/gen/schemas/jsonSchemaResponseFormatParam.json +0 -1
- package/src/gen/schemas/logProb.json +0 -1
- package/src/gen/schemas/message.json +0 -1
- package/src/gen/schemas/messageRole.json +0 -1
- package/src/gen/schemas/messageStatus.json +0 -1
- package/src/gen/schemas/metadataParam.json +0 -1
- package/src/gen/schemas/outputTextContent.json +0 -1
- package/src/gen/schemas/outputTextContentParam.json +0 -1
- package/src/gen/schemas/outputTokensDetails.json +0 -1
- package/src/gen/schemas/reasoning.json +0 -1
- package/src/gen/schemas/reasoningBody.json +0 -1
- package/src/gen/schemas/reasoningEffortEnum.json +0 -1
- package/src/gen/schemas/reasoningItemParam.json +0 -1
- package/src/gen/schemas/reasoningParam.json +0 -1
- package/src/gen/schemas/reasoningSummaryContentParam.json +0 -1
- package/src/gen/schemas/reasoningSummaryEnum.json +0 -1
- package/src/gen/schemas/reasoningTextContent.json +0 -1
- package/src/gen/schemas/refusalContent.json +0 -1
- package/src/gen/schemas/refusalContentParam.json +0 -1
- package/src/gen/schemas/responseCompletedStreamingEvent.json +0 -1
- package/src/gen/schemas/responseContentPartAddedStreamingEvent.json +0 -1
- package/src/gen/schemas/responseContentPartDoneStreamingEvent.json +0 -1
- package/src/gen/schemas/responseCreatedStreamingEvent.json +0 -1
- package/src/gen/schemas/responseFailedStreamingEvent.json +0 -1
- package/src/gen/schemas/responseFunctionCallArgumentsDeltaStreamingEvent.json +0 -1
- package/src/gen/schemas/responseFunctionCallArgumentsDoneStreamingEvent.json +0 -1
- package/src/gen/schemas/responseInProgressStreamingEvent.json +0 -1
- package/src/gen/schemas/responseIncompleteStreamingEvent.json +0 -1
- package/src/gen/schemas/responseOutputItemAddedStreamingEvent.json +0 -1
- package/src/gen/schemas/responseOutputItemDoneStreamingEvent.json +0 -1
- package/src/gen/schemas/responseOutputTextAnnotationAddedStreamingEvent.json +0 -1
- package/src/gen/schemas/responseOutputTextDeltaStreamingEvent.json +0 -1
- package/src/gen/schemas/responseOutputTextDoneStreamingEvent.json +0 -1
- package/src/gen/schemas/responseQueuedStreamingEvent.json +0 -1
- package/src/gen/schemas/responseReasoningDeltaStreamingEvent.json +0 -1
- package/src/gen/schemas/responseReasoningDoneStreamingEvent.json +0 -1
- package/src/gen/schemas/responseReasoningSummaryDeltaStreamingEvent.json +0 -1
- package/src/gen/schemas/responseReasoningSummaryDoneStreamingEvent.json +0 -1
- package/src/gen/schemas/responseReasoningSummaryPartAddedStreamingEvent.json +0 -1
- package/src/gen/schemas/responseReasoningSummaryPartDoneStreamingEvent.json +0 -1
- package/src/gen/schemas/responseRefusalDeltaStreamingEvent.json +0 -1
- package/src/gen/schemas/responseRefusalDoneStreamingEvent.json +0 -1
- package/src/gen/schemas/responseResource.json +0 -1
- package/src/gen/schemas/responsesToolParam.json +0 -1
- package/src/gen/schemas/serviceTierEnum.json +0 -1
- package/src/gen/schemas/specificFunctionParam.json +0 -1
- package/src/gen/schemas/specificToolChoiceParam.json +0 -1
- package/src/gen/schemas/streamOptionsParam.json +0 -1
- package/src/gen/schemas/summaryTextContent.json +0 -1
- package/src/gen/schemas/systemMessageItemParam.json +0 -1
- package/src/gen/schemas/textContent.json +0 -1
- package/src/gen/schemas/textField.json +0 -1
- package/src/gen/schemas/textFormatParam.json +0 -1
- package/src/gen/schemas/textParam.json +0 -1
- package/src/gen/schemas/textResponseFormat.json +0 -1
- package/src/gen/schemas/tool.json +0 -1
- package/src/gen/schemas/toolChoiceParam.json +0 -1
- package/src/gen/schemas/toolChoiceValueEnum.json +0 -1
- package/src/gen/schemas/topLogProb.json +0 -1
- package/src/gen/schemas/truncationEnum.json +0 -1
- package/src/gen/schemas/urlCitationBody.json +0 -1
- package/src/gen/schemas/urlCitationParam.json +0 -1
- package/src/gen/schemas/usage.json +0 -1
- package/src/gen/schemas/userMessageItemParam.json +0 -1
- package/src/gen/schemas/verbosityEnum.json +0 -1
- package/src/gen/types.ts +0 -2613
- package/src/gen/zod/allowedToolChoiceSchema.ts +0 -14
- package/src/gen/zod/allowedToolsParamSchema.ts +0 -14
- package/src/gen/zod/annotationSchema.ts +0 -14
- package/src/gen/zod/assistantMessageItemParamSchema.ts +0 -20
- package/src/gen/zod/createResponseBodySchema.ts +0 -45
- package/src/gen/zod/createresponseSchema.ts +0 -17
- package/src/gen/zod/detailEnumSchema.ts +0 -8
- package/src/gen/zod/developerMessageItemParamSchema.ts +0 -17
- package/src/gen/zod/emptyModelParamSchema.ts +0 -10
- package/src/gen/zod/errorPayloadSchema.ts +0 -19
- package/src/gen/zod/errorSchema.ts +0 -14
- package/src/gen/zod/errorStreamingEventSchema.ts +0 -16
- package/src/gen/zod/functionCallItemParamSchema.ts +0 -16
- package/src/gen/zod/functionCallItemStatusSchema.ts +0 -8
- package/src/gen/zod/functionCallOutputItemParamSchema.ts +0 -30
- package/src/gen/zod/functionCallOutputSchema.ts +0 -27
- package/src/gen/zod/functionCallOutputStatusEnumSchema.ts +0 -11
- package/src/gen/zod/functionCallSchema.ts +0 -19
- package/src/gen/zod/functionCallStatusSchema.ts +0 -8
- package/src/gen/zod/functionToolChoiceSchema.ts +0 -11
- package/src/gen/zod/functionToolParamSchema.ts +0 -15
- package/src/gen/zod/functionToolSchema.ts +0 -19
- package/src/gen/zod/imageDetailSchema.ts +0 -8
- package/src/gen/zod/includeEnumSchema.ts +0 -8
- package/src/gen/zod/incompleteDetailsSchema.ts +0 -13
- package/src/gen/zod/index.ts +0 -103
- package/src/gen/zod/inputFileContentParamSchema.ts +0 -16
- package/src/gen/zod/inputFileContentSchema.ts +0 -15
- package/src/gen/zod/inputImageContentParamAutoParamSchema.ts +0 -16
- package/src/gen/zod/inputImageContentSchema.ts +0 -16
- package/src/gen/zod/inputTextContentParamSchema.ts +0 -14
- package/src/gen/zod/inputTextContentSchema.ts +0 -14
- package/src/gen/zod/inputTokensDetailsSchema.ts +0 -13
- package/src/gen/zod/inputVideoContentSchema.ts +0 -14
- package/src/gen/zod/itemFieldSchema.ts +0 -23
- package/src/gen/zod/itemParamSchema.ts +0 -23
- package/src/gen/zod/itemReferenceParamSchema.ts +0 -14
- package/src/gen/zod/jsonObjectResponseFormatSchema.ts +0 -10
- package/src/gen/zod/jsonSchemaResponseFormatParamSchema.ts +0 -16
- package/src/gen/zod/jsonSchemaResponseFormatSchema.ts +0 -14
- package/src/gen/zod/logProbSchema.ts +0 -17
- package/src/gen/zod/messageRoleSchema.ts +0 -8
- package/src/gen/zod/messageSchema.ts +0 -46
- package/src/gen/zod/messageStatusSchema.ts +0 -8
- package/src/gen/zod/metadataParamSchema.ts +0 -13
- package/src/gen/zod/outputTextContentParamSchema.ts +0 -13
- package/src/gen/zod/outputTextContentSchema.ts +0 -18
- package/src/gen/zod/outputTokensDetailsSchema.ts +0 -13
- package/src/gen/zod/reasoningBodySchema.ts +0 -57
- package/src/gen/zod/reasoningEffortEnumSchema.ts +0 -8
- package/src/gen/zod/reasoningItemParamSchema.ts +0 -15
- package/src/gen/zod/reasoningParamSchema.ts +0 -16
- package/src/gen/zod/reasoningSchema.ts +0 -16
- package/src/gen/zod/reasoningSummaryContentParamSchema.ts +0 -11
- package/src/gen/zod/reasoningSummaryEnumSchema.ts +0 -8
- package/src/gen/zod/reasoningTextContentSchema.ts +0 -14
- package/src/gen/zod/refusalContentParamSchema.ts +0 -11
- package/src/gen/zod/refusalContentSchema.ts +0 -14
- package/src/gen/zod/responseCompletedStreamingEventSchema.ts +0 -16
- package/src/gen/zod/responseContentPartAddedStreamingEventSchema.ts +0 -42
- package/src/gen/zod/responseContentPartDoneStreamingEventSchema.ts +0 -42
- package/src/gen/zod/responseCreatedStreamingEventSchema.ts +0 -16
- package/src/gen/zod/responseFailedStreamingEventSchema.ts +0 -16
- package/src/gen/zod/responseFunctionCallArgumentsDeltaStreamingEventSchema.ts +0 -18
- package/src/gen/zod/responseFunctionCallArgumentsDoneStreamingEventSchema.ts +0 -17
- package/src/gen/zod/responseInProgressStreamingEventSchema.ts +0 -16
- package/src/gen/zod/responseIncompleteStreamingEventSchema.ts +0 -16
- package/src/gen/zod/responseOutputItemAddedStreamingEventSchema.ts +0 -17
- package/src/gen/zod/responseOutputItemDoneStreamingEventSchema.ts +0 -17
- package/src/gen/zod/responseOutputTextAnnotationAddedStreamingEventSchema.ts +0 -20
- package/src/gen/zod/responseOutputTextDeltaStreamingEventSchema.ts +0 -21
- package/src/gen/zod/responseOutputTextDoneStreamingEventSchema.ts +0 -20
- package/src/gen/zod/responseQueuedStreamingEventSchema.ts +0 -16
- package/src/gen/zod/responseReasoningDeltaStreamingEventSchema.ts +0 -19
- package/src/gen/zod/responseReasoningDoneStreamingEventSchema.ts +0 -18
- package/src/gen/zod/responseReasoningSummaryDeltaStreamingEventSchema.ts +0 -19
- package/src/gen/zod/responseReasoningSummaryDoneStreamingEventSchema.ts +0 -18
- package/src/gen/zod/responseReasoningSummaryPartAddedStreamingEventSchema.ts +0 -42
- package/src/gen/zod/responseReasoningSummaryPartDoneStreamingEventSchema.ts +0 -42
- package/src/gen/zod/responseRefusalDeltaStreamingEventSchema.ts +0 -18
- package/src/gen/zod/responseRefusalDoneStreamingEventSchema.ts +0 -18
- package/src/gen/zod/responseResourceSchema.ts +0 -54
- package/src/gen/zod/responsesToolParamSchema.ts +0 -11
- package/src/gen/zod/serviceTierEnumSchema.ts +0 -8
- package/src/gen/zod/specificFunctionParamSchema.ts +0 -11
- package/src/gen/zod/specificToolChoiceParamSchema.ts +0 -9
- package/src/gen/zod/streamOptionsParamSchema.ts +0 -13
- package/src/gen/zod/summaryTextContentSchema.ts +0 -14
- package/src/gen/zod/systemMessageItemParamSchema.ts +0 -17
- package/src/gen/zod/textContentSchema.ts +0 -14
- package/src/gen/zod/textFieldSchema.ts +0 -15
- package/src/gen/zod/textFormatParamSchema.ts +0 -10
- package/src/gen/zod/textParamSchema.ts +0 -13
- package/src/gen/zod/textResponseFormatSchema.ts +0 -10
- package/src/gen/zod/toolChoiceParamSchema.ts +0 -14
- package/src/gen/zod/toolChoiceValueEnumSchema.ts +0 -8
- package/src/gen/zod/toolSchema.ts +0 -14
- package/src/gen/zod/topLogProbSchema.ts +0 -15
- package/src/gen/zod/truncationEnumSchema.ts +0 -8
- package/src/gen/zod/urlCitationBodySchema.ts +0 -17
- package/src/gen/zod/urlCitationParamSchema.ts +0 -14
- package/src/gen/zod/usageSchema.ts +0 -19
- package/src/gen/zod/userMessageItemParamSchema.ts +0 -23
- package/src/gen/zod/verbosityEnumSchema.ts +0 -8
- package/src/index.ts +0 -3
- package/tsconfig.json +0 -21
package/dist/index.js
CHANGED
|
@@ -1,218 +1,1010 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-MLKGABMK.js";
|
|
4
|
+
|
|
5
|
+
// src/providers/tekimax/client.ts
|
|
6
|
+
import { createParser } from "eventsource-parser";
|
|
7
|
+
var TekimaxResponse = class {
|
|
8
|
+
constructor(_raw) {
|
|
9
|
+
this._raw = _raw;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Access the raw response object returned by the API.
|
|
13
|
+
*/
|
|
14
|
+
get raw() {
|
|
15
|
+
return this._raw;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Automatically extracts the text content from the response.
|
|
19
|
+
* It looks for the first "output_text" item in the response content.
|
|
20
|
+
*/
|
|
21
|
+
get text() {
|
|
22
|
+
for (const item of this._raw.output) {
|
|
23
|
+
if (item.type === "message") {
|
|
24
|
+
for (const contentPart of item.content) {
|
|
25
|
+
if (contentPart.type === "output_text" || contentPart.type === "text") {
|
|
26
|
+
return contentPart.text;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return void 0;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The ID of the response.
|
|
35
|
+
*/
|
|
36
|
+
get id() {
|
|
37
|
+
return this._raw.id;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The model used to generate the response.
|
|
41
|
+
*/
|
|
42
|
+
get model() {
|
|
43
|
+
return this._raw.model;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var TekimaxClient = class {
|
|
47
|
+
/**
|
|
48
|
+
* Creates a new TekimaxClient.
|
|
49
|
+
*
|
|
50
|
+
* @param options - Configuration options for the client.
|
|
51
|
+
* @param options.baseUrl - The base URL of the API (default: "https://api.tekimax.com").
|
|
52
|
+
* @param options.apiKey - Your Tekimax API key.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* const client = new TekimaxClient({ apiKey: "tm_..." });
|
|
56
|
+
*/
|
|
57
|
+
constructor(options = {}) {
|
|
58
|
+
this.baseUrl = options.baseUrl || "https://api.tekimax.com";
|
|
59
|
+
this.headers = {
|
|
60
|
+
"Content-Type": "application/json",
|
|
61
|
+
...options.apiKey ? { Authorization: `Bearer ${options.apiKey}` } : {}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
async request(path, body, options) {
|
|
65
|
+
const response = await fetch(`${this.baseUrl}${path}`, {
|
|
66
|
+
method: "POST",
|
|
67
|
+
headers: this.headers,
|
|
68
|
+
body: JSON.stringify(body),
|
|
69
|
+
signal: options?.signal
|
|
70
|
+
});
|
|
71
|
+
if (!response.ok) {
|
|
72
|
+
throw new Error(
|
|
73
|
+
`Tekimax API Error: ${response.status} ${response.statusText}`
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
const data = await response.json();
|
|
77
|
+
return new TekimaxResponse(data);
|
|
78
|
+
}
|
|
79
|
+
async *requestStream(path, body, options) {
|
|
80
|
+
const response = await fetch(`${this.baseUrl}${path}`, {
|
|
81
|
+
method: "POST",
|
|
82
|
+
headers: this.headers,
|
|
83
|
+
body: JSON.stringify(body),
|
|
84
|
+
signal: options?.signal
|
|
85
|
+
});
|
|
86
|
+
if (!response.ok) {
|
|
87
|
+
throw new Error(
|
|
88
|
+
`Tekimax API Error: ${response.status} ${response.statusText}`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
if (!response.body) {
|
|
92
|
+
throw new Error("No response body received for streaming request");
|
|
93
|
+
}
|
|
94
|
+
const reader = response.body.getReader();
|
|
95
|
+
const decoder = new TextDecoder();
|
|
96
|
+
const buffer = [];
|
|
97
|
+
const parser = createParser({
|
|
98
|
+
onEvent(event) {
|
|
99
|
+
if (event.type === "event") {
|
|
100
|
+
try {
|
|
101
|
+
if (event.data === "[DONE]") return;
|
|
102
|
+
buffer.push(JSON.parse(event.data));
|
|
103
|
+
} catch (e) {
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
try {
|
|
109
|
+
while (true) {
|
|
110
|
+
const { done, value } = await reader.read();
|
|
111
|
+
if (done) break;
|
|
112
|
+
parser.feed(decoder.decode(value, { stream: true }));
|
|
113
|
+
while (buffer.length > 0) {
|
|
114
|
+
yield buffer.shift();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
} finally {
|
|
118
|
+
reader.releaseLock();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Creates a new session and sends the initial message.
|
|
123
|
+
*
|
|
124
|
+
* @param message - The initial message text or array of message items to start the session.
|
|
125
|
+
* @param options - Additional configuration options (model, temperature, etc.).
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* const response = await client.createSession("Hello, world!", { model: "gpt-4" });
|
|
129
|
+
* console.log(response.text);
|
|
130
|
+
*/
|
|
131
|
+
async createSession(message, options) {
|
|
132
|
+
const body = {
|
|
133
|
+
...options,
|
|
134
|
+
input: message
|
|
135
|
+
};
|
|
136
|
+
const { signal } = options || {};
|
|
137
|
+
const cleanBody = { ...body };
|
|
138
|
+
delete cleanBody.signal;
|
|
139
|
+
return this.request("/responses", cleanBody, { signal });
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Sends a message to an existing session or starts a new one if no previous_response_id is provided.
|
|
143
|
+
*
|
|
144
|
+
* @param message - The message text or history array to send.
|
|
145
|
+
* @param options - Additional configuration options.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* const response = await client.sendMessage("What is the weather?", {
|
|
149
|
+
* previous_response_id: "resp_123"
|
|
150
|
+
* });
|
|
151
|
+
* console.log(response.text);
|
|
152
|
+
*/
|
|
153
|
+
async sendMessage(message, options) {
|
|
154
|
+
const body = {
|
|
155
|
+
...options,
|
|
156
|
+
input: message,
|
|
157
|
+
stream: false
|
|
158
|
+
};
|
|
159
|
+
const { signal } = options || {};
|
|
160
|
+
const cleanBody = { ...body };
|
|
161
|
+
delete cleanBody.signal;
|
|
162
|
+
return this.request("/responses", cleanBody, { signal });
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Sends a message and returns an asynchronous iterable of streaming events.
|
|
166
|
+
*/
|
|
167
|
+
async *sendMessageStream(message, options) {
|
|
168
|
+
const body = {
|
|
169
|
+
...options,
|
|
170
|
+
input: message,
|
|
171
|
+
stream: true
|
|
172
|
+
};
|
|
173
|
+
const { signal } = options || {};
|
|
174
|
+
const cleanBody = { ...body };
|
|
175
|
+
delete cleanBody.signal;
|
|
176
|
+
yield* this.requestStream("/responses", cleanBody, { signal });
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// src/providers/tekimax/index.ts
|
|
181
|
+
var TekimaxProvider = class {
|
|
182
|
+
constructor(options = {}) {
|
|
183
|
+
this.name = "tekimax";
|
|
184
|
+
this.client = new TekimaxClient(options);
|
|
185
|
+
}
|
|
186
|
+
async chat(options) {
|
|
187
|
+
const tools = options.tools?.map((t) => ({
|
|
188
|
+
type: "function",
|
|
189
|
+
name: t.function.name,
|
|
190
|
+
description: t.function.description ?? void 0,
|
|
191
|
+
parameters: t.function.parameters ?? void 0
|
|
192
|
+
}));
|
|
193
|
+
const input = this.mapMessages(options.messages);
|
|
194
|
+
const response = await this.client.sendMessage(input, {
|
|
195
|
+
model: options.model,
|
|
196
|
+
temperature: options.temperature,
|
|
197
|
+
max_output_tokens: options.maxTokens,
|
|
198
|
+
tools,
|
|
199
|
+
signal: options.signal
|
|
200
|
+
});
|
|
201
|
+
if (response.raw.output) {
|
|
202
|
+
const toolCalls = [];
|
|
203
|
+
for (const item of response.raw.output) {
|
|
204
|
+
if (item.type === "function_call") {
|
|
205
|
+
toolCalls.push({
|
|
206
|
+
id: item.call_id,
|
|
207
|
+
type: "function",
|
|
208
|
+
function: {
|
|
209
|
+
name: item.name,
|
|
210
|
+
arguments: item.arguments
|
|
211
|
+
// Already a string in generated types
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if (toolCalls.length > 0) {
|
|
217
|
+
return {
|
|
218
|
+
message: {
|
|
219
|
+
role: "assistant",
|
|
220
|
+
content: response.text || null,
|
|
221
|
+
toolCalls
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (!response.text) {
|
|
227
|
+
if (options.tools && options.tools.length > 0) {
|
|
228
|
+
return { message: { role: "assistant", content: null } };
|
|
229
|
+
}
|
|
230
|
+
throw new Error("No text content in response");
|
|
231
|
+
}
|
|
232
|
+
return {
|
|
233
|
+
message: {
|
|
234
|
+
role: "assistant",
|
|
235
|
+
content: response.text
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
async *chatStream(options) {
|
|
240
|
+
const tools = options.tools?.map((t) => ({
|
|
241
|
+
type: "function",
|
|
242
|
+
name: t.function.name,
|
|
243
|
+
description: t.function.description ?? void 0,
|
|
244
|
+
parameters: t.function.parameters ?? void 0
|
|
245
|
+
}));
|
|
246
|
+
const input = this.mapMessages(options.messages);
|
|
247
|
+
const stream = this.client.sendMessageStream(input, {
|
|
248
|
+
model: options.model,
|
|
249
|
+
temperature: options.temperature,
|
|
250
|
+
max_output_tokens: options.maxTokens,
|
|
251
|
+
tools,
|
|
252
|
+
signal: options.signal
|
|
253
|
+
});
|
|
254
|
+
for await (const event of stream) {
|
|
255
|
+
if (event.type === "response.output_text.delta" && event.delta) {
|
|
256
|
+
yield {
|
|
257
|
+
delta: event.delta
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
// Returning any[] because generated ItemParam union is missing UserMessageItemParam
|
|
263
|
+
mapMessages(messages) {
|
|
264
|
+
const items = [];
|
|
265
|
+
for (const msg of messages) {
|
|
266
|
+
if (msg.role === "user") {
|
|
267
|
+
items.push({
|
|
268
|
+
type: "message",
|
|
269
|
+
role: "user",
|
|
270
|
+
content: msg.content || ""
|
|
271
|
+
});
|
|
272
|
+
} else if (msg.role === "assistant") {
|
|
273
|
+
if (msg.content) {
|
|
274
|
+
items.push({
|
|
275
|
+
type: "message",
|
|
276
|
+
role: "assistant",
|
|
277
|
+
content: [{ type: "output_text", text: msg.content }]
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return items;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
// src/providers/anthropic/index.ts
|
|
287
|
+
import Anthropic from "@anthropic-ai/sdk";
|
|
288
|
+
var AnthropicProvider = class {
|
|
289
|
+
constructor(options) {
|
|
290
|
+
this.name = "anthropic";
|
|
291
|
+
this.client = new Anthropic({ apiKey: options.apiKey });
|
|
292
|
+
}
|
|
293
|
+
async chat(options) {
|
|
294
|
+
const response = await this.client.messages.create({
|
|
295
|
+
model: options.model || "claude-3-5-sonnet-20240620",
|
|
296
|
+
max_tokens: options.maxTokens || 1024,
|
|
297
|
+
messages: this.mapMessages(options.messages),
|
|
298
|
+
tools: options.tools?.map(this.mapTool)
|
|
299
|
+
});
|
|
300
|
+
const textBlocks = response.content.filter((c) => c.type === "text");
|
|
301
|
+
const toolUseBlocks = response.content.filter((c) => c.type === "tool_use");
|
|
302
|
+
const text = textBlocks.map((b) => b.text).join("");
|
|
303
|
+
let toolCalls = void 0;
|
|
304
|
+
if (toolUseBlocks.length > 0) {
|
|
305
|
+
toolCalls = toolUseBlocks.map((b) => ({
|
|
306
|
+
id: b.id,
|
|
307
|
+
type: "function",
|
|
308
|
+
function: {
|
|
309
|
+
name: b.name,
|
|
310
|
+
arguments: JSON.stringify(b.input)
|
|
311
|
+
}
|
|
312
|
+
}));
|
|
313
|
+
}
|
|
314
|
+
return {
|
|
315
|
+
usage: {
|
|
316
|
+
promptTokens: response.usage.input_tokens,
|
|
317
|
+
completionTokens: response.usage.output_tokens,
|
|
318
|
+
totalTokens: response.usage.input_tokens + response.usage.output_tokens
|
|
319
|
+
},
|
|
320
|
+
message: {
|
|
321
|
+
role: "assistant",
|
|
322
|
+
content: text,
|
|
323
|
+
toolCalls
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
async *chatStream(options) {
|
|
328
|
+
const stream = await this.client.messages.create({
|
|
329
|
+
model: options.model || "claude-3-5-sonnet-20240620",
|
|
330
|
+
max_tokens: options.maxTokens || 1024,
|
|
331
|
+
messages: this.mapMessages(options.messages),
|
|
332
|
+
stream: true
|
|
333
|
+
});
|
|
334
|
+
for await (const chunk of stream) {
|
|
335
|
+
if (chunk.type === "content_block_delta" && chunk.delta.type === "text_delta") {
|
|
336
|
+
yield {
|
|
337
|
+
delta: chunk.delta.text
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
mapMessages(messages) {
|
|
343
|
+
return messages.filter((m) => m.role === "user" || m.role === "assistant").map((m) => {
|
|
344
|
+
let content = "";
|
|
345
|
+
if (typeof m.content === "string") {
|
|
346
|
+
content = m.content || "";
|
|
347
|
+
} else if (Array.isArray(m.content)) {
|
|
348
|
+
content = m.content.map((part) => {
|
|
349
|
+
if (part.type === "text") {
|
|
350
|
+
return { type: "text", text: part.text };
|
|
351
|
+
}
|
|
352
|
+
if (part.type === "image_url") {
|
|
353
|
+
const match = part.image_url.url.match(/^data:([^;]+);base64,(.+)$/);
|
|
354
|
+
if (match) {
|
|
355
|
+
const mimeType = match[1];
|
|
356
|
+
return {
|
|
357
|
+
type: "image",
|
|
358
|
+
source: {
|
|
359
|
+
type: "base64",
|
|
360
|
+
media_type: mimeType,
|
|
361
|
+
data: match[2] || ""
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return { type: "text", text: "" };
|
|
367
|
+
}).filter((part) => part.text !== "");
|
|
368
|
+
}
|
|
369
|
+
return {
|
|
370
|
+
role: m.role,
|
|
371
|
+
content
|
|
372
|
+
};
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
mapTool(tool2) {
|
|
376
|
+
return {
|
|
377
|
+
name: tool2.function.name,
|
|
378
|
+
description: tool2.function.description,
|
|
379
|
+
input_schema: tool2.function.parameters
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
// src/providers/gemini/index.ts
|
|
385
|
+
import { GoogleGenerativeAI } from "@google/generative-ai";
|
|
386
|
+
var GeminiProvider = class {
|
|
387
|
+
constructor(options) {
|
|
388
|
+
this.name = "gemini";
|
|
389
|
+
this.client = new GoogleGenerativeAI(options.apiKey);
|
|
390
|
+
}
|
|
391
|
+
convertContent(content) {
|
|
392
|
+
if (!content) return "";
|
|
393
|
+
if (typeof content === "string") return content;
|
|
394
|
+
return content.map((part) => {
|
|
395
|
+
if (part.type === "text") {
|
|
396
|
+
return { text: part.text };
|
|
397
|
+
}
|
|
398
|
+
if (part.type === "image_url") {
|
|
399
|
+
const match = part.image_url.url.match(/^data:([^;]+);base64,(.+)$/);
|
|
400
|
+
if (match) {
|
|
401
|
+
return {
|
|
402
|
+
inlineData: {
|
|
403
|
+
mimeType: match[1],
|
|
404
|
+
data: match[2] || ""
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
return { text: "[Image Url not supported directly, please use base64 data uri]" };
|
|
409
|
+
}
|
|
410
|
+
return { text: "" };
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
async chat(options) {
|
|
414
|
+
const model = this.client.getGenerativeModel({
|
|
415
|
+
model: options.model || "gemini-pro",
|
|
416
|
+
tools: options.tools ? [{ functionDeclarations: options.tools.map(this.mapTool) }] : void 0
|
|
417
|
+
});
|
|
418
|
+
const chat = model.startChat({
|
|
419
|
+
history: this.mapHistory(options.messages),
|
|
420
|
+
generationConfig: {
|
|
421
|
+
maxOutputTokens: options.maxTokens,
|
|
422
|
+
temperature: options.temperature
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
const lastMsg = options.messages[options.messages.length - 1];
|
|
426
|
+
if (!lastMsg) {
|
|
427
|
+
return { message: { role: "assistant", content: "" } };
|
|
428
|
+
}
|
|
429
|
+
const content = this.convertContent(lastMsg.content);
|
|
430
|
+
const result = await chat.sendMessage(content);
|
|
431
|
+
const response = result.response;
|
|
432
|
+
const text = response.text();
|
|
433
|
+
const functionCalls = response.functionCalls();
|
|
434
|
+
let toolCalls = void 0;
|
|
435
|
+
if (functionCalls && functionCalls.length > 0) {
|
|
436
|
+
toolCalls = functionCalls.map((fc) => ({
|
|
437
|
+
id: fc.name,
|
|
438
|
+
// Gemini doesn't always provide unique call IDs, usage depends on flow.
|
|
439
|
+
type: "function",
|
|
440
|
+
function: {
|
|
441
|
+
name: fc.name,
|
|
442
|
+
arguments: JSON.stringify(fc.args)
|
|
443
|
+
}
|
|
444
|
+
}));
|
|
445
|
+
}
|
|
446
|
+
return {
|
|
447
|
+
message: {
|
|
448
|
+
role: "assistant",
|
|
449
|
+
content: text,
|
|
450
|
+
toolCalls
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
async *chatStream(options) {
|
|
455
|
+
const model = this.client.getGenerativeModel({
|
|
456
|
+
model: options.model || "gemini-pro",
|
|
457
|
+
tools: options.tools ? [{ functionDeclarations: options.tools.map(this.mapTool) }] : void 0
|
|
458
|
+
});
|
|
459
|
+
const chat = model.startChat({
|
|
460
|
+
history: this.mapHistory(options.messages),
|
|
461
|
+
generationConfig: {
|
|
462
|
+
maxOutputTokens: options.maxTokens,
|
|
463
|
+
temperature: options.temperature
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
const lastMsg = options.messages[options.messages.length - 1];
|
|
467
|
+
if (!lastMsg) {
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
const content = this.convertContent(lastMsg.content);
|
|
471
|
+
const result = await chat.sendMessageStream(content);
|
|
472
|
+
for await (const chunk of result.stream) {
|
|
473
|
+
const chunkText = chunk.text();
|
|
474
|
+
const functionCalls = chunk.functionCalls();
|
|
475
|
+
if (functionCalls && functionCalls.length > 0) {
|
|
476
|
+
for (const fc of functionCalls) {
|
|
477
|
+
yield {
|
|
478
|
+
delta: "",
|
|
479
|
+
toolCallDelta: {
|
|
480
|
+
index: 0,
|
|
481
|
+
// simplistic index
|
|
482
|
+
type: "function",
|
|
483
|
+
function: {
|
|
484
|
+
name: fc.name,
|
|
485
|
+
arguments: JSON.stringify(fc.args)
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
if (chunkText) {
|
|
492
|
+
yield {
|
|
493
|
+
delta: chunkText
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
mapHistory(messages) {
|
|
499
|
+
return messages.slice(0, -1).map((m) => {
|
|
500
|
+
const parts = [];
|
|
501
|
+
if (m.role === "assistant" && m.toolCalls) {
|
|
502
|
+
m.toolCalls.forEach((tc) => {
|
|
503
|
+
parts.push({
|
|
504
|
+
functionCall: {
|
|
505
|
+
name: tc.function.name,
|
|
506
|
+
args: JSON.parse(tc.function.arguments)
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
if (m.role === "tool") {
|
|
512
|
+
parts.push({
|
|
513
|
+
functionResponse: {
|
|
514
|
+
name: m.name || "unknown",
|
|
515
|
+
response: { content: m.content }
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
} else {
|
|
519
|
+
const contentParts = this.convertContent(m.content);
|
|
520
|
+
if (Array.isArray(contentParts)) {
|
|
521
|
+
parts.push(...contentParts);
|
|
522
|
+
} else if (contentParts) {
|
|
523
|
+
parts.push({ text: contentParts });
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return {
|
|
527
|
+
role: m.role === "user" ? "user" : "model",
|
|
528
|
+
parts
|
|
529
|
+
};
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
mapTool(tool2) {
|
|
533
|
+
return {
|
|
534
|
+
name: tool2.function.name,
|
|
535
|
+
description: tool2.function.description,
|
|
536
|
+
parameters: tool2.function.parameters
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
// src/providers/ollama/index.ts
|
|
542
|
+
import { Ollama } from "ollama/browser";
|
|
543
|
+
var OllamaProvider = class {
|
|
544
|
+
constructor(options) {
|
|
545
|
+
this.name = "ollama";
|
|
546
|
+
this.client = new Ollama({
|
|
547
|
+
host: options?.host || "http://127.0.0.1:11434",
|
|
548
|
+
fetch: options?.apiKey ? (url, init) => {
|
|
549
|
+
const headers = new Headers(init?.headers);
|
|
550
|
+
headers.set("Authorization", `Bearer ${options.apiKey}`);
|
|
551
|
+
return fetch(url, {
|
|
552
|
+
...init,
|
|
553
|
+
headers
|
|
554
|
+
});
|
|
555
|
+
} : void 0
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
async chat(options) {
|
|
559
|
+
const response = await this.client.chat({
|
|
560
|
+
model: options.model || "llama2",
|
|
561
|
+
messages: this.mapMessages(options.messages),
|
|
562
|
+
tools: options.tools?.map(this.mapTool),
|
|
563
|
+
stream: false,
|
|
564
|
+
// @ts-ignore - Ollama types might not be updated yet
|
|
565
|
+
think: options.think
|
|
566
|
+
});
|
|
567
|
+
let toolCalls = void 0;
|
|
568
|
+
if (response.message.tool_calls) {
|
|
569
|
+
toolCalls = response.message.tool_calls.map((tc) => ({
|
|
570
|
+
id: `call_${Math.random().toString(36).slice(2)}`,
|
|
571
|
+
type: "function",
|
|
572
|
+
function: {
|
|
573
|
+
name: tc.function.name,
|
|
574
|
+
arguments: JSON.stringify(tc.function.arguments)
|
|
575
|
+
}
|
|
576
|
+
}));
|
|
577
|
+
}
|
|
578
|
+
return {
|
|
579
|
+
message: {
|
|
580
|
+
role: "assistant",
|
|
581
|
+
content: response.message.content,
|
|
582
|
+
// @ts-ignore
|
|
583
|
+
thinking: response.message.thinking,
|
|
584
|
+
// Native thinking field
|
|
585
|
+
toolCalls
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
async *chatStream(options) {
|
|
590
|
+
const stream = await this.client.chat({
|
|
591
|
+
model: options.model || "llama2",
|
|
592
|
+
messages: this.mapMessages(options.messages),
|
|
593
|
+
tools: options.tools?.map(this.mapTool),
|
|
594
|
+
stream: true,
|
|
595
|
+
// @ts-ignore
|
|
596
|
+
think: options.think
|
|
597
|
+
});
|
|
598
|
+
for await (const part of stream) {
|
|
599
|
+
const chunk = {
|
|
600
|
+
delta: part.message.content
|
|
601
|
+
};
|
|
602
|
+
if (part.message.thinking) {
|
|
603
|
+
chunk.thinking = part.message.thinking;
|
|
604
|
+
}
|
|
605
|
+
if (part.message.tool_calls) {
|
|
606
|
+
for (let i = 0; i < part.message.tool_calls.length; i++) {
|
|
607
|
+
const tc = part.message.tool_calls[i];
|
|
608
|
+
chunk.toolCallDelta = {
|
|
609
|
+
index: i,
|
|
610
|
+
type: "function",
|
|
611
|
+
function: {
|
|
612
|
+
name: tc.function.name,
|
|
613
|
+
arguments: JSON.stringify(tc.function.arguments)
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
yield {
|
|
617
|
+
delta: "",
|
|
618
|
+
toolCallDelta: {
|
|
619
|
+
index: i,
|
|
620
|
+
type: "function",
|
|
621
|
+
function: {
|
|
622
|
+
name: tc.function.name,
|
|
623
|
+
arguments: JSON.stringify(tc.function.arguments)
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
if (!part.message.content && !part.message.thinking) continue;
|
|
629
|
+
}
|
|
630
|
+
yield chunk;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
mapMessages(messages) {
|
|
634
|
+
return messages.map((m) => {
|
|
635
|
+
let content = "";
|
|
636
|
+
const images = [];
|
|
637
|
+
if (typeof m.content === "string") {
|
|
638
|
+
content = m.content || "";
|
|
639
|
+
} else if (Array.isArray(m.content)) {
|
|
640
|
+
for (const part of m.content) {
|
|
641
|
+
if (part.type === "text") {
|
|
642
|
+
content += part.text;
|
|
643
|
+
} else if (part.type === "image_url") {
|
|
644
|
+
const match = part.image_url.url.match(/^data:image\/[a-z]+;base64,(.+)$/);
|
|
645
|
+
if (match) {
|
|
646
|
+
images.push(match[1]);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
if (m.role === "tool") {
|
|
652
|
+
return {
|
|
653
|
+
role: "tool",
|
|
654
|
+
content,
|
|
655
|
+
// Ollama needs tool_name or name? Docs say tool_name in one example
|
|
656
|
+
// but python sdk usage shows name matching.
|
|
657
|
+
// REST API docs say `tool_name` for role `tool`.
|
|
658
|
+
name: m.name
|
|
659
|
+
// tool_name: m.name // redundancy
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
return {
|
|
663
|
+
role: m.role,
|
|
664
|
+
content,
|
|
665
|
+
images: images.length > 0 ? images : void 0,
|
|
666
|
+
tool_calls: m.toolCalls ? m.toolCalls.map((tc) => ({
|
|
667
|
+
type: "function",
|
|
668
|
+
function: {
|
|
669
|
+
name: tc.function.name,
|
|
670
|
+
arguments: JSON.parse(tc.function.arguments)
|
|
671
|
+
}
|
|
672
|
+
})) : void 0
|
|
673
|
+
};
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
mapTool(tool2) {
|
|
677
|
+
return {
|
|
678
|
+
type: "function",
|
|
679
|
+
function: {
|
|
680
|
+
name: tool2.function.name,
|
|
681
|
+
description: tool2.function.description,
|
|
682
|
+
parameters: tool2.function.parameters
|
|
683
|
+
}
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
|
|
688
|
+
// src/providers/openai/index.ts
|
|
689
|
+
import OpenAI from "openai";
|
|
690
|
+
var OpenAIProvider = class {
|
|
691
|
+
constructor(options) {
|
|
692
|
+
this.name = "openai";
|
|
693
|
+
this.client = new OpenAI({
|
|
694
|
+
apiKey: options.apiKey,
|
|
695
|
+
dangerouslyAllowBrowser: options.dangerouslyAllowBrowser
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
async chat(options) {
|
|
699
|
+
const response = await this.client.chat.completions.create({
|
|
700
|
+
model: options.model,
|
|
701
|
+
messages: this.mapMessages(options.messages),
|
|
702
|
+
tools: options.tools?.map(this.mapTool),
|
|
703
|
+
temperature: options.temperature,
|
|
704
|
+
max_tokens: options.maxTokens
|
|
705
|
+
});
|
|
706
|
+
const choice = response.choices[0];
|
|
707
|
+
if (!choice) throw new Error("No choice returned from OpenAI");
|
|
708
|
+
return {
|
|
709
|
+
usage: response.usage ? {
|
|
710
|
+
promptTokens: response.usage.prompt_tokens,
|
|
711
|
+
completionTokens: response.usage.completion_tokens,
|
|
712
|
+
totalTokens: response.usage.total_tokens
|
|
713
|
+
} : void 0,
|
|
714
|
+
message: this.mapResponseMessage(choice.message)
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
async *chatStream(options) {
|
|
718
|
+
const stream = await this.client.chat.completions.create({
|
|
719
|
+
model: options.model,
|
|
720
|
+
messages: this.mapMessages(options.messages),
|
|
721
|
+
tools: options.tools?.map(this.mapTool),
|
|
722
|
+
temperature: options.temperature,
|
|
723
|
+
max_tokens: options.maxTokens,
|
|
724
|
+
stream: true
|
|
725
|
+
});
|
|
726
|
+
for await (const chunk of stream) {
|
|
727
|
+
const choice = chunk.choices[0];
|
|
728
|
+
if (!choice) continue;
|
|
729
|
+
const delta = choice.delta;
|
|
730
|
+
let toolCallDelta = void 0;
|
|
731
|
+
if (delta.tool_calls && delta.tool_calls.length > 0) {
|
|
732
|
+
const tc = delta.tool_calls[0];
|
|
733
|
+
if (tc) {
|
|
734
|
+
toolCallDelta = {
|
|
735
|
+
index: tc.index,
|
|
736
|
+
id: tc.id,
|
|
737
|
+
type: "function",
|
|
738
|
+
function: tc.function ? {
|
|
739
|
+
name: tc.function.name,
|
|
740
|
+
arguments: tc.function.arguments
|
|
741
|
+
} : void 0
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
yield {
|
|
746
|
+
delta: delta.content || "",
|
|
747
|
+
toolCallDelta,
|
|
748
|
+
usage: void 0
|
|
749
|
+
// OpenAI stream doesn't always perform usage
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
// --- Mappers ---
|
|
754
|
+
mapMessages(messages) {
|
|
755
|
+
return messages.map((m) => {
|
|
756
|
+
if (m.role === "tool") {
|
|
757
|
+
return {
|
|
758
|
+
role: "tool",
|
|
759
|
+
content: m.content || "",
|
|
760
|
+
tool_call_id: m.toolCallId || "unknown"
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
if (m.role === "user") {
|
|
764
|
+
if (Array.isArray(m.content)) {
|
|
765
|
+
return {
|
|
766
|
+
role: "user",
|
|
767
|
+
content: m.content.map((c) => {
|
|
768
|
+
if (c.type === "text") {
|
|
769
|
+
return { type: "text", text: c.text };
|
|
770
|
+
}
|
|
771
|
+
if (c.type === "image_url") {
|
|
772
|
+
return {
|
|
773
|
+
type: "image_url",
|
|
774
|
+
image_url: {
|
|
775
|
+
url: c.image_url.url,
|
|
776
|
+
detail: c.image_url.detail
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
return void 0;
|
|
781
|
+
}).filter(Boolean)
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
return { role: "user", content: m.content || "" };
|
|
785
|
+
}
|
|
786
|
+
if (m.role === "system") {
|
|
787
|
+
return { role: "system", content: (typeof m.content === "string" ? m.content : "") || "" };
|
|
788
|
+
}
|
|
789
|
+
if (m.role === "assistant") {
|
|
790
|
+
const tool_calls = m.toolCalls?.map((tc) => ({
|
|
791
|
+
id: tc.id,
|
|
792
|
+
type: "function",
|
|
793
|
+
function: {
|
|
794
|
+
name: tc.function.name,
|
|
795
|
+
arguments: tc.function.arguments
|
|
796
|
+
}
|
|
797
|
+
}));
|
|
798
|
+
return {
|
|
799
|
+
role: "assistant",
|
|
800
|
+
content: m.content || null,
|
|
801
|
+
tool_calls
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
throw new Error(`Unknown role: ${m.role}`);
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
mapTool(tool2) {
|
|
808
|
+
return {
|
|
809
|
+
type: "function",
|
|
810
|
+
function: {
|
|
811
|
+
name: tool2.function.name,
|
|
812
|
+
description: tool2.function.description,
|
|
813
|
+
parameters: tool2.function.parameters
|
|
814
|
+
}
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
mapResponseMessage(msg) {
|
|
818
|
+
return {
|
|
819
|
+
role: msg.role,
|
|
820
|
+
content: msg.content || "",
|
|
821
|
+
toolCalls: msg.tool_calls?.map((tc) => {
|
|
822
|
+
if (tc.type === "function") {
|
|
823
|
+
return {
|
|
824
|
+
id: tc.id,
|
|
825
|
+
function: {
|
|
826
|
+
name: tc.function.name,
|
|
827
|
+
arguments: tc.function.arguments
|
|
828
|
+
},
|
|
829
|
+
type: "function"
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
return void 0;
|
|
833
|
+
}).filter(Boolean)
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
// src/providers/grok/index.ts
|
|
839
|
+
import OpenAI2 from "openai";
|
|
840
|
+
var GrokProvider = class {
|
|
841
|
+
constructor(options) {
|
|
842
|
+
this.name = "grok";
|
|
843
|
+
this.client = new OpenAI2({
|
|
844
|
+
apiKey: options.apiKey,
|
|
845
|
+
baseURL: "https://api.x.ai/v1"
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
async chat(options) {
|
|
849
|
+
const response = await this.client.chat.completions.create({
|
|
850
|
+
model: options.model || "grok-beta",
|
|
851
|
+
messages: options.messages,
|
|
852
|
+
// Simple cast for compat
|
|
853
|
+
temperature: options.temperature,
|
|
854
|
+
max_tokens: options.maxTokens
|
|
855
|
+
});
|
|
856
|
+
const choice = response.choices[0];
|
|
857
|
+
return {
|
|
858
|
+
message: {
|
|
859
|
+
role: "assistant",
|
|
860
|
+
content: choice?.message?.content || ""
|
|
861
|
+
}
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
async *chatStream(options) {
|
|
865
|
+
const stream = await this.client.chat.completions.create({
|
|
866
|
+
model: options.model || "grok-beta",
|
|
867
|
+
messages: options.messages,
|
|
868
|
+
stream: true
|
|
869
|
+
});
|
|
870
|
+
for await (const chunk of stream) {
|
|
871
|
+
yield {
|
|
872
|
+
delta: chunk.choices[0]?.delta?.content || ""
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
// src/providers/openrouter/index.ts
|
|
879
|
+
import OpenAI3 from "openai";
|
|
880
|
+
var OpenRouterProvider = class {
|
|
881
|
+
constructor(options) {
|
|
882
|
+
this.name = "openrouter";
|
|
883
|
+
this.client = new OpenAI3({
|
|
884
|
+
apiKey: options.apiKey,
|
|
885
|
+
baseURL: "https://openrouter.ai/api/v1",
|
|
886
|
+
defaultHeaders: {
|
|
887
|
+
"HTTP-Referer": "https://tekimax.com",
|
|
888
|
+
// Required by OpenRouter
|
|
889
|
+
"X-Title": "Tekimax SDK"
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
async chat(options) {
|
|
894
|
+
const response = await this.client.chat.completions.create({
|
|
895
|
+
model: options.model,
|
|
896
|
+
messages: options.messages,
|
|
897
|
+
temperature: options.temperature,
|
|
898
|
+
max_tokens: options.maxTokens
|
|
899
|
+
});
|
|
900
|
+
const choice = response.choices[0];
|
|
901
|
+
return {
|
|
902
|
+
message: {
|
|
903
|
+
role: "assistant",
|
|
904
|
+
content: choice?.message?.content || ""
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
async *chatStream(options) {
|
|
909
|
+
const stream = await this.client.chat.completions.create({
|
|
910
|
+
model: options.model,
|
|
911
|
+
messages: options.messages,
|
|
912
|
+
stream: true
|
|
913
|
+
});
|
|
914
|
+
for await (const chunk of stream) {
|
|
915
|
+
yield {
|
|
916
|
+
delta: chunk.choices[0]?.delta?.content || ""
|
|
917
|
+
};
|
|
918
|
+
}
|
|
15
919
|
}
|
|
16
|
-
return to;
|
|
17
920
|
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
921
|
|
|
20
|
-
// src/
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
23
|
-
TekimaxClient: () => TekimaxClient,
|
|
24
|
-
TekimaxResponse: () => TekimaxResponse,
|
|
25
|
-
allowedToolChoiceSchema: () => allowedToolChoiceSchema,
|
|
922
|
+
// src/gen/types.ts
|
|
923
|
+
var types_exports = {};
|
|
924
|
+
__export(types_exports, {
|
|
26
925
|
allowedToolChoiceTypeEnum: () => allowedToolChoiceTypeEnum,
|
|
27
|
-
allowedToolsParamSchema: () => allowedToolsParamSchema,
|
|
28
926
|
allowedToolsParamTypeEnum: () => allowedToolsParamTypeEnum,
|
|
29
|
-
annotationSchema: () => annotationSchema,
|
|
30
927
|
assistantMessageItemParamRoleEnum: () => assistantMessageItemParamRoleEnum,
|
|
31
|
-
assistantMessageItemParamSchema: () => assistantMessageItemParamSchema,
|
|
32
928
|
assistantMessageItemParamTypeEnum: () => assistantMessageItemParamTypeEnum,
|
|
33
|
-
createResponseBodySchema: () => createResponseBodySchema,
|
|
34
|
-
createresponse200Schema: () => createresponse200Schema,
|
|
35
|
-
createresponseMutationRequestSchema: () => createresponseMutationRequestSchema,
|
|
36
|
-
createresponseMutationResponseSchema: () => createresponseMutationResponseSchema,
|
|
37
929
|
detailEnumEnum: () => detailEnumEnum,
|
|
38
|
-
detailEnumSchema: () => detailEnumSchema,
|
|
39
930
|
developerMessageItemParamRoleEnum: () => developerMessageItemParamRoleEnum,
|
|
40
|
-
developerMessageItemParamSchema: () => developerMessageItemParamSchema,
|
|
41
931
|
developerMessageItemParamTypeEnum: () => developerMessageItemParamTypeEnum,
|
|
42
|
-
emptyModelParamSchema: () => emptyModelParamSchema,
|
|
43
|
-
errorPayloadSchema: () => errorPayloadSchema,
|
|
44
|
-
errorSchema: () => errorSchema,
|
|
45
|
-
errorStreamingEventSchema: () => errorStreamingEventSchema,
|
|
46
932
|
errorStreamingEventTypeEnum: () => errorStreamingEventTypeEnum,
|
|
47
|
-
functionCallItemParamSchema: () => functionCallItemParamSchema,
|
|
48
933
|
functionCallItemParamTypeEnum: () => functionCallItemParamTypeEnum,
|
|
49
934
|
functionCallItemStatusEnum: () => functionCallItemStatusEnum,
|
|
50
|
-
functionCallItemStatusSchema: () => functionCallItemStatusSchema,
|
|
51
|
-
functionCallOutputItemParamSchema: () => functionCallOutputItemParamSchema,
|
|
52
935
|
functionCallOutputItemParamTypeEnum: () => functionCallOutputItemParamTypeEnum,
|
|
53
|
-
functionCallOutputSchema: () => functionCallOutputSchema,
|
|
54
936
|
functionCallOutputStatusEnumEnum: () => functionCallOutputStatusEnumEnum,
|
|
55
|
-
functionCallOutputStatusEnumSchema: () => functionCallOutputStatusEnumSchema,
|
|
56
937
|
functionCallOutputTypeEnum: () => functionCallOutputTypeEnum,
|
|
57
|
-
functionCallSchema: () => functionCallSchema,
|
|
58
938
|
functionCallStatusEnum: () => functionCallStatusEnum,
|
|
59
|
-
functionCallStatusSchema: () => functionCallStatusSchema,
|
|
60
939
|
functionCallTypeEnum: () => functionCallTypeEnum,
|
|
61
|
-
functionToolChoiceSchema: () => functionToolChoiceSchema,
|
|
62
940
|
functionToolChoiceTypeEnum: () => functionToolChoiceTypeEnum,
|
|
63
|
-
functionToolParamSchema: () => functionToolParamSchema,
|
|
64
941
|
functionToolParamTypeEnum: () => functionToolParamTypeEnum,
|
|
65
|
-
functionToolSchema: () => functionToolSchema,
|
|
66
942
|
functionToolTypeEnum: () => functionToolTypeEnum,
|
|
67
943
|
imageDetailEnum: () => imageDetailEnum,
|
|
68
|
-
imageDetailSchema: () => imageDetailSchema,
|
|
69
944
|
includeEnumEnum: () => includeEnumEnum,
|
|
70
|
-
includeEnumSchema: () => includeEnumSchema,
|
|
71
|
-
incompleteDetailsSchema: () => incompleteDetailsSchema,
|
|
72
|
-
inputFileContentParamSchema: () => inputFileContentParamSchema,
|
|
73
945
|
inputFileContentParamTypeEnum: () => inputFileContentParamTypeEnum,
|
|
74
|
-
inputFileContentSchema: () => inputFileContentSchema,
|
|
75
946
|
inputFileContentTypeEnum: () => inputFileContentTypeEnum,
|
|
76
|
-
inputImageContentParamAutoParamSchema: () => inputImageContentParamAutoParamSchema,
|
|
77
947
|
inputImageContentParamAutoParamTypeEnum: () => inputImageContentParamAutoParamTypeEnum,
|
|
78
|
-
inputImageContentSchema: () => inputImageContentSchema,
|
|
79
948
|
inputImageContentTypeEnum: () => inputImageContentTypeEnum,
|
|
80
|
-
inputTextContentParamSchema: () => inputTextContentParamSchema,
|
|
81
949
|
inputTextContentParamTypeEnum: () => inputTextContentParamTypeEnum,
|
|
82
|
-
inputTextContentSchema: () => inputTextContentSchema,
|
|
83
950
|
inputTextContentTypeEnum: () => inputTextContentTypeEnum,
|
|
84
|
-
inputTokensDetailsSchema: () => inputTokensDetailsSchema,
|
|
85
|
-
inputVideoContentSchema: () => inputVideoContentSchema,
|
|
86
951
|
inputVideoContentTypeEnum: () => inputVideoContentTypeEnum,
|
|
87
|
-
itemFieldSchema: () => itemFieldSchema,
|
|
88
|
-
itemParamSchema: () => itemParamSchema,
|
|
89
|
-
itemReferenceParamSchema: () => itemReferenceParamSchema,
|
|
90
952
|
itemReferenceParamTypeEnum: () => itemReferenceParamTypeEnum,
|
|
91
|
-
jsonObjectResponseFormatSchema: () => jsonObjectResponseFormatSchema,
|
|
92
953
|
jsonObjectResponseFormatTypeEnum: () => jsonObjectResponseFormatTypeEnum,
|
|
93
|
-
jsonSchemaResponseFormatParamSchema: () => jsonSchemaResponseFormatParamSchema,
|
|
94
954
|
jsonSchemaResponseFormatParamTypeEnum: () => jsonSchemaResponseFormatParamTypeEnum,
|
|
95
|
-
jsonSchemaResponseFormatSchema: () => jsonSchemaResponseFormatSchema,
|
|
96
955
|
jsonSchemaResponseFormatTypeEnum: () => jsonSchemaResponseFormatTypeEnum,
|
|
97
|
-
logProbSchema: () => logProbSchema,
|
|
98
956
|
messageRoleEnum: () => messageRoleEnum,
|
|
99
|
-
messageRoleSchema: () => messageRoleSchema,
|
|
100
|
-
messageSchema: () => messageSchema,
|
|
101
957
|
messageStatusEnum: () => messageStatusEnum,
|
|
102
|
-
messageStatusSchema: () => messageStatusSchema,
|
|
103
958
|
messageTypeEnum: () => messageTypeEnum,
|
|
104
|
-
metadataParamSchema: () => metadataParamSchema,
|
|
105
|
-
outputTextContentParamSchema: () => outputTextContentParamSchema,
|
|
106
959
|
outputTextContentParamTypeEnum: () => outputTextContentParamTypeEnum,
|
|
107
|
-
outputTextContentSchema: () => outputTextContentSchema,
|
|
108
960
|
outputTextContentTypeEnum: () => outputTextContentTypeEnum,
|
|
109
|
-
outputTokensDetailsSchema: () => outputTokensDetailsSchema,
|
|
110
|
-
reasoningBodySchema: () => reasoningBodySchema,
|
|
111
961
|
reasoningBodyTypeEnum: () => reasoningBodyTypeEnum,
|
|
112
962
|
reasoningEffortEnumEnum: () => reasoningEffortEnumEnum,
|
|
113
|
-
reasoningEffortEnumSchema: () => reasoningEffortEnumSchema,
|
|
114
|
-
reasoningItemParamSchema: () => reasoningItemParamSchema,
|
|
115
963
|
reasoningItemParamTypeEnum: () => reasoningItemParamTypeEnum,
|
|
116
|
-
reasoningParamSchema: () => reasoningParamSchema,
|
|
117
|
-
reasoningSchema: () => reasoningSchema,
|
|
118
|
-
reasoningSummaryContentParamSchema: () => reasoningSummaryContentParamSchema,
|
|
119
964
|
reasoningSummaryContentParamTypeEnum: () => reasoningSummaryContentParamTypeEnum,
|
|
120
965
|
reasoningSummaryEnumEnum: () => reasoningSummaryEnumEnum,
|
|
121
|
-
reasoningSummaryEnumSchema: () => reasoningSummaryEnumSchema,
|
|
122
|
-
reasoningTextContentSchema: () => reasoningTextContentSchema,
|
|
123
966
|
reasoningTextContentTypeEnum: () => reasoningTextContentTypeEnum,
|
|
124
|
-
refusalContentParamSchema: () => refusalContentParamSchema,
|
|
125
967
|
refusalContentParamTypeEnum: () => refusalContentParamTypeEnum,
|
|
126
|
-
refusalContentSchema: () => refusalContentSchema,
|
|
127
968
|
refusalContentTypeEnum: () => refusalContentTypeEnum,
|
|
128
|
-
responseCompletedStreamingEventSchema: () => responseCompletedStreamingEventSchema,
|
|
129
969
|
responseCompletedStreamingEventTypeEnum: () => responseCompletedStreamingEventTypeEnum,
|
|
130
|
-
responseContentPartAddedStreamingEventSchema: () => responseContentPartAddedStreamingEventSchema,
|
|
131
970
|
responseContentPartAddedStreamingEventTypeEnum: () => responseContentPartAddedStreamingEventTypeEnum,
|
|
132
|
-
responseContentPartDoneStreamingEventSchema: () => responseContentPartDoneStreamingEventSchema,
|
|
133
971
|
responseContentPartDoneStreamingEventTypeEnum: () => responseContentPartDoneStreamingEventTypeEnum,
|
|
134
|
-
responseCreatedStreamingEventSchema: () => responseCreatedStreamingEventSchema,
|
|
135
972
|
responseCreatedStreamingEventTypeEnum: () => responseCreatedStreamingEventTypeEnum,
|
|
136
|
-
responseFailedStreamingEventSchema: () => responseFailedStreamingEventSchema,
|
|
137
973
|
responseFailedStreamingEventTypeEnum: () => responseFailedStreamingEventTypeEnum,
|
|
138
|
-
responseFunctionCallArgumentsDeltaStreamingEventSchema: () => responseFunctionCallArgumentsDeltaStreamingEventSchema,
|
|
139
974
|
responseFunctionCallArgumentsDeltaStreamingEventTypeEnum: () => responseFunctionCallArgumentsDeltaStreamingEventTypeEnum,
|
|
140
|
-
responseFunctionCallArgumentsDoneStreamingEventSchema: () => responseFunctionCallArgumentsDoneStreamingEventSchema,
|
|
141
975
|
responseFunctionCallArgumentsDoneStreamingEventTypeEnum: () => responseFunctionCallArgumentsDoneStreamingEventTypeEnum,
|
|
142
|
-
responseInProgressStreamingEventSchema: () => responseInProgressStreamingEventSchema,
|
|
143
976
|
responseInProgressStreamingEventTypeEnum: () => responseInProgressStreamingEventTypeEnum,
|
|
144
|
-
responseIncompleteStreamingEventSchema: () => responseIncompleteStreamingEventSchema,
|
|
145
977
|
responseIncompleteStreamingEventTypeEnum: () => responseIncompleteStreamingEventTypeEnum,
|
|
146
|
-
responseOutputItemAddedStreamingEventSchema: () => responseOutputItemAddedStreamingEventSchema,
|
|
147
978
|
responseOutputItemAddedStreamingEventTypeEnum: () => responseOutputItemAddedStreamingEventTypeEnum,
|
|
148
|
-
responseOutputItemDoneStreamingEventSchema: () => responseOutputItemDoneStreamingEventSchema,
|
|
149
979
|
responseOutputItemDoneStreamingEventTypeEnum: () => responseOutputItemDoneStreamingEventTypeEnum,
|
|
150
|
-
responseOutputTextAnnotationAddedStreamingEventSchema: () => responseOutputTextAnnotationAddedStreamingEventSchema,
|
|
151
980
|
responseOutputTextAnnotationAddedStreamingEventTypeEnum: () => responseOutputTextAnnotationAddedStreamingEventTypeEnum,
|
|
152
|
-
responseOutputTextDeltaStreamingEventSchema: () => responseOutputTextDeltaStreamingEventSchema,
|
|
153
981
|
responseOutputTextDeltaStreamingEventTypeEnum: () => responseOutputTextDeltaStreamingEventTypeEnum,
|
|
154
|
-
responseOutputTextDoneStreamingEventSchema: () => responseOutputTextDoneStreamingEventSchema,
|
|
155
982
|
responseOutputTextDoneStreamingEventTypeEnum: () => responseOutputTextDoneStreamingEventTypeEnum,
|
|
156
|
-
responseQueuedStreamingEventSchema: () => responseQueuedStreamingEventSchema,
|
|
157
983
|
responseQueuedStreamingEventTypeEnum: () => responseQueuedStreamingEventTypeEnum,
|
|
158
|
-
responseReasoningDeltaStreamingEventSchema: () => responseReasoningDeltaStreamingEventSchema,
|
|
159
984
|
responseReasoningDeltaStreamingEventTypeEnum: () => responseReasoningDeltaStreamingEventTypeEnum,
|
|
160
|
-
responseReasoningDoneStreamingEventSchema: () => responseReasoningDoneStreamingEventSchema,
|
|
161
985
|
responseReasoningDoneStreamingEventTypeEnum: () => responseReasoningDoneStreamingEventTypeEnum,
|
|
162
|
-
responseReasoningSummaryDeltaStreamingEventSchema: () => responseReasoningSummaryDeltaStreamingEventSchema,
|
|
163
986
|
responseReasoningSummaryDeltaStreamingEventTypeEnum: () => responseReasoningSummaryDeltaStreamingEventTypeEnum,
|
|
164
|
-
responseReasoningSummaryDoneStreamingEventSchema: () => responseReasoningSummaryDoneStreamingEventSchema,
|
|
165
987
|
responseReasoningSummaryDoneStreamingEventTypeEnum: () => responseReasoningSummaryDoneStreamingEventTypeEnum,
|
|
166
|
-
responseReasoningSummaryPartAddedStreamingEventSchema: () => responseReasoningSummaryPartAddedStreamingEventSchema,
|
|
167
988
|
responseReasoningSummaryPartAddedStreamingEventTypeEnum: () => responseReasoningSummaryPartAddedStreamingEventTypeEnum,
|
|
168
|
-
responseReasoningSummaryPartDoneStreamingEventSchema: () => responseReasoningSummaryPartDoneStreamingEventSchema,
|
|
169
989
|
responseReasoningSummaryPartDoneStreamingEventTypeEnum: () => responseReasoningSummaryPartDoneStreamingEventTypeEnum,
|
|
170
|
-
responseRefusalDeltaStreamingEventSchema: () => responseRefusalDeltaStreamingEventSchema,
|
|
171
990
|
responseRefusalDeltaStreamingEventTypeEnum: () => responseRefusalDeltaStreamingEventTypeEnum,
|
|
172
|
-
responseRefusalDoneStreamingEventSchema: () => responseRefusalDoneStreamingEventSchema,
|
|
173
991
|
responseRefusalDoneStreamingEventTypeEnum: () => responseRefusalDoneStreamingEventTypeEnum,
|
|
174
992
|
responseResourceObjectEnum: () => responseResourceObjectEnum,
|
|
175
|
-
responseResourceSchema: () => responseResourceSchema,
|
|
176
|
-
responsesToolParamSchema: () => responsesToolParamSchema,
|
|
177
993
|
serviceTierEnumEnum: () => serviceTierEnumEnum,
|
|
178
|
-
serviceTierEnumSchema: () => serviceTierEnumSchema,
|
|
179
|
-
specificFunctionParamSchema: () => specificFunctionParamSchema,
|
|
180
994
|
specificFunctionParamTypeEnum: () => specificFunctionParamTypeEnum,
|
|
181
|
-
specificToolChoiceParamSchema: () => specificToolChoiceParamSchema,
|
|
182
|
-
streamOptionsParamSchema: () => streamOptionsParamSchema,
|
|
183
|
-
summaryTextContentSchema: () => summaryTextContentSchema,
|
|
184
995
|
summaryTextContentTypeEnum: () => summaryTextContentTypeEnum,
|
|
185
996
|
systemMessageItemParamRoleEnum: () => systemMessageItemParamRoleEnum,
|
|
186
|
-
systemMessageItemParamSchema: () => systemMessageItemParamSchema,
|
|
187
997
|
systemMessageItemParamTypeEnum: () => systemMessageItemParamTypeEnum,
|
|
188
|
-
textContentSchema: () => textContentSchema,
|
|
189
998
|
textContentTypeEnum: () => textContentTypeEnum,
|
|
190
|
-
textFieldSchema: () => textFieldSchema,
|
|
191
|
-
textFormatParamSchema: () => textFormatParamSchema,
|
|
192
|
-
textParamSchema: () => textParamSchema,
|
|
193
|
-
textResponseFormatSchema: () => textResponseFormatSchema,
|
|
194
999
|
textResponseFormatTypeEnum: () => textResponseFormatTypeEnum,
|
|
195
|
-
toolChoiceParamSchema: () => toolChoiceParamSchema,
|
|
196
1000
|
toolChoiceValueEnumEnum: () => toolChoiceValueEnumEnum,
|
|
197
|
-
toolChoiceValueEnumSchema: () => toolChoiceValueEnumSchema,
|
|
198
|
-
toolSchema: () => toolSchema,
|
|
199
|
-
topLogProbSchema: () => topLogProbSchema,
|
|
200
1001
|
truncationEnumEnum: () => truncationEnumEnum,
|
|
201
|
-
truncationEnumSchema: () => truncationEnumSchema,
|
|
202
|
-
urlCitationBodySchema: () => urlCitationBodySchema,
|
|
203
1002
|
urlCitationBodyTypeEnum: () => urlCitationBodyTypeEnum,
|
|
204
|
-
urlCitationParamSchema: () => urlCitationParamSchema,
|
|
205
1003
|
urlCitationParamTypeEnum: () => urlCitationParamTypeEnum,
|
|
206
|
-
usageSchema: () => usageSchema,
|
|
207
1004
|
userMessageItemParamRoleEnum: () => userMessageItemParamRoleEnum,
|
|
208
|
-
userMessageItemParamSchema: () => userMessageItemParamSchema,
|
|
209
1005
|
userMessageItemParamTypeEnum: () => userMessageItemParamTypeEnum,
|
|
210
|
-
verbosityEnumEnum: () => verbosityEnumEnum
|
|
211
|
-
verbosityEnumSchema: () => verbosityEnumSchema
|
|
1006
|
+
verbosityEnumEnum: () => verbosityEnumEnum
|
|
212
1007
|
});
|
|
213
|
-
module.exports = __toCommonJS(index_exports);
|
|
214
|
-
|
|
215
|
-
// src/gen/types.ts
|
|
216
1008
|
var itemReferenceParamTypeEnum = {
|
|
217
1009
|
item_reference: "item_reference"
|
|
218
1010
|
};
|
|
@@ -490,1308 +1282,247 @@ var errorStreamingEventTypeEnum = {
|
|
|
490
1282
|
error: "error"
|
|
491
1283
|
};
|
|
492
1284
|
|
|
493
|
-
// src/
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
// src/
|
|
573
|
-
var
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
//
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
"type": import_zod15.z.enum(["function_call"]).default("function_call").describe("The item type. Always `function_call`."),
|
|
600
|
-
"name": import_zod15.z.string().min(1).max(64).regex(/^[a-zA-Z0-9_-]+$/).describe("The name of the function to call."),
|
|
601
|
-
"arguments": import_zod15.z.string().describe("The function arguments as a JSON string."),
|
|
602
|
-
"status": import_zod15.z.optional(import_zod15.z.union([import_zod15.z.lazy(() => functionCallStatusSchema).and(import_zod15.z.any()), import_zod15.z.null()]))
|
|
603
|
-
});
|
|
604
|
-
|
|
605
|
-
// src/gen/zod/inputFileContentParamSchema.ts
|
|
606
|
-
var import_zod16 = require("zod");
|
|
607
|
-
var inputFileContentParamSchema = import_zod16.z.object({
|
|
608
|
-
"type": import_zod16.z.enum(["input_file"]).default("input_file").describe("The type of the input item. Always `input_file`."),
|
|
609
|
-
"filename": import_zod16.z.optional(import_zod16.z.union([import_zod16.z.string(), import_zod16.z.null()])),
|
|
610
|
-
"file_data": import_zod16.z.optional(import_zod16.z.union([import_zod16.z.string(), import_zod16.z.null()])),
|
|
611
|
-
"file_url": import_zod16.z.optional(import_zod16.z.union([import_zod16.z.string(), import_zod16.z.null()]))
|
|
612
|
-
}).describe("A file input to the model.");
|
|
613
|
-
|
|
614
|
-
// src/gen/zod/imageDetailSchema.ts
|
|
615
|
-
var import_zod17 = require("zod");
|
|
616
|
-
var imageDetailSchema = import_zod17.z.enum(["low", "high", "auto"]);
|
|
617
|
-
|
|
618
|
-
// src/gen/zod/inputImageContentParamAutoParamSchema.ts
|
|
619
|
-
var import_zod18 = require("zod");
|
|
620
|
-
var inputImageContentParamAutoParamSchema = import_zod18.z.object({
|
|
621
|
-
"type": import_zod18.z.enum(["input_image"]).default("input_image").describe("The type of the input item. Always `input_image`."),
|
|
622
|
-
"image_url": import_zod18.z.optional(import_zod18.z.union([import_zod18.z.string(), import_zod18.z.null()])),
|
|
623
|
-
"detail": import_zod18.z.optional(import_zod18.z.union([import_zod18.z.lazy(() => imageDetailSchema).and(import_zod18.z.any()), import_zod18.z.null()]))
|
|
624
|
-
}).describe("An image input to the model. Learn about [image inputs](/docs/guides/vision)");
|
|
625
|
-
|
|
626
|
-
// src/gen/zod/inputTextContentParamSchema.ts
|
|
627
|
-
var import_zod19 = require("zod");
|
|
628
|
-
var inputTextContentParamSchema = import_zod19.z.object({
|
|
629
|
-
"type": import_zod19.z.enum(["input_text"]).default("input_text").describe("The type of the input item. Always `input_text`."),
|
|
630
|
-
"text": import_zod19.z.string().max(10485760).describe("The text input to the model.")
|
|
631
|
-
}).describe("A text input to the model.");
|
|
632
|
-
|
|
633
|
-
// src/gen/zod/inputVideoContentSchema.ts
|
|
634
|
-
var import_zod20 = require("zod");
|
|
635
|
-
var inputVideoContentSchema = import_zod20.z.object({
|
|
636
|
-
"type": import_zod20.z.enum(["input_video"]).describe("The type of the input content. Always `input_video`."),
|
|
637
|
-
"video_url": import_zod20.z.string().describe("A base64 or remote url that resolves to a video file.")
|
|
638
|
-
}).describe("A content block representing a video input to the model.");
|
|
639
|
-
|
|
640
|
-
// src/gen/zod/functionCallOutputItemParamSchema.ts
|
|
641
|
-
var import_zod21 = require("zod");
|
|
642
|
-
var functionCallOutputItemParamSchema = import_zod21.z.object({
|
|
643
|
-
"id": import_zod21.z.optional(import_zod21.z.union([import_zod21.z.string(), import_zod21.z.null()])),
|
|
644
|
-
"call_id": import_zod21.z.string().min(1).max(64).describe("The unique ID of the function tool call generated by the model."),
|
|
645
|
-
"type": import_zod21.z.enum(["function_call_output"]).default("function_call_output").describe("The type of the function tool call output. Always `function_call_output`."),
|
|
646
|
-
"output": import_zod21.z.union([import_zod21.z.array(import_zod21.z.union([import_zod21.z.lazy(() => inputTextContentParamSchema).and(import_zod21.z.object({
|
|
647
|
-
"type": import_zod21.z.literal("input_text")
|
|
648
|
-
})), import_zod21.z.lazy(() => inputImageContentParamAutoParamSchema).and(import_zod21.z.object({
|
|
649
|
-
"type": import_zod21.z.literal("input_image")
|
|
650
|
-
})), import_zod21.z.lazy(() => inputFileContentParamSchema).and(import_zod21.z.object({
|
|
651
|
-
"type": import_zod21.z.literal("input_file")
|
|
652
|
-
})), import_zod21.z.lazy(() => inputVideoContentSchema).and(import_zod21.z.object({
|
|
653
|
-
"type": import_zod21.z.literal("input_video")
|
|
654
|
-
}))]).describe("A piece of message content, such as text, an image, or a file.")), import_zod21.z.string()]).describe("Text, image, or file output of the function tool call."),
|
|
655
|
-
"status": import_zod21.z.optional(import_zod21.z.union([import_zod21.z.lazy(() => functionCallStatusSchema).and(import_zod21.z.any()), import_zod21.z.null()]))
|
|
656
|
-
}).describe("The output of a function tool call.");
|
|
657
|
-
|
|
658
|
-
// src/gen/zod/itemReferenceParamSchema.ts
|
|
659
|
-
var import_zod22 = require("zod");
|
|
660
|
-
var itemReferenceParamSchema = import_zod22.z.object({
|
|
661
|
-
"type": import_zod22.z.optional(import_zod22.z.union([import_zod22.z.enum(["item_reference"]), import_zod22.z.null()])),
|
|
662
|
-
"id": import_zod22.z.string().describe("The ID of the item to reference.")
|
|
663
|
-
}).describe("An internal identifier for an item to reference.");
|
|
664
|
-
|
|
665
|
-
// src/gen/zod/reasoningSummaryContentParamSchema.ts
|
|
666
|
-
var import_zod23 = require("zod");
|
|
667
|
-
var reasoningSummaryContentParamSchema = import_zod23.z.object({
|
|
668
|
-
"type": import_zod23.z.enum(["summary_text"]).default("summary_text").describe("The content type. Always `summary_text`."),
|
|
669
|
-
"text": import_zod23.z.string().max(10485760).describe("The reasoning summary text.")
|
|
670
|
-
});
|
|
671
|
-
|
|
672
|
-
// src/gen/zod/reasoningItemParamSchema.ts
|
|
673
|
-
var import_zod24 = require("zod");
|
|
674
|
-
var reasoningItemParamSchema = import_zod24.z.object({
|
|
675
|
-
"id": import_zod24.z.optional(import_zod24.z.union([import_zod24.z.string(), import_zod24.z.null()])),
|
|
676
|
-
"type": import_zod24.z.enum(["reasoning"]).default("reasoning").describe("The item type. Always `reasoning`."),
|
|
677
|
-
"summary": import_zod24.z.array(import_zod24.z.lazy(() => reasoningSummaryContentParamSchema)).describe("Reasoning summary content associated with this item."),
|
|
678
|
-
"content": import_zod24.z.optional(import_zod24.z.null()),
|
|
679
|
-
"encrypted_content": import_zod24.z.optional(import_zod24.z.union([import_zod24.z.string(), import_zod24.z.null()]))
|
|
680
|
-
});
|
|
681
|
-
|
|
682
|
-
// src/gen/zod/itemParamSchema.ts
|
|
683
|
-
var import_zod25 = require("zod");
|
|
684
|
-
var itemParamSchema = import_zod25.z.union([import_zod25.z.lazy(() => itemReferenceParamSchema).and(import_zod25.z.object({
|
|
685
|
-
"type": import_zod25.z.literal("Item reference")
|
|
686
|
-
})), import_zod25.z.lazy(() => reasoningItemParamSchema).and(import_zod25.z.object({
|
|
687
|
-
"type": import_zod25.z.literal("reasoning")
|
|
688
|
-
})), import_zod25.z.lazy(() => assistantMessageItemParamSchema).and(import_zod25.z.object({
|
|
689
|
-
"type": import_zod25.z.literal("message")
|
|
690
|
-
})), import_zod25.z.lazy(() => functionCallItemParamSchema).and(import_zod25.z.object({
|
|
691
|
-
"type": import_zod25.z.literal("function_call")
|
|
692
|
-
})), import_zod25.z.lazy(() => functionCallOutputItemParamSchema).and(import_zod25.z.object({
|
|
693
|
-
"type": import_zod25.z.literal("function_call_output")
|
|
694
|
-
}))]);
|
|
695
|
-
|
|
696
|
-
// src/gen/zod/metadataParamSchema.ts
|
|
697
|
-
var import_zod26 = require("zod");
|
|
698
|
-
var metadataParamSchema = import_zod26.z.object({}).catchall(import_zod26.z.string().max(512)).describe("Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.");
|
|
699
|
-
|
|
700
|
-
// src/gen/zod/reasoningEffortEnumSchema.ts
|
|
701
|
-
var import_zod27 = require("zod");
|
|
702
|
-
var reasoningEffortEnumSchema = import_zod27.z.enum(["none", "low", "medium", "high", "xhigh"]);
|
|
703
|
-
|
|
704
|
-
// src/gen/zod/reasoningSummaryEnumSchema.ts
|
|
705
|
-
var import_zod28 = require("zod");
|
|
706
|
-
var reasoningSummaryEnumSchema = import_zod28.z.enum(["concise", "detailed", "auto"]);
|
|
707
|
-
|
|
708
|
-
// src/gen/zod/reasoningParamSchema.ts
|
|
709
|
-
var import_zod29 = require("zod");
|
|
710
|
-
var reasoningParamSchema = import_zod29.z.object({
|
|
711
|
-
"effort": import_zod29.z.optional(import_zod29.z.union([import_zod29.z.lazy(() => reasoningEffortEnumSchema), import_zod29.z.null()])),
|
|
712
|
-
"summary": import_zod29.z.optional(import_zod29.z.union([import_zod29.z.lazy(() => reasoningSummaryEnumSchema).and(import_zod29.z.any()), import_zod29.z.null()]))
|
|
713
|
-
}).describe("**gpt-5 and o-series models only** Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).");
|
|
714
|
-
|
|
715
|
-
// src/gen/zod/emptyModelParamSchema.ts
|
|
716
|
-
var import_zod30 = require("zod");
|
|
717
|
-
var emptyModelParamSchema = import_zod30.z.object({});
|
|
718
|
-
|
|
719
|
-
// src/gen/zod/functionToolParamSchema.ts
|
|
720
|
-
var import_zod31 = require("zod");
|
|
721
|
-
var functionToolParamSchema = import_zod31.z.object({
|
|
722
|
-
"name": import_zod31.z.string().min(1).max(64).regex(/^[a-zA-Z0-9_-]+$/),
|
|
723
|
-
"description": import_zod31.z.optional(import_zod31.z.union([import_zod31.z.string(), import_zod31.z.null()])),
|
|
724
|
-
"parameters": import_zod31.z.optional(import_zod31.z.union([import_zod31.z.lazy(() => emptyModelParamSchema), import_zod31.z.null()])),
|
|
725
|
-
"strict": import_zod31.z.optional(import_zod31.z.boolean()),
|
|
726
|
-
"type": import_zod31.z.enum(["function"]).default("function")
|
|
727
|
-
});
|
|
728
|
-
|
|
729
|
-
// src/gen/zod/responsesToolParamSchema.ts
|
|
730
|
-
var import_zod32 = require("zod");
|
|
731
|
-
var responsesToolParamSchema = import_zod32.z.lazy(() => functionToolParamSchema).and(import_zod32.z.object({
|
|
732
|
-
"type": import_zod32.z.literal("function")
|
|
733
|
-
}));
|
|
734
|
-
|
|
735
|
-
// src/gen/zod/serviceTierEnumSchema.ts
|
|
736
|
-
var import_zod33 = require("zod");
|
|
737
|
-
var serviceTierEnumSchema = import_zod33.z.enum(["auto", "default", "flex", "priority"]);
|
|
738
|
-
|
|
739
|
-
// src/gen/zod/streamOptionsParamSchema.ts
|
|
740
|
-
var import_zod34 = require("zod");
|
|
741
|
-
var streamOptionsParamSchema = import_zod34.z.object({
|
|
742
|
-
"include_obfuscation": import_zod34.z.optional(import_zod34.z.boolean().describe("Whether to obfuscate sensitive information in streamed output. Defaults to `true`."))
|
|
743
|
-
}).describe("Options that control streamed response behavior.");
|
|
744
|
-
|
|
745
|
-
// src/gen/zod/jsonSchemaResponseFormatParamSchema.ts
|
|
746
|
-
var import_zod35 = require("zod");
|
|
747
|
-
var jsonSchemaResponseFormatParamSchema = import_zod35.z.object({
|
|
748
|
-
"type": import_zod35.z.optional(import_zod35.z.enum(["json_schema"]).describe("The type of response format being defined. Always `json_schema`.")),
|
|
749
|
-
"description": import_zod35.z.optional(import_zod35.z.string().describe("A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n")),
|
|
750
|
-
"name": import_zod35.z.optional(import_zod35.z.string().describe("The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n")),
|
|
751
|
-
"schema": import_zod35.z.optional(import_zod35.z.object({}).catchall(import_zod35.z.any()).describe("The schema for the response format, described as a JSON Schema object.\n")),
|
|
752
|
-
"strict": import_zod35.z.optional(import_zod35.z.union([import_zod35.z.boolean(), import_zod35.z.null()]))
|
|
753
|
-
});
|
|
754
|
-
|
|
755
|
-
// src/gen/zod/textResponseFormatSchema.ts
|
|
756
|
-
var import_zod36 = require("zod");
|
|
757
|
-
var textResponseFormatSchema = import_zod36.z.object({
|
|
758
|
-
"type": import_zod36.z.enum(["text"]).default("text")
|
|
759
|
-
});
|
|
760
|
-
|
|
761
|
-
// src/gen/zod/textFormatParamSchema.ts
|
|
762
|
-
var import_zod37 = require("zod");
|
|
763
|
-
var textFormatParamSchema = import_zod37.z.union([import_zod37.z.lazy(() => textResponseFormatSchema), import_zod37.z.lazy(() => jsonSchemaResponseFormatParamSchema)]);
|
|
764
|
-
|
|
765
|
-
// src/gen/zod/verbosityEnumSchema.ts
|
|
766
|
-
var import_zod38 = require("zod");
|
|
767
|
-
var verbosityEnumSchema = import_zod38.z.enum(["low", "medium", "high"]);
|
|
768
|
-
|
|
769
|
-
// src/gen/zod/textParamSchema.ts
|
|
770
|
-
var import_zod39 = require("zod");
|
|
771
|
-
var textParamSchema = import_zod39.z.object({
|
|
772
|
-
"format": import_zod39.z.optional(import_zod39.z.union([import_zod39.z.lazy(() => textFormatParamSchema), import_zod39.z.null()]).describe("The format configuration for text output.")),
|
|
773
|
-
"verbosity": import_zod39.z.optional(import_zod39.z.lazy(() => verbosityEnumSchema).and(import_zod39.z.any()))
|
|
774
|
-
});
|
|
775
|
-
|
|
776
|
-
// src/gen/zod/toolChoiceParamSchema.ts
|
|
777
|
-
var import_zod40 = require("zod");
|
|
778
|
-
var toolChoiceParamSchema = import_zod40.z.union([import_zod40.z.lazy(() => specificToolChoiceParamSchema), import_zod40.z.lazy(() => toolChoiceValueEnumSchema), import_zod40.z.lazy(() => allowedToolsParamSchema)]).describe("Controls which tool the model should use, if any.");
|
|
779
|
-
|
|
780
|
-
// src/gen/zod/truncationEnumSchema.ts
|
|
781
|
-
var import_zod41 = require("zod");
|
|
782
|
-
var truncationEnumSchema = import_zod41.z.enum(["auto", "disabled"]);
|
|
783
|
-
|
|
784
|
-
// src/gen/zod/createResponseBodySchema.ts
|
|
785
|
-
var import_zod42 = require("zod");
|
|
786
|
-
var createResponseBodySchema = import_zod42.z.object({
|
|
787
|
-
"model": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.string(), import_zod42.z.null()])),
|
|
788
|
-
"input": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.union([import_zod42.z.array(import_zod42.z.lazy(() => itemParamSchema)), import_zod42.z.string()]), import_zod42.z.null()])),
|
|
789
|
-
"previous_response_id": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.string(), import_zod42.z.null()])),
|
|
790
|
-
"include": import_zod42.z.optional(import_zod42.z.array(import_zod42.z.lazy(() => includeEnumSchema))),
|
|
791
|
-
"tools": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.array(import_zod42.z.lazy(() => responsesToolParamSchema)), import_zod42.z.null()])),
|
|
792
|
-
"tool_choice": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.lazy(() => toolChoiceParamSchema).and(import_zod42.z.any()), import_zod42.z.null()])),
|
|
793
|
-
"metadata": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.lazy(() => metadataParamSchema).and(import_zod42.z.any()), import_zod42.z.null()])),
|
|
794
|
-
"text": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.lazy(() => textParamSchema).and(import_zod42.z.any()), import_zod42.z.null()])),
|
|
795
|
-
"temperature": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.number(), import_zod42.z.null()])),
|
|
796
|
-
"top_p": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.number(), import_zod42.z.null()])),
|
|
797
|
-
"presence_penalty": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.number(), import_zod42.z.null()])),
|
|
798
|
-
"frequency_penalty": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.number(), import_zod42.z.null()])),
|
|
799
|
-
"parallel_tool_calls": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.boolean(), import_zod42.z.null()])),
|
|
800
|
-
"stream": import_zod42.z.optional(import_zod42.z.boolean().describe("Whether to stream response events as server-sent events.")),
|
|
801
|
-
"stream_options": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.lazy(() => streamOptionsParamSchema).and(import_zod42.z.any()), import_zod42.z.null()])),
|
|
802
|
-
"background": import_zod42.z.optional(import_zod42.z.boolean().describe("Whether to run the request in the background and return immediately.")),
|
|
803
|
-
"max_output_tokens": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.number().int(), import_zod42.z.null()])),
|
|
804
|
-
"max_tool_calls": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.number().int(), import_zod42.z.null()])),
|
|
805
|
-
"reasoning": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.lazy(() => reasoningParamSchema).and(import_zod42.z.any()), import_zod42.z.null()])),
|
|
806
|
-
"safety_identifier": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.string(), import_zod42.z.null()])),
|
|
807
|
-
"prompt_cache_key": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.string(), import_zod42.z.null()])),
|
|
808
|
-
"truncation": import_zod42.z.optional(import_zod42.z.lazy(() => truncationEnumSchema).and(import_zod42.z.any())),
|
|
809
|
-
"instructions": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.string(), import_zod42.z.null()])),
|
|
810
|
-
"store": import_zod42.z.optional(import_zod42.z.boolean().describe("Whether to store the response so it can be retrieved later.")),
|
|
811
|
-
"service_tier": import_zod42.z.optional(import_zod42.z.lazy(() => serviceTierEnumSchema).and(import_zod42.z.any())),
|
|
812
|
-
"top_logprobs": import_zod42.z.optional(import_zod42.z.union([import_zod42.z.number().int(), import_zod42.z.null()]))
|
|
813
|
-
});
|
|
814
|
-
|
|
815
|
-
// src/gen/zod/errorSchema.ts
|
|
816
|
-
var import_zod43 = require("zod");
|
|
817
|
-
var errorSchema = import_zod43.z.object({
|
|
818
|
-
"code": import_zod43.z.string().describe("A machine-readable error code that was returned."),
|
|
819
|
-
"message": import_zod43.z.string().describe("A human-readable description of the error that was returned.")
|
|
820
|
-
}).describe("An error that occurred while generating the response.");
|
|
821
|
-
|
|
822
|
-
// src/gen/zod/incompleteDetailsSchema.ts
|
|
823
|
-
var import_zod44 = require("zod");
|
|
824
|
-
var incompleteDetailsSchema = import_zod44.z.object({
|
|
825
|
-
"reason": import_zod44.z.string().describe("The reason the response could not be completed.")
|
|
826
|
-
}).describe("Details about why the response was incomplete.");
|
|
827
|
-
|
|
828
|
-
// src/gen/zod/functionCallOutputStatusEnumSchema.ts
|
|
829
|
-
var import_zod45 = require("zod");
|
|
830
|
-
var functionCallOutputStatusEnumSchema = import_zod45.z.enum(["in_progress", "completed", "incomplete"]).describe("Similar to `FunctionCallStatus`. All three options are allowed here for compatibility, but because in practice these items will be provided by developers, only `completed` should be used.");
|
|
831
|
-
|
|
832
|
-
// src/gen/zod/inputFileContentSchema.ts
|
|
833
|
-
var import_zod46 = require("zod");
|
|
834
|
-
var inputFileContentSchema = import_zod46.z.object({
|
|
835
|
-
"type": import_zod46.z.enum(["input_file"]).default("input_file").describe("The type of the input item. Always `input_file`."),
|
|
836
|
-
"filename": import_zod46.z.optional(import_zod46.z.string().describe("The name of the file to be sent to the model.")),
|
|
837
|
-
"file_url": import_zod46.z.optional(import_zod46.z.string().describe("The URL of the file to be sent to the model."))
|
|
838
|
-
}).describe("A file input to the model.");
|
|
839
|
-
|
|
840
|
-
// src/gen/zod/inputImageContentSchema.ts
|
|
841
|
-
var import_zod47 = require("zod");
|
|
842
|
-
var inputImageContentSchema = import_zod47.z.object({
|
|
843
|
-
"type": import_zod47.z.enum(["input_image"]).default("input_image").describe("The type of the input item. Always `input_image`."),
|
|
844
|
-
"image_url": import_zod47.z.union([import_zod47.z.string(), import_zod47.z.null()]),
|
|
845
|
-
"detail": import_zod47.z.lazy(() => imageDetailSchema).and(import_zod47.z.any())
|
|
846
|
-
}).describe("An image input to the model. Learn about [image inputs](/docs/guides/vision).");
|
|
847
|
-
|
|
848
|
-
// src/gen/zod/inputTextContentSchema.ts
|
|
849
|
-
var import_zod48 = require("zod");
|
|
850
|
-
var inputTextContentSchema = import_zod48.z.object({
|
|
851
|
-
"type": import_zod48.z.enum(["input_text"]).default("input_text").describe("The type of the input item. Always `input_text`."),
|
|
852
|
-
"text": import_zod48.z.string().describe("The text input to the model.")
|
|
853
|
-
}).describe("A text input to the model.");
|
|
854
|
-
|
|
855
|
-
// src/gen/zod/functionCallOutputSchema.ts
|
|
856
|
-
var import_zod49 = require("zod");
|
|
857
|
-
var functionCallOutputSchema = import_zod49.z.object({
|
|
858
|
-
"type": import_zod49.z.enum(["function_call_output"]).default("function_call_output").describe("The type of the function tool call output. Always `function_call_output`."),
|
|
859
|
-
"id": import_zod49.z.string().describe("The unique ID of the function tool call output. Populated when this item is returned via API."),
|
|
860
|
-
"call_id": import_zod49.z.string().describe("The unique ID of the function tool call generated by the model."),
|
|
861
|
-
"output": import_zod49.z.union([import_zod49.z.array(import_zod49.z.union([import_zod49.z.lazy(() => inputTextContentSchema).and(import_zod49.z.object({
|
|
862
|
-
"type": import_zod49.z.literal("input_text")
|
|
863
|
-
})), import_zod49.z.lazy(() => inputImageContentSchema).and(import_zod49.z.object({
|
|
864
|
-
"type": import_zod49.z.literal("input_image")
|
|
865
|
-
})), import_zod49.z.lazy(() => inputFileContentSchema).and(import_zod49.z.object({
|
|
866
|
-
"type": import_zod49.z.literal("input_file")
|
|
867
|
-
}))]).describe("A content part that makes up an input or output item.")), import_zod49.z.string()]),
|
|
868
|
-
"status": import_zod49.z.lazy(() => functionCallOutputStatusEnumSchema).and(import_zod49.z.any())
|
|
869
|
-
}).describe("A function tool call output that was returned by the tool.");
|
|
870
|
-
|
|
871
|
-
// src/gen/zod/functionCallSchema.ts
|
|
872
|
-
var import_zod50 = require("zod");
|
|
873
|
-
var functionCallSchema = import_zod50.z.object({
|
|
874
|
-
"type": import_zod50.z.enum(["function_call"]).default("function_call").describe("The type of the item. Always `function_call`."),
|
|
875
|
-
"id": import_zod50.z.string().describe("The unique ID of the function call item."),
|
|
876
|
-
"call_id": import_zod50.z.string().describe("The unique ID of the function tool call that was generated."),
|
|
877
|
-
"name": import_zod50.z.string().describe("The name of the function that was called."),
|
|
878
|
-
"arguments": import_zod50.z.string().describe("The arguments JSON string that was generated."),
|
|
879
|
-
"status": import_zod50.z.lazy(() => functionCallStatusSchema).and(import_zod50.z.any())
|
|
880
|
-
}).describe("A function tool call that was generated by the model.");
|
|
881
|
-
|
|
882
|
-
// src/gen/zod/messageRoleSchema.ts
|
|
883
|
-
var import_zod51 = require("zod");
|
|
884
|
-
var messageRoleSchema = import_zod51.z.enum(["user", "assistant", "system", "developer"]);
|
|
885
|
-
|
|
886
|
-
// src/gen/zod/messageStatusSchema.ts
|
|
887
|
-
var import_zod52 = require("zod");
|
|
888
|
-
var messageStatusSchema = import_zod52.z.enum(["in_progress", "completed", "incomplete"]);
|
|
889
|
-
|
|
890
|
-
// src/gen/zod/topLogProbSchema.ts
|
|
891
|
-
var import_zod53 = require("zod");
|
|
892
|
-
var topLogProbSchema = import_zod53.z.object({
|
|
893
|
-
"token": import_zod53.z.string(),
|
|
894
|
-
"logprob": import_zod53.z.number(),
|
|
895
|
-
"bytes": import_zod53.z.array(import_zod53.z.number().int())
|
|
896
|
-
}).describe("The top log probability of a token.");
|
|
897
|
-
|
|
898
|
-
// src/gen/zod/logProbSchema.ts
|
|
899
|
-
var import_zod54 = require("zod");
|
|
900
|
-
var logProbSchema = import_zod54.z.object({
|
|
901
|
-
"token": import_zod54.z.string(),
|
|
902
|
-
"logprob": import_zod54.z.number(),
|
|
903
|
-
"bytes": import_zod54.z.array(import_zod54.z.number().int()),
|
|
904
|
-
"top_logprobs": import_zod54.z.array(import_zod54.z.lazy(() => topLogProbSchema).describe("The top log probability of a token."))
|
|
905
|
-
}).describe("The log probability of a token.");
|
|
906
|
-
|
|
907
|
-
// src/gen/zod/outputTextContentSchema.ts
|
|
908
|
-
var import_zod55 = require("zod");
|
|
909
|
-
var outputTextContentSchema = import_zod55.z.object({
|
|
910
|
-
"type": import_zod55.z.enum(["output_text"]).default("output_text").describe("The type of the output text. Always `output_text`."),
|
|
911
|
-
"text": import_zod55.z.string().describe("The text output from the model."),
|
|
912
|
-
"annotations": import_zod55.z.array(import_zod55.z.lazy(() => annotationSchema).describe("An annotation that applies to a span of output text.")).describe("The annotations of the text output."),
|
|
913
|
-
"logprobs": import_zod55.z.array(import_zod55.z.lazy(() => logProbSchema).describe("The log probability of a token."))
|
|
914
|
-
}).describe("A text output from the model.");
|
|
915
|
-
|
|
916
|
-
// src/gen/zod/reasoningTextContentSchema.ts
|
|
917
|
-
var import_zod56 = require("zod");
|
|
918
|
-
var reasoningTextContentSchema = import_zod56.z.object({
|
|
919
|
-
"type": import_zod56.z.enum(["reasoning_text"]).default("reasoning_text").describe("The type of the reasoning text. Always `reasoning_text`."),
|
|
920
|
-
"text": import_zod56.z.string().describe("The reasoning text from the model.")
|
|
921
|
-
}).describe("Reasoning text from the model.");
|
|
922
|
-
|
|
923
|
-
// src/gen/zod/refusalContentSchema.ts
|
|
924
|
-
var import_zod57 = require("zod");
|
|
925
|
-
var refusalContentSchema = import_zod57.z.object({
|
|
926
|
-
"type": import_zod57.z.enum(["refusal"]).default("refusal").describe("The type of the refusal. Always `refusal`."),
|
|
927
|
-
"refusal": import_zod57.z.string().describe("The refusal explanation from the model.")
|
|
928
|
-
}).describe("A refusal from the model.");
|
|
929
|
-
|
|
930
|
-
// src/gen/zod/summaryTextContentSchema.ts
|
|
931
|
-
var import_zod58 = require("zod");
|
|
932
|
-
var summaryTextContentSchema = import_zod58.z.object({
|
|
933
|
-
"type": import_zod58.z.enum(["summary_text"]).default("summary_text").describe("The type of the object. Always `summary_text`."),
|
|
934
|
-
"text": import_zod58.z.string().describe("A summary of the reasoning output from the model so far.")
|
|
935
|
-
}).describe("A summary text from the model.");
|
|
936
|
-
|
|
937
|
-
// src/gen/zod/textContentSchema.ts
|
|
938
|
-
var import_zod59 = require("zod");
|
|
939
|
-
var textContentSchema = import_zod59.z.object({
|
|
940
|
-
"type": import_zod59.z.enum(["text"]).default("text"),
|
|
941
|
-
"text": import_zod59.z.string()
|
|
942
|
-
}).describe("A text content.");
|
|
943
|
-
|
|
944
|
-
// src/gen/zod/messageSchema.ts
|
|
945
|
-
var import_zod60 = require("zod");
|
|
946
|
-
var messageSchema = import_zod60.z.object({
|
|
947
|
-
"type": import_zod60.z.enum(["message"]).default("message").describe("The type of the message. Always set to `message`."),
|
|
948
|
-
"id": import_zod60.z.string().describe("The unique ID of the message."),
|
|
949
|
-
"status": import_zod60.z.lazy(() => messageStatusSchema).and(import_zod60.z.any()),
|
|
950
|
-
"role": import_zod60.z.lazy(() => messageRoleSchema).and(import_zod60.z.any()),
|
|
951
|
-
"content": import_zod60.z.array(import_zod60.z.union([import_zod60.z.lazy(() => inputTextContentSchema).and(import_zod60.z.object({
|
|
952
|
-
"type": import_zod60.z.literal("input_text")
|
|
953
|
-
})), import_zod60.z.lazy(() => outputTextContentSchema).and(import_zod60.z.object({
|
|
954
|
-
"type": import_zod60.z.literal("output_text")
|
|
955
|
-
})), import_zod60.z.lazy(() => textContentSchema).and(import_zod60.z.object({
|
|
956
|
-
"type": import_zod60.z.literal("text")
|
|
957
|
-
})), import_zod60.z.lazy(() => summaryTextContentSchema).and(import_zod60.z.object({
|
|
958
|
-
"type": import_zod60.z.literal("summary_text")
|
|
959
|
-
})), import_zod60.z.lazy(() => reasoningTextContentSchema).and(import_zod60.z.object({
|
|
960
|
-
"type": import_zod60.z.literal("reasoning_text")
|
|
961
|
-
})), import_zod60.z.lazy(() => refusalContentSchema).and(import_zod60.z.object({
|
|
962
|
-
"type": import_zod60.z.literal("refusal")
|
|
963
|
-
})), import_zod60.z.lazy(() => inputImageContentSchema).and(import_zod60.z.object({
|
|
964
|
-
"type": import_zod60.z.literal("input_image")
|
|
965
|
-
})), import_zod60.z.lazy(() => inputFileContentSchema).and(import_zod60.z.object({
|
|
966
|
-
"type": import_zod60.z.literal("input_file")
|
|
967
|
-
})), import_zod60.z.lazy(() => inputVideoContentSchema).and(import_zod60.z.object({
|
|
968
|
-
"type": import_zod60.z.literal("input_video")
|
|
969
|
-
}))]).describe("A content part that makes up an input or output item.")).describe("The content of the message")
|
|
970
|
-
}).describe("A message to or from the model.");
|
|
971
|
-
|
|
972
|
-
// src/gen/zod/reasoningBodySchema.ts
|
|
973
|
-
var import_zod61 = require("zod");
|
|
974
|
-
var reasoningBodySchema = import_zod61.z.object({
|
|
975
|
-
"type": import_zod61.z.enum(["reasoning"]).default("reasoning").describe("The type of the item. Always `reasoning`."),
|
|
976
|
-
"id": import_zod61.z.string().describe("The unique ID of the reasoning item."),
|
|
977
|
-
"content": import_zod61.z.optional(import_zod61.z.array(import_zod61.z.union([import_zod61.z.lazy(() => inputTextContentSchema).and(import_zod61.z.object({
|
|
978
|
-
"type": import_zod61.z.literal("input_text")
|
|
979
|
-
})), import_zod61.z.lazy(() => outputTextContentSchema).and(import_zod61.z.object({
|
|
980
|
-
"type": import_zod61.z.literal("output_text")
|
|
981
|
-
})), import_zod61.z.lazy(() => textContentSchema).and(import_zod61.z.object({
|
|
982
|
-
"type": import_zod61.z.literal("text")
|
|
983
|
-
})), import_zod61.z.lazy(() => summaryTextContentSchema).and(import_zod61.z.object({
|
|
984
|
-
"type": import_zod61.z.literal("summary_text")
|
|
985
|
-
})), import_zod61.z.lazy(() => reasoningTextContentSchema).and(import_zod61.z.object({
|
|
986
|
-
"type": import_zod61.z.literal("reasoning_text")
|
|
987
|
-
})), import_zod61.z.lazy(() => refusalContentSchema).and(import_zod61.z.object({
|
|
988
|
-
"type": import_zod61.z.literal("refusal")
|
|
989
|
-
})), import_zod61.z.lazy(() => inputImageContentSchema).and(import_zod61.z.object({
|
|
990
|
-
"type": import_zod61.z.literal("input_image")
|
|
991
|
-
})), import_zod61.z.lazy(() => inputFileContentSchema).and(import_zod61.z.object({
|
|
992
|
-
"type": import_zod61.z.literal("input_file")
|
|
993
|
-
}))]).describe("A content part that makes up an input or output item.")).describe("The reasoning content that was generated.")),
|
|
994
|
-
"summary": import_zod61.z.array(import_zod61.z.union([import_zod61.z.lazy(() => inputTextContentSchema).and(import_zod61.z.object({
|
|
995
|
-
"type": import_zod61.z.literal("input_text")
|
|
996
|
-
})), import_zod61.z.lazy(() => outputTextContentSchema).and(import_zod61.z.object({
|
|
997
|
-
"type": import_zod61.z.literal("output_text")
|
|
998
|
-
})), import_zod61.z.lazy(() => textContentSchema).and(import_zod61.z.object({
|
|
999
|
-
"type": import_zod61.z.literal("text")
|
|
1000
|
-
})), import_zod61.z.lazy(() => summaryTextContentSchema).and(import_zod61.z.object({
|
|
1001
|
-
"type": import_zod61.z.literal("summary_text")
|
|
1002
|
-
})), import_zod61.z.lazy(() => reasoningTextContentSchema).and(import_zod61.z.object({
|
|
1003
|
-
"type": import_zod61.z.literal("reasoning_text")
|
|
1004
|
-
})), import_zod61.z.lazy(() => refusalContentSchema).and(import_zod61.z.object({
|
|
1005
|
-
"type": import_zod61.z.literal("refusal")
|
|
1006
|
-
})), import_zod61.z.lazy(() => inputImageContentSchema).and(import_zod61.z.object({
|
|
1007
|
-
"type": import_zod61.z.literal("input_image")
|
|
1008
|
-
})), import_zod61.z.lazy(() => inputFileContentSchema).and(import_zod61.z.object({
|
|
1009
|
-
"type": import_zod61.z.literal("input_file")
|
|
1010
|
-
}))]).describe("A content part that makes up an input or output item.")).describe("The reasoning summary content that was generated."),
|
|
1011
|
-
"encrypted_content": import_zod61.z.optional(import_zod61.z.string().describe("The encrypted reasoning content that was generated."))
|
|
1012
|
-
}).describe("A reasoning item that was generated by the model.");
|
|
1013
|
-
|
|
1014
|
-
// src/gen/zod/itemFieldSchema.ts
|
|
1015
|
-
var import_zod62 = require("zod");
|
|
1016
|
-
var itemFieldSchema = import_zod62.z.union([import_zod62.z.lazy(() => messageSchema).and(import_zod62.z.object({
|
|
1017
|
-
"type": import_zod62.z.literal("message")
|
|
1018
|
-
})), import_zod62.z.lazy(() => functionCallSchema).and(import_zod62.z.object({
|
|
1019
|
-
"type": import_zod62.z.literal("function_call")
|
|
1020
|
-
})), import_zod62.z.lazy(() => functionCallOutputSchema).and(import_zod62.z.object({
|
|
1021
|
-
"type": import_zod62.z.literal("function_call_output")
|
|
1022
|
-
})), import_zod62.z.lazy(() => reasoningBodySchema).and(import_zod62.z.object({
|
|
1023
|
-
"type": import_zod62.z.literal("reasoning")
|
|
1024
|
-
}))]).describe("An item representing a message, tool call, tool output, reasoning, or other response element.");
|
|
1025
|
-
|
|
1026
|
-
// src/gen/zod/reasoningSchema.ts
|
|
1027
|
-
var import_zod63 = require("zod");
|
|
1028
|
-
var reasoningSchema = import_zod63.z.object({
|
|
1029
|
-
"effort": import_zod63.z.union([import_zod63.z.lazy(() => reasoningEffortEnumSchema), import_zod63.z.null()]),
|
|
1030
|
-
"summary": import_zod63.z.union([import_zod63.z.lazy(() => reasoningSummaryEnumSchema).and(import_zod63.z.any()), import_zod63.z.null()])
|
|
1031
|
-
}).describe("Reasoning configuration and metadata that were used for the response.");
|
|
1032
|
-
|
|
1033
|
-
// src/gen/zod/jsonObjectResponseFormatSchema.ts
|
|
1034
|
-
var import_zod64 = require("zod");
|
|
1035
|
-
var jsonObjectResponseFormatSchema = import_zod64.z.object({
|
|
1036
|
-
"type": import_zod64.z.enum(["json_object"]).default("json_object")
|
|
1037
|
-
});
|
|
1038
|
-
|
|
1039
|
-
// src/gen/zod/jsonSchemaResponseFormatSchema.ts
|
|
1040
|
-
var import_zod65 = require("zod");
|
|
1041
|
-
var jsonSchemaResponseFormatSchema = import_zod65.z.object({
|
|
1042
|
-
"type": import_zod65.z.enum(["json_schema"]).default("json_schema"),
|
|
1043
|
-
"name": import_zod65.z.string(),
|
|
1044
|
-
"description": import_zod65.z.union([import_zod65.z.string(), import_zod65.z.null()]),
|
|
1045
|
-
"schema": import_zod65.z.null(),
|
|
1046
|
-
"strict": import_zod65.z.boolean()
|
|
1047
|
-
});
|
|
1048
|
-
|
|
1049
|
-
// src/gen/zod/textFieldSchema.ts
|
|
1050
|
-
var import_zod66 = require("zod");
|
|
1051
|
-
var textFieldSchema = import_zod66.z.object({
|
|
1052
|
-
"format": import_zod66.z.union([import_zod66.z.lazy(() => textResponseFormatSchema), import_zod66.z.lazy(() => jsonObjectResponseFormatSchema), import_zod66.z.lazy(() => jsonSchemaResponseFormatSchema)]),
|
|
1053
|
-
"verbosity": import_zod66.z.optional(import_zod66.z.lazy(() => verbosityEnumSchema))
|
|
1054
|
-
});
|
|
1055
|
-
|
|
1056
|
-
// src/gen/zod/functionToolSchema.ts
|
|
1057
|
-
var import_zod67 = require("zod");
|
|
1058
|
-
var functionToolSchema = import_zod67.z.object({
|
|
1059
|
-
"type": import_zod67.z.enum(["function"]).default("function").describe("The type of the function tool. Always `function`."),
|
|
1060
|
-
"name": import_zod67.z.string().describe("The name of the function to call."),
|
|
1061
|
-
"description": import_zod67.z.union([import_zod67.z.string(), import_zod67.z.null()]),
|
|
1062
|
-
"parameters": import_zod67.z.union([import_zod67.z.object({}).catchall(import_zod67.z.any()), import_zod67.z.null()]),
|
|
1063
|
-
"strict": import_zod67.z.union([import_zod67.z.boolean(), import_zod67.z.null()])
|
|
1064
|
-
}).describe("Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).");
|
|
1065
|
-
|
|
1066
|
-
// src/gen/zod/toolSchema.ts
|
|
1067
|
-
var import_zod68 = require("zod");
|
|
1068
|
-
var toolSchema = import_zod68.z.lazy(() => functionToolSchema).and(import_zod68.z.object({
|
|
1069
|
-
"type": import_zod68.z.literal("function")
|
|
1070
|
-
})).describe("A tool that can be used to generate a response.");
|
|
1071
|
-
|
|
1072
|
-
// src/gen/zod/inputTokensDetailsSchema.ts
|
|
1073
|
-
var import_zod69 = require("zod");
|
|
1074
|
-
var inputTokensDetailsSchema = import_zod69.z.object({
|
|
1075
|
-
"cached_tokens": import_zod69.z.number().int().describe("The number of input tokens that were served from cache.")
|
|
1076
|
-
}).describe("A breakdown of input token usage that was recorded.");
|
|
1077
|
-
|
|
1078
|
-
// src/gen/zod/outputTokensDetailsSchema.ts
|
|
1079
|
-
var import_zod70 = require("zod");
|
|
1080
|
-
var outputTokensDetailsSchema = import_zod70.z.object({
|
|
1081
|
-
"reasoning_tokens": import_zod70.z.number().int().describe("The number of output tokens that were attributed to reasoning.")
|
|
1082
|
-
}).describe("A breakdown of output token usage that was recorded.");
|
|
1083
|
-
|
|
1084
|
-
// src/gen/zod/usageSchema.ts
|
|
1085
|
-
var import_zod71 = require("zod");
|
|
1086
|
-
var usageSchema = import_zod71.z.object({
|
|
1087
|
-
"input_tokens": import_zod71.z.number().int().describe("The number of input tokens that were used to generate the response."),
|
|
1088
|
-
"output_tokens": import_zod71.z.number().int().describe("The number of output tokens that were generated by the model."),
|
|
1089
|
-
"total_tokens": import_zod71.z.number().int().describe("The total number of tokens that were used."),
|
|
1090
|
-
"input_tokens_details": import_zod71.z.lazy(() => inputTokensDetailsSchema).and(import_zod71.z.any()),
|
|
1091
|
-
"output_tokens_details": import_zod71.z.lazy(() => outputTokensDetailsSchema).and(import_zod71.z.any())
|
|
1092
|
-
}).describe("Token usage statistics that were recorded for the response.");
|
|
1093
|
-
|
|
1094
|
-
// src/gen/zod/responseResourceSchema.ts
|
|
1095
|
-
var import_zod72 = require("zod");
|
|
1096
|
-
var responseResourceSchema = import_zod72.z.object({
|
|
1097
|
-
"id": import_zod72.z.string().describe("The unique ID of the response that was created."),
|
|
1098
|
-
"object": import_zod72.z.enum(["response"]).default("response").describe("The object type, which was always `response`."),
|
|
1099
|
-
"created_at": import_zod72.z.number().int().describe("The Unix timestamp (in seconds) for when the response was created."),
|
|
1100
|
-
"completed_at": import_zod72.z.union([import_zod72.z.number().int(), import_zod72.z.null()]),
|
|
1101
|
-
"status": import_zod72.z.string().describe("The status that was set for the response."),
|
|
1102
|
-
"incomplete_details": import_zod72.z.union([import_zod72.z.lazy(() => incompleteDetailsSchema).and(import_zod72.z.any()), import_zod72.z.null()]),
|
|
1103
|
-
"model": import_zod72.z.string().describe("The model that generated this response."),
|
|
1104
|
-
"previous_response_id": import_zod72.z.union([import_zod72.z.string(), import_zod72.z.null()]),
|
|
1105
|
-
"instructions": import_zod72.z.union([import_zod72.z.string(), import_zod72.z.null()]),
|
|
1106
|
-
"output": import_zod72.z.array(import_zod72.z.lazy(() => itemFieldSchema).describe("An item representing a message, tool call, tool output, reasoning, or other response element.")).describe("The output items that were generated by the model."),
|
|
1107
|
-
"error": import_zod72.z.union([import_zod72.z.lazy(() => errorSchema).and(import_zod72.z.any()), import_zod72.z.null()]),
|
|
1108
|
-
"tools": import_zod72.z.array(import_zod72.z.lazy(() => toolSchema).describe("A tool that can be used to generate a response.")).describe("The tools that were available to the model during response generation."),
|
|
1109
|
-
"tool_choice": import_zod72.z.union([import_zod72.z.lazy(() => functionToolChoiceSchema), import_zod72.z.lazy(() => toolChoiceValueEnumSchema), import_zod72.z.lazy(() => allowedToolChoiceSchema)]),
|
|
1110
|
-
"truncation": import_zod72.z.lazy(() => truncationEnumSchema).and(import_zod72.z.any()),
|
|
1111
|
-
"parallel_tool_calls": import_zod72.z.boolean().describe("Whether the model was allowed to call multiple tools in parallel."),
|
|
1112
|
-
"text": import_zod72.z.lazy(() => textFieldSchema).and(import_zod72.z.any()),
|
|
1113
|
-
"top_p": import_zod72.z.number().describe("The nucleus sampling parameter that was used for this response."),
|
|
1114
|
-
"presence_penalty": import_zod72.z.number().describe("The presence penalty that was used to penalize new tokens based on whether they appear in the text so far."),
|
|
1115
|
-
"frequency_penalty": import_zod72.z.number().describe("The frequency penalty that was used to penalize new tokens based on their frequency in the text so far."),
|
|
1116
|
-
"top_logprobs": import_zod72.z.number().int().describe("The number of most likely tokens that were returned at each position, along with their log probabilities."),
|
|
1117
|
-
"temperature": import_zod72.z.number().describe("The sampling temperature that was used for this response."),
|
|
1118
|
-
"reasoning": import_zod72.z.union([import_zod72.z.lazy(() => reasoningSchema).and(import_zod72.z.any()), import_zod72.z.null()]),
|
|
1119
|
-
"usage": import_zod72.z.union([import_zod72.z.lazy(() => usageSchema).and(import_zod72.z.any()), import_zod72.z.null()]),
|
|
1120
|
-
"max_output_tokens": import_zod72.z.union([import_zod72.z.number().int(), import_zod72.z.null()]),
|
|
1121
|
-
"max_tool_calls": import_zod72.z.union([import_zod72.z.number().int(), import_zod72.z.null()]),
|
|
1122
|
-
"store": import_zod72.z.boolean().describe("Whether this response was stored so it can be retrieved later."),
|
|
1123
|
-
"background": import_zod72.z.boolean().describe("Whether this request was run in the background."),
|
|
1124
|
-
"service_tier": import_zod72.z.string().describe("The service tier that was used for this response."),
|
|
1125
|
-
"metadata": import_zod72.z.any().describe("Developer-defined metadata that was associated with the response."),
|
|
1126
|
-
"safety_identifier": import_zod72.z.union([import_zod72.z.string(), import_zod72.z.null()]),
|
|
1127
|
-
"prompt_cache_key": import_zod72.z.union([import_zod72.z.string(), import_zod72.z.null()])
|
|
1128
|
-
}).describe("The complete response object that was returned by the Responses API.");
|
|
1129
|
-
|
|
1130
|
-
// src/gen/zod/createresponseSchema.ts
|
|
1131
|
-
var import_zod73 = require("zod");
|
|
1132
|
-
var createresponse200Schema = import_zod73.z.lazy(() => responseResourceSchema).describe("The complete response object that was returned by the Responses API.");
|
|
1133
|
-
var createresponseMutationRequestSchema = import_zod73.z.lazy(() => createResponseBodySchema);
|
|
1134
|
-
var createresponseMutationResponseSchema = import_zod73.z.lazy(() => createresponse200Schema);
|
|
1135
|
-
|
|
1136
|
-
// src/gen/zod/detailEnumSchema.ts
|
|
1137
|
-
var import_zod74 = require("zod");
|
|
1138
|
-
var detailEnumSchema = import_zod74.z.enum(["low", "high", "auto"]);
|
|
1139
|
-
|
|
1140
|
-
// src/gen/zod/developerMessageItemParamSchema.ts
|
|
1141
|
-
var import_zod75 = require("zod");
|
|
1142
|
-
var developerMessageItemParamSchema = import_zod75.z.object({
|
|
1143
|
-
"id": import_zod75.z.optional(import_zod75.z.union([import_zod75.z.string(), import_zod75.z.null()])),
|
|
1144
|
-
"type": import_zod75.z.enum(["message"]).default("message").describe("The item type. Always `message`."),
|
|
1145
|
-
"role": import_zod75.z.enum(["developer"]).default("developer").describe("The message role. Always `developer`."),
|
|
1146
|
-
"content": import_zod75.z.union([import_zod75.z.array(import_zod75.z.lazy(() => inputTextContentParamSchema).and(import_zod75.z.object({
|
|
1147
|
-
"type": import_zod75.z.literal("input_text")
|
|
1148
|
-
}))), import_zod75.z.string()]).describe("The message content, as an array of content parts."),
|
|
1149
|
-
"status": import_zod75.z.optional(import_zod75.z.union([import_zod75.z.string(), import_zod75.z.null()]))
|
|
1150
|
-
});
|
|
1151
|
-
|
|
1152
|
-
// src/gen/zod/errorPayloadSchema.ts
|
|
1153
|
-
var import_zod76 = require("zod");
|
|
1154
|
-
var errorPayloadSchema = import_zod76.z.object({
|
|
1155
|
-
"type": import_zod76.z.string().describe("The error type that was emitted."),
|
|
1156
|
-
"code": import_zod76.z.union([import_zod76.z.string(), import_zod76.z.null()]),
|
|
1157
|
-
"message": import_zod76.z.string().describe("The human-readable error message that was emitted."),
|
|
1158
|
-
"param": import_zod76.z.union([import_zod76.z.string(), import_zod76.z.null()]),
|
|
1159
|
-
"headers": import_zod76.z.optional(import_zod76.z.object({}).catchall(import_zod76.z.string().describe("The header value that was emitted.")).describe("The response headers that were emitted with the error, if any."))
|
|
1160
|
-
}).describe("An error payload that was emitted for a streaming error event.");
|
|
1161
|
-
|
|
1162
|
-
// src/gen/zod/errorStreamingEventSchema.ts
|
|
1163
|
-
var import_zod77 = require("zod");
|
|
1164
|
-
var errorStreamingEventSchema = import_zod77.z.object({
|
|
1165
|
-
"type": import_zod77.z.enum(["error"]).default("error").describe("The type of the event, always `error`."),
|
|
1166
|
-
"sequence_number": import_zod77.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1167
|
-
"error": import_zod77.z.lazy(() => errorPayloadSchema).and(import_zod77.z.any())
|
|
1168
|
-
}).describe("A streaming event that indicated an error was emitted.");
|
|
1169
|
-
|
|
1170
|
-
// src/gen/zod/functionCallItemStatusSchema.ts
|
|
1171
|
-
var import_zod78 = require("zod");
|
|
1172
|
-
var functionCallItemStatusSchema = import_zod78.z.enum(["in_progress", "completed", "incomplete"]);
|
|
1173
|
-
|
|
1174
|
-
// src/gen/zod/responseCompletedStreamingEventSchema.ts
|
|
1175
|
-
var import_zod79 = require("zod");
|
|
1176
|
-
var responseCompletedStreamingEventSchema = import_zod79.z.object({
|
|
1177
|
-
"type": import_zod79.z.enum(["response.completed"]).default("response.completed").describe("The type of the event, always `response.completed`."),
|
|
1178
|
-
"sequence_number": import_zod79.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1179
|
-
"response": import_zod79.z.lazy(() => responseResourceSchema).and(import_zod79.z.any())
|
|
1180
|
-
}).describe("A streaming event that indicated the response was completed.");
|
|
1181
|
-
|
|
1182
|
-
// src/gen/zod/responseContentPartAddedStreamingEventSchema.ts
|
|
1183
|
-
var import_zod80 = require("zod");
|
|
1184
|
-
var responseContentPartAddedStreamingEventSchema = import_zod80.z.object({
|
|
1185
|
-
"type": import_zod80.z.enum(["response.content_part.added"]).default("response.content_part.added").describe("The type of the event, always `response.content_part.added`."),
|
|
1186
|
-
"sequence_number": import_zod80.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1187
|
-
"item_id": import_zod80.z.string().describe("The ID of the item that was updated."),
|
|
1188
|
-
"output_index": import_zod80.z.number().int().describe("The index of the output item that was updated."),
|
|
1189
|
-
"content_index": import_zod80.z.number().int().describe("The index of the content part that was added."),
|
|
1190
|
-
"part": import_zod80.z.union([import_zod80.z.lazy(() => inputTextContentSchema).and(import_zod80.z.object({
|
|
1191
|
-
"type": import_zod80.z.literal("input_text")
|
|
1192
|
-
})), import_zod80.z.lazy(() => outputTextContentSchema).and(import_zod80.z.object({
|
|
1193
|
-
"type": import_zod80.z.literal("output_text")
|
|
1194
|
-
})), import_zod80.z.lazy(() => textContentSchema).and(import_zod80.z.object({
|
|
1195
|
-
"type": import_zod80.z.literal("text")
|
|
1196
|
-
})), import_zod80.z.lazy(() => summaryTextContentSchema).and(import_zod80.z.object({
|
|
1197
|
-
"type": import_zod80.z.literal("summary_text")
|
|
1198
|
-
})), import_zod80.z.lazy(() => reasoningTextContentSchema).and(import_zod80.z.object({
|
|
1199
|
-
"type": import_zod80.z.literal("reasoning_text")
|
|
1200
|
-
})), import_zod80.z.lazy(() => refusalContentSchema).and(import_zod80.z.object({
|
|
1201
|
-
"type": import_zod80.z.literal("refusal")
|
|
1202
|
-
})), import_zod80.z.lazy(() => inputImageContentSchema).and(import_zod80.z.object({
|
|
1203
|
-
"type": import_zod80.z.literal("input_image")
|
|
1204
|
-
})), import_zod80.z.lazy(() => inputFileContentSchema).and(import_zod80.z.object({
|
|
1205
|
-
"type": import_zod80.z.literal("input_file")
|
|
1206
|
-
}))]).describe("A content part that makes up an input or output item.")
|
|
1207
|
-
}).describe("A streaming event that indicated a content part was added.");
|
|
1208
|
-
|
|
1209
|
-
// src/gen/zod/responseContentPartDoneStreamingEventSchema.ts
|
|
1210
|
-
var import_zod81 = require("zod");
|
|
1211
|
-
var responseContentPartDoneStreamingEventSchema = import_zod81.z.object({
|
|
1212
|
-
"type": import_zod81.z.enum(["response.content_part.done"]).default("response.content_part.done").describe("The type of the event, always `response.content_part.done`."),
|
|
1213
|
-
"sequence_number": import_zod81.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1214
|
-
"item_id": import_zod81.z.string().describe("The ID of the item that was updated."),
|
|
1215
|
-
"output_index": import_zod81.z.number().int().describe("The index of the output item that was updated."),
|
|
1216
|
-
"content_index": import_zod81.z.number().int().describe("The index of the content part that was completed."),
|
|
1217
|
-
"part": import_zod81.z.union([import_zod81.z.lazy(() => inputTextContentSchema).and(import_zod81.z.object({
|
|
1218
|
-
"type": import_zod81.z.literal("input_text")
|
|
1219
|
-
})), import_zod81.z.lazy(() => outputTextContentSchema).and(import_zod81.z.object({
|
|
1220
|
-
"type": import_zod81.z.literal("output_text")
|
|
1221
|
-
})), import_zod81.z.lazy(() => textContentSchema).and(import_zod81.z.object({
|
|
1222
|
-
"type": import_zod81.z.literal("text")
|
|
1223
|
-
})), import_zod81.z.lazy(() => summaryTextContentSchema).and(import_zod81.z.object({
|
|
1224
|
-
"type": import_zod81.z.literal("summary_text")
|
|
1225
|
-
})), import_zod81.z.lazy(() => reasoningTextContentSchema).and(import_zod81.z.object({
|
|
1226
|
-
"type": import_zod81.z.literal("reasoning_text")
|
|
1227
|
-
})), import_zod81.z.lazy(() => refusalContentSchema).and(import_zod81.z.object({
|
|
1228
|
-
"type": import_zod81.z.literal("refusal")
|
|
1229
|
-
})), import_zod81.z.lazy(() => inputImageContentSchema).and(import_zod81.z.object({
|
|
1230
|
-
"type": import_zod81.z.literal("input_image")
|
|
1231
|
-
})), import_zod81.z.lazy(() => inputFileContentSchema).and(import_zod81.z.object({
|
|
1232
|
-
"type": import_zod81.z.literal("input_file")
|
|
1233
|
-
}))]).describe("A content part that makes up an input or output item.")
|
|
1234
|
-
}).describe("A streaming event that indicated a content part was completed.");
|
|
1235
|
-
|
|
1236
|
-
// src/gen/zod/responseCreatedStreamingEventSchema.ts
|
|
1237
|
-
var import_zod82 = require("zod");
|
|
1238
|
-
var responseCreatedStreamingEventSchema = import_zod82.z.object({
|
|
1239
|
-
"type": import_zod82.z.enum(["response.created"]).default("response.created").describe("The type of the event, always `response.created`."),
|
|
1240
|
-
"sequence_number": import_zod82.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1241
|
-
"response": import_zod82.z.lazy(() => responseResourceSchema).and(import_zod82.z.any())
|
|
1242
|
-
}).describe("A streaming event that indicated the response was created.");
|
|
1243
|
-
|
|
1244
|
-
// src/gen/zod/responseFailedStreamingEventSchema.ts
|
|
1245
|
-
var import_zod83 = require("zod");
|
|
1246
|
-
var responseFailedStreamingEventSchema = import_zod83.z.object({
|
|
1247
|
-
"type": import_zod83.z.enum(["response.failed"]).default("response.failed").describe("The type of the event, always `response.failed`."),
|
|
1248
|
-
"sequence_number": import_zod83.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1249
|
-
"response": import_zod83.z.lazy(() => responseResourceSchema).and(import_zod83.z.any())
|
|
1250
|
-
}).describe("A streaming event that indicated the response had failed.");
|
|
1251
|
-
|
|
1252
|
-
// src/gen/zod/responseFunctionCallArgumentsDeltaStreamingEventSchema.ts
|
|
1253
|
-
var import_zod84 = require("zod");
|
|
1254
|
-
var responseFunctionCallArgumentsDeltaStreamingEventSchema = import_zod84.z.object({
|
|
1255
|
-
"type": import_zod84.z.enum(["response.function_call_arguments.delta"]).default("response.function_call_arguments.delta").describe("The type of the event, always `response.function_call_arguments.delta`."),
|
|
1256
|
-
"sequence_number": import_zod84.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1257
|
-
"item_id": import_zod84.z.string().describe("The ID of the tool call item that was updated."),
|
|
1258
|
-
"output_index": import_zod84.z.number().int().describe("The index of the output item that was updated."),
|
|
1259
|
-
"delta": import_zod84.z.string().describe("The arguments delta that was appended."),
|
|
1260
|
-
"obfuscation": import_zod84.z.optional(import_zod84.z.string().describe("An obfuscation string that was added to pad the event payload."))
|
|
1261
|
-
}).describe("A streaming event that indicated function call arguments were incrementally added.");
|
|
1262
|
-
|
|
1263
|
-
// src/gen/zod/responseFunctionCallArgumentsDoneStreamingEventSchema.ts
|
|
1264
|
-
var import_zod85 = require("zod");
|
|
1265
|
-
var responseFunctionCallArgumentsDoneStreamingEventSchema = import_zod85.z.object({
|
|
1266
|
-
"type": import_zod85.z.enum(["response.function_call_arguments.done"]).default("response.function_call_arguments.done").describe("The type of the event, always `response.function_call_arguments.done`."),
|
|
1267
|
-
"sequence_number": import_zod85.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1268
|
-
"item_id": import_zod85.z.string().describe("The ID of the tool call item that was updated."),
|
|
1269
|
-
"output_index": import_zod85.z.number().int().describe("The index of the output item that was updated."),
|
|
1270
|
-
"arguments": import_zod85.z.string().describe("The final arguments string that was emitted.")
|
|
1271
|
-
}).describe("A streaming event that indicated function call arguments were completed.");
|
|
1272
|
-
|
|
1273
|
-
// src/gen/zod/responseIncompleteStreamingEventSchema.ts
|
|
1274
|
-
var import_zod86 = require("zod");
|
|
1275
|
-
var responseIncompleteStreamingEventSchema = import_zod86.z.object({
|
|
1276
|
-
"type": import_zod86.z.enum(["response.incomplete"]).default("response.incomplete").describe("The type of the event, always `response.incomplete`."),
|
|
1277
|
-
"sequence_number": import_zod86.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1278
|
-
"response": import_zod86.z.lazy(() => responseResourceSchema).and(import_zod86.z.any())
|
|
1279
|
-
}).describe("A streaming event that indicated the response was incomplete.");
|
|
1280
|
-
|
|
1281
|
-
// src/gen/zod/responseInProgressStreamingEventSchema.ts
|
|
1282
|
-
var import_zod87 = require("zod");
|
|
1283
|
-
var responseInProgressStreamingEventSchema = import_zod87.z.object({
|
|
1284
|
-
"type": import_zod87.z.enum(["response.in_progress"]).default("response.in_progress").describe("The type of the event, always `response.in_progress`."),
|
|
1285
|
-
"sequence_number": import_zod87.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1286
|
-
"response": import_zod87.z.lazy(() => responseResourceSchema).and(import_zod87.z.any())
|
|
1287
|
-
}).describe("A streaming event that indicated the response was in progress.");
|
|
1288
|
-
|
|
1289
|
-
// src/gen/zod/responseOutputItemAddedStreamingEventSchema.ts
|
|
1290
|
-
var import_zod88 = require("zod");
|
|
1291
|
-
var responseOutputItemAddedStreamingEventSchema = import_zod88.z.object({
|
|
1292
|
-
"type": import_zod88.z.enum(["response.output_item.added"]).default("response.output_item.added").describe("The type of the event, always `response.output_item.added`."),
|
|
1293
|
-
"sequence_number": import_zod88.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1294
|
-
"output_index": import_zod88.z.number().int().describe("The index of the output item that was added."),
|
|
1295
|
-
"item": import_zod88.z.union([import_zod88.z.lazy(() => itemFieldSchema).and(import_zod88.z.any()), import_zod88.z.null()])
|
|
1296
|
-
}).describe("A streaming event that indicated an output item was added to the response.");
|
|
1297
|
-
|
|
1298
|
-
// src/gen/zod/responseOutputItemDoneStreamingEventSchema.ts
|
|
1299
|
-
var import_zod89 = require("zod");
|
|
1300
|
-
var responseOutputItemDoneStreamingEventSchema = import_zod89.z.object({
|
|
1301
|
-
"type": import_zod89.z.enum(["response.output_item.done"]).default("response.output_item.done").describe("The type of the event, always `response.output_item.done`."),
|
|
1302
|
-
"sequence_number": import_zod89.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1303
|
-
"output_index": import_zod89.z.number().int().describe("The index of the output item that was completed."),
|
|
1304
|
-
"item": import_zod89.z.union([import_zod89.z.lazy(() => itemFieldSchema).and(import_zod89.z.any()), import_zod89.z.null()])
|
|
1305
|
-
}).describe("A streaming event that indicated an output item was completed.");
|
|
1306
|
-
|
|
1307
|
-
// src/gen/zod/responseOutputTextAnnotationAddedStreamingEventSchema.ts
|
|
1308
|
-
var import_zod90 = require("zod");
|
|
1309
|
-
var responseOutputTextAnnotationAddedStreamingEventSchema = import_zod90.z.object({
|
|
1310
|
-
"type": import_zod90.z.enum(["response.output_text.annotation.added"]).default("response.output_text.annotation.added").describe("The type of the event, always `response.output_text.annotation.added`."),
|
|
1311
|
-
"sequence_number": import_zod90.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1312
|
-
"item_id": import_zod90.z.string().describe("The ID of the item that was updated."),
|
|
1313
|
-
"output_index": import_zod90.z.number().int().describe("The index of the output item that was updated."),
|
|
1314
|
-
"content_index": import_zod90.z.number().int().describe("The index of the output text content that was updated."),
|
|
1315
|
-
"annotation_index": import_zod90.z.number().int().describe("The index of the annotation that was added."),
|
|
1316
|
-
"annotation": import_zod90.z.union([import_zod90.z.lazy(() => annotationSchema).and(import_zod90.z.any()), import_zod90.z.null()])
|
|
1317
|
-
}).describe("A streaming event that indicated an output text annotation was added.");
|
|
1318
|
-
|
|
1319
|
-
// src/gen/zod/responseOutputTextDeltaStreamingEventSchema.ts
|
|
1320
|
-
var import_zod91 = require("zod");
|
|
1321
|
-
var responseOutputTextDeltaStreamingEventSchema = import_zod91.z.object({
|
|
1322
|
-
"type": import_zod91.z.enum(["response.output_text.delta"]).default("response.output_text.delta").describe("The type of the event, always `response.output_text.delta`."),
|
|
1323
|
-
"sequence_number": import_zod91.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1324
|
-
"item_id": import_zod91.z.string().describe("The ID of the item that was updated."),
|
|
1325
|
-
"output_index": import_zod91.z.number().int().describe("The index of the output item that was updated."),
|
|
1326
|
-
"content_index": import_zod91.z.number().int().describe("The index of the content part that was updated."),
|
|
1327
|
-
"delta": import_zod91.z.string().describe("The text delta that was appended."),
|
|
1328
|
-
"logprobs": import_zod91.z.array(import_zod91.z.lazy(() => logProbSchema).describe("The log probability of a token.")).describe("The token log probabilities that were emitted with the delta, if any."),
|
|
1329
|
-
"obfuscation": import_zod91.z.optional(import_zod91.z.string().describe("An obfuscation string that was added to pad the event payload."))
|
|
1330
|
-
}).describe("A streaming event that indicated output text was incrementally added.");
|
|
1331
|
-
|
|
1332
|
-
// src/gen/zod/responseOutputTextDoneStreamingEventSchema.ts
|
|
1333
|
-
var import_zod92 = require("zod");
|
|
1334
|
-
var responseOutputTextDoneStreamingEventSchema = import_zod92.z.object({
|
|
1335
|
-
"type": import_zod92.z.enum(["response.output_text.done"]).default("response.output_text.done").describe("The type of the event, always `response.output_text.done`."),
|
|
1336
|
-
"sequence_number": import_zod92.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1337
|
-
"item_id": import_zod92.z.string().describe("The ID of the item that was updated."),
|
|
1338
|
-
"output_index": import_zod92.z.number().int().describe("The index of the output item that was updated."),
|
|
1339
|
-
"content_index": import_zod92.z.number().int().describe("The index of the content part that was completed."),
|
|
1340
|
-
"text": import_zod92.z.string().describe("The final text that was emitted."),
|
|
1341
|
-
"logprobs": import_zod92.z.array(import_zod92.z.lazy(() => logProbSchema).describe("The log probability of a token.")).describe("The token log probabilities that were emitted with the final text, if any.")
|
|
1342
|
-
}).describe("A streaming event that indicated output text was completed.");
|
|
1343
|
-
|
|
1344
|
-
// src/gen/zod/responseQueuedStreamingEventSchema.ts
|
|
1345
|
-
var import_zod93 = require("zod");
|
|
1346
|
-
var responseQueuedStreamingEventSchema = import_zod93.z.object({
|
|
1347
|
-
"type": import_zod93.z.enum(["response.queued"]).default("response.queued").describe("The type of the event, always `response.queued`."),
|
|
1348
|
-
"sequence_number": import_zod93.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1349
|
-
"response": import_zod93.z.lazy(() => responseResourceSchema).and(import_zod93.z.any())
|
|
1350
|
-
}).describe("A streaming event that indicated the response was queued.");
|
|
1351
|
-
|
|
1352
|
-
// src/gen/zod/responseReasoningDeltaStreamingEventSchema.ts
|
|
1353
|
-
var import_zod94 = require("zod");
|
|
1354
|
-
var responseReasoningDeltaStreamingEventSchema = import_zod94.z.object({
|
|
1355
|
-
"type": import_zod94.z.enum(["response.reasoning.delta"]).default("response.reasoning.delta").describe("The type of the event, always `response.reasoning.delta`."),
|
|
1356
|
-
"sequence_number": import_zod94.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1357
|
-
"item_id": import_zod94.z.string().describe("The ID of the item that was updated."),
|
|
1358
|
-
"output_index": import_zod94.z.number().int().describe("The index of the output item that was updated."),
|
|
1359
|
-
"content_index": import_zod94.z.number().int().describe("The index of the reasoning content that was updated."),
|
|
1360
|
-
"delta": import_zod94.z.string().describe("The reasoning text delta that was appended."),
|
|
1361
|
-
"obfuscation": import_zod94.z.optional(import_zod94.z.string().describe("An obfuscation string that was added to pad the event payload."))
|
|
1362
|
-
}).describe("A streaming event that indicated reasoning text was incrementally added.");
|
|
1363
|
-
|
|
1364
|
-
// src/gen/zod/responseReasoningDoneStreamingEventSchema.ts
|
|
1365
|
-
var import_zod95 = require("zod");
|
|
1366
|
-
var responseReasoningDoneStreamingEventSchema = import_zod95.z.object({
|
|
1367
|
-
"type": import_zod95.z.enum(["response.reasoning.done"]).default("response.reasoning.done").describe("The type of the event, always `response.reasoning.done`."),
|
|
1368
|
-
"sequence_number": import_zod95.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1369
|
-
"item_id": import_zod95.z.string().describe("The ID of the item that was updated."),
|
|
1370
|
-
"output_index": import_zod95.z.number().int().describe("The index of the output item that was updated."),
|
|
1371
|
-
"content_index": import_zod95.z.number().int().describe("The index of the reasoning content that was completed."),
|
|
1372
|
-
"text": import_zod95.z.string().describe("The final reasoning text that was emitted.")
|
|
1373
|
-
}).describe("A streaming event that indicated reasoning text was completed.");
|
|
1374
|
-
|
|
1375
|
-
// src/gen/zod/responseReasoningSummaryDeltaStreamingEventSchema.ts
|
|
1376
|
-
var import_zod96 = require("zod");
|
|
1377
|
-
var responseReasoningSummaryDeltaStreamingEventSchema = import_zod96.z.object({
|
|
1378
|
-
"type": import_zod96.z.enum(["response.reasoning_summary_text.delta"]).default("response.reasoning_summary_text.delta").describe("The type of the event, always `response.reasoning_summary.delta`."),
|
|
1379
|
-
"sequence_number": import_zod96.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1380
|
-
"item_id": import_zod96.z.string().describe("The ID of the item that was updated."),
|
|
1381
|
-
"output_index": import_zod96.z.number().int().describe("The index of the output item that was updated."),
|
|
1382
|
-
"summary_index": import_zod96.z.number().int().describe("The index of the summary content that was updated."),
|
|
1383
|
-
"delta": import_zod96.z.string().describe("The summary text delta that was appended."),
|
|
1384
|
-
"obfuscation": import_zod96.z.optional(import_zod96.z.string().describe("An obfuscation string that was added to pad the event payload."))
|
|
1385
|
-
}).describe("A streaming event that indicated a reasoning summary was incrementally added.");
|
|
1386
|
-
|
|
1387
|
-
// src/gen/zod/responseReasoningSummaryDoneStreamingEventSchema.ts
|
|
1388
|
-
var import_zod97 = require("zod");
|
|
1389
|
-
var responseReasoningSummaryDoneStreamingEventSchema = import_zod97.z.object({
|
|
1390
|
-
"type": import_zod97.z.enum(["response.reasoning_summary_text.done"]).default("response.reasoning_summary_text.done").describe("The type of the event, always `response.reasoning_summary.done`."),
|
|
1391
|
-
"sequence_number": import_zod97.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1392
|
-
"item_id": import_zod97.z.string().describe("The ID of the item that was updated."),
|
|
1393
|
-
"output_index": import_zod97.z.number().int().describe("The index of the output item that was updated."),
|
|
1394
|
-
"summary_index": import_zod97.z.number().int().describe("The index of the summary content that was completed."),
|
|
1395
|
-
"text": import_zod97.z.string().describe("The final summary text that was emitted.")
|
|
1396
|
-
}).describe("A streaming event that indicated a reasoning summary was completed.");
|
|
1397
|
-
|
|
1398
|
-
// src/gen/zod/responseReasoningSummaryPartAddedStreamingEventSchema.ts
|
|
1399
|
-
var import_zod98 = require("zod");
|
|
1400
|
-
var responseReasoningSummaryPartAddedStreamingEventSchema = import_zod98.z.object({
|
|
1401
|
-
"type": import_zod98.z.enum(["response.reasoning_summary_part.added"]).default("response.reasoning_summary_part.added").describe("The type of the event, always `response.reasoning_summary_part.added`."),
|
|
1402
|
-
"sequence_number": import_zod98.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1403
|
-
"item_id": import_zod98.z.string().describe("The ID of the item that was updated."),
|
|
1404
|
-
"output_index": import_zod98.z.number().int().describe("The index of the output item that was updated."),
|
|
1405
|
-
"summary_index": import_zod98.z.number().int().describe("The index of the summary part that was added."),
|
|
1406
|
-
"part": import_zod98.z.union([import_zod98.z.lazy(() => inputTextContentSchema).and(import_zod98.z.object({
|
|
1407
|
-
"type": import_zod98.z.literal("input_text")
|
|
1408
|
-
})), import_zod98.z.lazy(() => outputTextContentSchema).and(import_zod98.z.object({
|
|
1409
|
-
"type": import_zod98.z.literal("output_text")
|
|
1410
|
-
})), import_zod98.z.lazy(() => textContentSchema).and(import_zod98.z.object({
|
|
1411
|
-
"type": import_zod98.z.literal("text")
|
|
1412
|
-
})), import_zod98.z.lazy(() => summaryTextContentSchema).and(import_zod98.z.object({
|
|
1413
|
-
"type": import_zod98.z.literal("summary_text")
|
|
1414
|
-
})), import_zod98.z.lazy(() => reasoningTextContentSchema).and(import_zod98.z.object({
|
|
1415
|
-
"type": import_zod98.z.literal("reasoning_text")
|
|
1416
|
-
})), import_zod98.z.lazy(() => refusalContentSchema).and(import_zod98.z.object({
|
|
1417
|
-
"type": import_zod98.z.literal("refusal")
|
|
1418
|
-
})), import_zod98.z.lazy(() => inputImageContentSchema).and(import_zod98.z.object({
|
|
1419
|
-
"type": import_zod98.z.literal("input_image")
|
|
1420
|
-
})), import_zod98.z.lazy(() => inputFileContentSchema).and(import_zod98.z.object({
|
|
1421
|
-
"type": import_zod98.z.literal("input_file")
|
|
1422
|
-
}))]).describe("A content part that makes up an input or output item.")
|
|
1423
|
-
}).describe("A streaming event that indicated a reasoning summary part was added.");
|
|
1424
|
-
|
|
1425
|
-
// src/gen/zod/responseReasoningSummaryPartDoneStreamingEventSchema.ts
|
|
1426
|
-
var import_zod99 = require("zod");
|
|
1427
|
-
var responseReasoningSummaryPartDoneStreamingEventSchema = import_zod99.z.object({
|
|
1428
|
-
"type": import_zod99.z.enum(["response.reasoning_summary_part.done"]).default("response.reasoning_summary_part.done").describe("The type of the event, always `response.reasoning_summary_part.done`."),
|
|
1429
|
-
"sequence_number": import_zod99.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1430
|
-
"item_id": import_zod99.z.string().describe("The ID of the item that was updated."),
|
|
1431
|
-
"output_index": import_zod99.z.number().int().describe("The index of the output item that was updated."),
|
|
1432
|
-
"summary_index": import_zod99.z.number().int().describe("The index of the summary part that was completed."),
|
|
1433
|
-
"part": import_zod99.z.union([import_zod99.z.lazy(() => inputTextContentSchema).and(import_zod99.z.object({
|
|
1434
|
-
"type": import_zod99.z.literal("input_text")
|
|
1435
|
-
})), import_zod99.z.lazy(() => outputTextContentSchema).and(import_zod99.z.object({
|
|
1436
|
-
"type": import_zod99.z.literal("output_text")
|
|
1437
|
-
})), import_zod99.z.lazy(() => textContentSchema).and(import_zod99.z.object({
|
|
1438
|
-
"type": import_zod99.z.literal("text")
|
|
1439
|
-
})), import_zod99.z.lazy(() => summaryTextContentSchema).and(import_zod99.z.object({
|
|
1440
|
-
"type": import_zod99.z.literal("summary_text")
|
|
1441
|
-
})), import_zod99.z.lazy(() => reasoningTextContentSchema).and(import_zod99.z.object({
|
|
1442
|
-
"type": import_zod99.z.literal("reasoning_text")
|
|
1443
|
-
})), import_zod99.z.lazy(() => refusalContentSchema).and(import_zod99.z.object({
|
|
1444
|
-
"type": import_zod99.z.literal("refusal")
|
|
1445
|
-
})), import_zod99.z.lazy(() => inputImageContentSchema).and(import_zod99.z.object({
|
|
1446
|
-
"type": import_zod99.z.literal("input_image")
|
|
1447
|
-
})), import_zod99.z.lazy(() => inputFileContentSchema).and(import_zod99.z.object({
|
|
1448
|
-
"type": import_zod99.z.literal("input_file")
|
|
1449
|
-
}))]).describe("A content part that makes up an input or output item.")
|
|
1450
|
-
}).describe("A streaming event that indicated a reasoning summary part was completed.");
|
|
1451
|
-
|
|
1452
|
-
// src/gen/zod/responseRefusalDeltaStreamingEventSchema.ts
|
|
1453
|
-
var import_zod100 = require("zod");
|
|
1454
|
-
var responseRefusalDeltaStreamingEventSchema = import_zod100.z.object({
|
|
1455
|
-
"type": import_zod100.z.enum(["response.refusal.delta"]).default("response.refusal.delta").describe("The type of the event, always `response.refusal.delta`."),
|
|
1456
|
-
"sequence_number": import_zod100.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1457
|
-
"item_id": import_zod100.z.string().describe("The ID of the item that was updated."),
|
|
1458
|
-
"output_index": import_zod100.z.number().int().describe("The index of the output item that was updated."),
|
|
1459
|
-
"content_index": import_zod100.z.number().int().describe("The index of the refusal content that was updated."),
|
|
1460
|
-
"delta": import_zod100.z.string().describe("The refusal text delta that was appended.")
|
|
1461
|
-
}).describe("A streaming event that indicated refusal text was incrementally added.");
|
|
1462
|
-
|
|
1463
|
-
// src/gen/zod/responseRefusalDoneStreamingEventSchema.ts
|
|
1464
|
-
var import_zod101 = require("zod");
|
|
1465
|
-
var responseRefusalDoneStreamingEventSchema = import_zod101.z.object({
|
|
1466
|
-
"type": import_zod101.z.enum(["response.refusal.done"]).default("response.refusal.done").describe("The type of the event, always `response.refusal.done`."),
|
|
1467
|
-
"sequence_number": import_zod101.z.number().int().describe("The sequence number of the event that was emitted."),
|
|
1468
|
-
"item_id": import_zod101.z.string().describe("The ID of the item that was updated."),
|
|
1469
|
-
"output_index": import_zod101.z.number().int().describe("The index of the output item that was updated."),
|
|
1470
|
-
"content_index": import_zod101.z.number().int().describe("The index of the refusal content that was completed."),
|
|
1471
|
-
"refusal": import_zod101.z.string().describe("The final refusal text that was emitted.")
|
|
1472
|
-
}).describe("A streaming event that indicated refusal text was completed.");
|
|
1473
|
-
|
|
1474
|
-
// src/gen/zod/systemMessageItemParamSchema.ts
|
|
1475
|
-
var import_zod102 = require("zod");
|
|
1476
|
-
var systemMessageItemParamSchema = import_zod102.z.object({
|
|
1477
|
-
"id": import_zod102.z.optional(import_zod102.z.union([import_zod102.z.string(), import_zod102.z.null()])),
|
|
1478
|
-
"type": import_zod102.z.enum(["message"]).default("message").describe("The item type. Always `message`."),
|
|
1479
|
-
"role": import_zod102.z.enum(["system"]).default("system").describe("The message role. Always `system`."),
|
|
1480
|
-
"content": import_zod102.z.union([import_zod102.z.array(import_zod102.z.lazy(() => inputTextContentParamSchema).and(import_zod102.z.object({
|
|
1481
|
-
"type": import_zod102.z.literal("input_text")
|
|
1482
|
-
}))), import_zod102.z.string()]).describe("The message content, as an array of content parts."),
|
|
1483
|
-
"status": import_zod102.z.optional(import_zod102.z.union([import_zod102.z.string(), import_zod102.z.null()]))
|
|
1484
|
-
});
|
|
1485
|
-
|
|
1486
|
-
// src/gen/zod/userMessageItemParamSchema.ts
|
|
1487
|
-
var import_zod103 = require("zod");
|
|
1488
|
-
var userMessageItemParamSchema = import_zod103.z.object({
|
|
1489
|
-
"id": import_zod103.z.optional(import_zod103.z.union([import_zod103.z.string(), import_zod103.z.null()])),
|
|
1490
|
-
"type": import_zod103.z.enum(["message"]).default("message").describe("The item type. Always `message`."),
|
|
1491
|
-
"role": import_zod103.z.enum(["user"]).default("user").describe("The message role. Always `user`."),
|
|
1492
|
-
"content": import_zod103.z.union([import_zod103.z.array(import_zod103.z.union([import_zod103.z.lazy(() => inputTextContentParamSchema).and(import_zod103.z.object({
|
|
1493
|
-
"type": import_zod103.z.literal("input_text")
|
|
1494
|
-
})), import_zod103.z.lazy(() => inputImageContentParamAutoParamSchema).and(import_zod103.z.object({
|
|
1495
|
-
"type": import_zod103.z.literal("input_image")
|
|
1496
|
-
})), import_zod103.z.lazy(() => inputFileContentParamSchema).and(import_zod103.z.object({
|
|
1497
|
-
"type": import_zod103.z.literal("input_file")
|
|
1498
|
-
}))]).describe("A piece of message content, such as text, an image, or a file.")), import_zod103.z.string()]).describe("The message content, as an array of content parts."),
|
|
1499
|
-
"status": import_zod103.z.optional(import_zod103.z.union([import_zod103.z.string(), import_zod103.z.null()]))
|
|
1500
|
-
});
|
|
1285
|
+
// src/core/tool.ts
|
|
1286
|
+
function tool(def) {
|
|
1287
|
+
return def;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
// src/core/generate.ts
|
|
1291
|
+
async function generateText({
|
|
1292
|
+
adapter,
|
|
1293
|
+
...options
|
|
1294
|
+
}) {
|
|
1295
|
+
const { model, tools, maxSteps = 1, temperature, maxTokens, signal } = options;
|
|
1296
|
+
const currentMessages = [...options.messages];
|
|
1297
|
+
let steps = 0;
|
|
1298
|
+
const toolDefinitions = tools ? Object.values(tools) : void 0;
|
|
1299
|
+
while (steps < maxSteps) {
|
|
1300
|
+
steps++;
|
|
1301
|
+
const result = await adapter.chat({
|
|
1302
|
+
model,
|
|
1303
|
+
messages: currentMessages,
|
|
1304
|
+
tools: toolDefinitions,
|
|
1305
|
+
temperature,
|
|
1306
|
+
maxTokens,
|
|
1307
|
+
signal
|
|
1308
|
+
});
|
|
1309
|
+
const { message } = result;
|
|
1310
|
+
currentMessages.push(message);
|
|
1311
|
+
if (!message.toolCalls || message.toolCalls.length === 0) {
|
|
1312
|
+
return {
|
|
1313
|
+
text: typeof message.content === "string" ? message.content || "" : Array.isArray(message.content) ? message.content.filter((p) => p.type === "text").map((p) => p.text).join("") : "",
|
|
1314
|
+
toolCalls: [],
|
|
1315
|
+
toolResults: [],
|
|
1316
|
+
finishReason: "stop",
|
|
1317
|
+
usage: result.usage || { promptTokens: 0, completionTokens: 0, totalTokens: 0 }
|
|
1318
|
+
};
|
|
1319
|
+
}
|
|
1320
|
+
const toolResults = await Promise.all(
|
|
1321
|
+
message.toolCalls.map(async (call) => {
|
|
1322
|
+
const tool2 = tools?.[call.function.name];
|
|
1323
|
+
if (!tool2) {
|
|
1324
|
+
return {
|
|
1325
|
+
id: call.id,
|
|
1326
|
+
result: `Error: Tool ${call.function.name} not found`
|
|
1327
|
+
};
|
|
1328
|
+
}
|
|
1329
|
+
try {
|
|
1330
|
+
const args = JSON.parse(call.function.arguments);
|
|
1331
|
+
const output = await tool2.execute(args);
|
|
1332
|
+
return {
|
|
1333
|
+
id: call.id,
|
|
1334
|
+
result: output
|
|
1335
|
+
};
|
|
1336
|
+
} catch (error) {
|
|
1337
|
+
return {
|
|
1338
|
+
id: call.id,
|
|
1339
|
+
result: `Error executing tool: ${error.message}`
|
|
1340
|
+
};
|
|
1341
|
+
}
|
|
1342
|
+
})
|
|
1343
|
+
);
|
|
1344
|
+
for (const res of toolResults) {
|
|
1345
|
+
currentMessages.push({
|
|
1346
|
+
role: "tool",
|
|
1347
|
+
content: JSON.stringify(res.result),
|
|
1348
|
+
toolCallId: res.id,
|
|
1349
|
+
name: message.toolCalls.find((c) => c.id === res.id)?.function.name
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
return {
|
|
1354
|
+
text: "",
|
|
1355
|
+
toolCalls: [],
|
|
1356
|
+
toolResults: [],
|
|
1357
|
+
finishReason: "length",
|
|
1358
|
+
// or 'tool_calls' if strictly ending on tools
|
|
1359
|
+
usage: { promptTokens: 0, completionTokens: 0, totalTokens: 0 },
|
|
1360
|
+
warnings: ["Max steps reached"]
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
// src/core/utils.ts
|
|
1365
|
+
var fileToBase64 = (file) => {
|
|
1366
|
+
return new Promise((resolve, reject) => {
|
|
1367
|
+
const reader = new FileReader();
|
|
1368
|
+
reader.readAsDataURL(file);
|
|
1369
|
+
reader.onload = () => resolve(reader.result);
|
|
1370
|
+
reader.onerror = (error) => reject(error);
|
|
1371
|
+
});
|
|
1372
|
+
};
|
|
1373
|
+
var parseThinking = (content) => {
|
|
1374
|
+
const thinkRegex = /<think>([\s\S]*?)<\/think>/;
|
|
1375
|
+
const match = content.match(thinkRegex);
|
|
1376
|
+
if (match) {
|
|
1377
|
+
return {
|
|
1378
|
+
think: match[1],
|
|
1379
|
+
rest: content.replace(thinkRegex, "").trim()
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
if (content.startsWith("<think>")) {
|
|
1383
|
+
return {
|
|
1384
|
+
think: content.replace("<think>", ""),
|
|
1385
|
+
rest: ""
|
|
1386
|
+
// Still thinking
|
|
1387
|
+
};
|
|
1388
|
+
}
|
|
1389
|
+
return { think: null, rest: content };
|
|
1390
|
+
};
|
|
1501
1391
|
|
|
1502
|
-
// src/
|
|
1503
|
-
var
|
|
1504
|
-
constructor(
|
|
1505
|
-
this.
|
|
1392
|
+
// src/namespaces/text.ts
|
|
1393
|
+
var TextNamespace = class {
|
|
1394
|
+
constructor(provider) {
|
|
1395
|
+
this.provider = provider;
|
|
1506
1396
|
}
|
|
1507
1397
|
/**
|
|
1508
|
-
*
|
|
1398
|
+
* Generate text from a prompt (Chat Completion).
|
|
1509
1399
|
*/
|
|
1510
|
-
|
|
1511
|
-
return this.
|
|
1400
|
+
async generate(options) {
|
|
1401
|
+
return this.provider.chat(options);
|
|
1512
1402
|
}
|
|
1513
1403
|
/**
|
|
1514
|
-
*
|
|
1515
|
-
* It looks for the first "output_text" item in the response content.
|
|
1404
|
+
* Stream text generation.
|
|
1516
1405
|
*/
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1406
|
+
async *generateStream(options) {
|
|
1407
|
+
for await (const chunk of this.provider.chatStream(options)) {
|
|
1408
|
+
yield chunk;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
// Alias for 'chat' to match OpenAI conventions if needed
|
|
1412
|
+
get chat() {
|
|
1413
|
+
return {
|
|
1414
|
+
completions: {
|
|
1415
|
+
create: (options) => this.generate(options),
|
|
1416
|
+
createStream: (options) => this.generateStream(options)
|
|
1526
1417
|
}
|
|
1418
|
+
};
|
|
1419
|
+
}
|
|
1420
|
+
};
|
|
1421
|
+
|
|
1422
|
+
// src/namespaces/images.ts
|
|
1423
|
+
var ImagesNamespace = class {
|
|
1424
|
+
constructor(provider) {
|
|
1425
|
+
this.provider = provider;
|
|
1426
|
+
}
|
|
1427
|
+
/**
|
|
1428
|
+
* Generate images from a prompt.
|
|
1429
|
+
*/
|
|
1430
|
+
async generate(options) {
|
|
1431
|
+
if (!this.provider.generateImage) {
|
|
1432
|
+
throw new Error(`Provider '${this.provider.name}' does not support image generation`);
|
|
1527
1433
|
}
|
|
1528
|
-
return
|
|
1434
|
+
return this.provider.generateImage(options);
|
|
1529
1435
|
}
|
|
1530
1436
|
/**
|
|
1531
|
-
*
|
|
1437
|
+
* Edit an image with a prompt.
|
|
1532
1438
|
*/
|
|
1533
|
-
|
|
1534
|
-
|
|
1439
|
+
async edit(options) {
|
|
1440
|
+
if (!this.provider.editImage) {
|
|
1441
|
+
throw new Error(`Provider '${this.provider.name}' does not support image editing`);
|
|
1442
|
+
}
|
|
1443
|
+
return this.provider.editImage(options);
|
|
1535
1444
|
}
|
|
1536
1445
|
/**
|
|
1537
|
-
*
|
|
1446
|
+
* Analyze an image (Vision).
|
|
1538
1447
|
*/
|
|
1539
|
-
|
|
1540
|
-
|
|
1448
|
+
async analyze(options) {
|
|
1449
|
+
if (!this.provider.analyzeImage) {
|
|
1450
|
+
throw new Error(`Provider '${this.provider.name}' does not support image analysis`);
|
|
1451
|
+
}
|
|
1452
|
+
return this.provider.analyzeImage(options);
|
|
1541
1453
|
}
|
|
1542
1454
|
};
|
|
1543
|
-
|
|
1455
|
+
|
|
1456
|
+
// src/namespaces/audio.ts
|
|
1457
|
+
var AudioNamespace = class {
|
|
1458
|
+
constructor(provider) {
|
|
1459
|
+
this.provider = provider;
|
|
1460
|
+
}
|
|
1544
1461
|
/**
|
|
1545
|
-
*
|
|
1546
|
-
*
|
|
1547
|
-
* @param options - Configuration options for the client.
|
|
1548
|
-
* @param options.baseUrl - The base URL of the API (default: "https://api.tekimax.com").
|
|
1549
|
-
* @param options.apiKey - Your Tekimax API key.
|
|
1550
|
-
*
|
|
1551
|
-
* @example
|
|
1552
|
-
* const client = new TekimaxClient({ apiKey: "tm_..." });
|
|
1462
|
+
* Convert text to speech.
|
|
1553
1463
|
*/
|
|
1554
|
-
|
|
1555
|
-
this.
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
};
|
|
1464
|
+
async speak(options) {
|
|
1465
|
+
if (!this.provider.generateSpeech) {
|
|
1466
|
+
throw new Error(`Provider '${this.provider.name}' does not support speech generation`);
|
|
1467
|
+
}
|
|
1468
|
+
return this.provider.generateSpeech(options);
|
|
1560
1469
|
}
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1470
|
+
};
|
|
1471
|
+
|
|
1472
|
+
// src/namespaces/videos.ts
|
|
1473
|
+
var VideosNamespace = class {
|
|
1474
|
+
constructor(provider) {
|
|
1475
|
+
this.provider = provider;
|
|
1476
|
+
}
|
|
1477
|
+
/**
|
|
1478
|
+
* Generate a video from a prompt.
|
|
1479
|
+
*/
|
|
1480
|
+
async generate(options) {
|
|
1481
|
+
if (!this.provider.generateVideo) {
|
|
1482
|
+
throw new Error(`Provider '${this.provider.name}' does not support video generation`);
|
|
1569
1483
|
}
|
|
1570
|
-
|
|
1571
|
-
return new TekimaxResponse(data);
|
|
1484
|
+
return this.provider.generateVideo(options);
|
|
1572
1485
|
}
|
|
1573
1486
|
/**
|
|
1574
|
-
*
|
|
1575
|
-
*
|
|
1576
|
-
* @param message - The initial message text to start the session.
|
|
1577
|
-
* @param options - Additional configuration options (model, temperature, etc.).
|
|
1578
|
-
*
|
|
1579
|
-
* @example
|
|
1580
|
-
* const response = await client.createSession("Hello, world!", { model: "gpt-4" });
|
|
1581
|
-
* console.log(response.text);
|
|
1487
|
+
* Analyze a video (Video-to-Text).
|
|
1582
1488
|
*/
|
|
1583
|
-
async
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1489
|
+
async analyze(options) {
|
|
1490
|
+
if (!this.provider.analyzeVideo) {
|
|
1491
|
+
throw new Error(`Provider '${this.provider.name}' does not support video analysis`);
|
|
1492
|
+
}
|
|
1493
|
+
return this.provider.analyzeVideo(options);
|
|
1494
|
+
}
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1497
|
+
// src/tekimax.ts
|
|
1498
|
+
var Tekimax = class {
|
|
1499
|
+
constructor(options) {
|
|
1500
|
+
this.provider = options.provider;
|
|
1501
|
+
this.text = new TextNamespace(this.provider);
|
|
1502
|
+
this.images = new ImagesNamespace(this.provider);
|
|
1503
|
+
this.audio = new AudioNamespace(this.provider);
|
|
1504
|
+
this.videos = new VideosNamespace(this.provider);
|
|
1589
1505
|
}
|
|
1590
1506
|
/**
|
|
1591
|
-
*
|
|
1592
|
-
*
|
|
1593
|
-
* @param message - The message text to send.
|
|
1594
|
-
* @param options - Additional configuration options.
|
|
1595
|
-
*
|
|
1596
|
-
* @example
|
|
1597
|
-
* const response = await client.sendMessage("What is the weather?", {
|
|
1598
|
-
* previous_response_id: "resp_123"
|
|
1599
|
-
* });
|
|
1600
|
-
* console.log(response.text);
|
|
1507
|
+
* @deprecated Use client.text.chat instead. Kept for backward compatibility.
|
|
1601
1508
|
*/
|
|
1602
|
-
|
|
1603
|
-
return this.
|
|
1509
|
+
get chat() {
|
|
1510
|
+
return this.text.chat;
|
|
1604
1511
|
}
|
|
1605
1512
|
};
|
|
1606
|
-
|
|
1607
|
-
|
|
1513
|
+
export {
|
|
1514
|
+
AnthropicProvider,
|
|
1515
|
+
types_exports as ApiTypes,
|
|
1516
|
+
GeminiProvider,
|
|
1517
|
+
GrokProvider,
|
|
1518
|
+
OllamaProvider,
|
|
1519
|
+
OpenAIProvider,
|
|
1520
|
+
OpenRouterProvider,
|
|
1521
|
+
Tekimax,
|
|
1608
1522
|
TekimaxClient,
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
assistantMessageItemParamRoleEnum,
|
|
1616
|
-
assistantMessageItemParamSchema,
|
|
1617
|
-
assistantMessageItemParamTypeEnum,
|
|
1618
|
-
createResponseBodySchema,
|
|
1619
|
-
createresponse200Schema,
|
|
1620
|
-
createresponseMutationRequestSchema,
|
|
1621
|
-
createresponseMutationResponseSchema,
|
|
1622
|
-
detailEnumEnum,
|
|
1623
|
-
detailEnumSchema,
|
|
1624
|
-
developerMessageItemParamRoleEnum,
|
|
1625
|
-
developerMessageItemParamSchema,
|
|
1626
|
-
developerMessageItemParamTypeEnum,
|
|
1627
|
-
emptyModelParamSchema,
|
|
1628
|
-
errorPayloadSchema,
|
|
1629
|
-
errorSchema,
|
|
1630
|
-
errorStreamingEventSchema,
|
|
1631
|
-
errorStreamingEventTypeEnum,
|
|
1632
|
-
functionCallItemParamSchema,
|
|
1633
|
-
functionCallItemParamTypeEnum,
|
|
1634
|
-
functionCallItemStatusEnum,
|
|
1635
|
-
functionCallItemStatusSchema,
|
|
1636
|
-
functionCallOutputItemParamSchema,
|
|
1637
|
-
functionCallOutputItemParamTypeEnum,
|
|
1638
|
-
functionCallOutputSchema,
|
|
1639
|
-
functionCallOutputStatusEnumEnum,
|
|
1640
|
-
functionCallOutputStatusEnumSchema,
|
|
1641
|
-
functionCallOutputTypeEnum,
|
|
1642
|
-
functionCallSchema,
|
|
1643
|
-
functionCallStatusEnum,
|
|
1644
|
-
functionCallStatusSchema,
|
|
1645
|
-
functionCallTypeEnum,
|
|
1646
|
-
functionToolChoiceSchema,
|
|
1647
|
-
functionToolChoiceTypeEnum,
|
|
1648
|
-
functionToolParamSchema,
|
|
1649
|
-
functionToolParamTypeEnum,
|
|
1650
|
-
functionToolSchema,
|
|
1651
|
-
functionToolTypeEnum,
|
|
1652
|
-
imageDetailEnum,
|
|
1653
|
-
imageDetailSchema,
|
|
1654
|
-
includeEnumEnum,
|
|
1655
|
-
includeEnumSchema,
|
|
1656
|
-
incompleteDetailsSchema,
|
|
1657
|
-
inputFileContentParamSchema,
|
|
1658
|
-
inputFileContentParamTypeEnum,
|
|
1659
|
-
inputFileContentSchema,
|
|
1660
|
-
inputFileContentTypeEnum,
|
|
1661
|
-
inputImageContentParamAutoParamSchema,
|
|
1662
|
-
inputImageContentParamAutoParamTypeEnum,
|
|
1663
|
-
inputImageContentSchema,
|
|
1664
|
-
inputImageContentTypeEnum,
|
|
1665
|
-
inputTextContentParamSchema,
|
|
1666
|
-
inputTextContentParamTypeEnum,
|
|
1667
|
-
inputTextContentSchema,
|
|
1668
|
-
inputTextContentTypeEnum,
|
|
1669
|
-
inputTokensDetailsSchema,
|
|
1670
|
-
inputVideoContentSchema,
|
|
1671
|
-
inputVideoContentTypeEnum,
|
|
1672
|
-
itemFieldSchema,
|
|
1673
|
-
itemParamSchema,
|
|
1674
|
-
itemReferenceParamSchema,
|
|
1675
|
-
itemReferenceParamTypeEnum,
|
|
1676
|
-
jsonObjectResponseFormatSchema,
|
|
1677
|
-
jsonObjectResponseFormatTypeEnum,
|
|
1678
|
-
jsonSchemaResponseFormatParamSchema,
|
|
1679
|
-
jsonSchemaResponseFormatParamTypeEnum,
|
|
1680
|
-
jsonSchemaResponseFormatSchema,
|
|
1681
|
-
jsonSchemaResponseFormatTypeEnum,
|
|
1682
|
-
logProbSchema,
|
|
1683
|
-
messageRoleEnum,
|
|
1684
|
-
messageRoleSchema,
|
|
1685
|
-
messageSchema,
|
|
1686
|
-
messageStatusEnum,
|
|
1687
|
-
messageStatusSchema,
|
|
1688
|
-
messageTypeEnum,
|
|
1689
|
-
metadataParamSchema,
|
|
1690
|
-
outputTextContentParamSchema,
|
|
1691
|
-
outputTextContentParamTypeEnum,
|
|
1692
|
-
outputTextContentSchema,
|
|
1693
|
-
outputTextContentTypeEnum,
|
|
1694
|
-
outputTokensDetailsSchema,
|
|
1695
|
-
reasoningBodySchema,
|
|
1696
|
-
reasoningBodyTypeEnum,
|
|
1697
|
-
reasoningEffortEnumEnum,
|
|
1698
|
-
reasoningEffortEnumSchema,
|
|
1699
|
-
reasoningItemParamSchema,
|
|
1700
|
-
reasoningItemParamTypeEnum,
|
|
1701
|
-
reasoningParamSchema,
|
|
1702
|
-
reasoningSchema,
|
|
1703
|
-
reasoningSummaryContentParamSchema,
|
|
1704
|
-
reasoningSummaryContentParamTypeEnum,
|
|
1705
|
-
reasoningSummaryEnumEnum,
|
|
1706
|
-
reasoningSummaryEnumSchema,
|
|
1707
|
-
reasoningTextContentSchema,
|
|
1708
|
-
reasoningTextContentTypeEnum,
|
|
1709
|
-
refusalContentParamSchema,
|
|
1710
|
-
refusalContentParamTypeEnum,
|
|
1711
|
-
refusalContentSchema,
|
|
1712
|
-
refusalContentTypeEnum,
|
|
1713
|
-
responseCompletedStreamingEventSchema,
|
|
1714
|
-
responseCompletedStreamingEventTypeEnum,
|
|
1715
|
-
responseContentPartAddedStreamingEventSchema,
|
|
1716
|
-
responseContentPartAddedStreamingEventTypeEnum,
|
|
1717
|
-
responseContentPartDoneStreamingEventSchema,
|
|
1718
|
-
responseContentPartDoneStreamingEventTypeEnum,
|
|
1719
|
-
responseCreatedStreamingEventSchema,
|
|
1720
|
-
responseCreatedStreamingEventTypeEnum,
|
|
1721
|
-
responseFailedStreamingEventSchema,
|
|
1722
|
-
responseFailedStreamingEventTypeEnum,
|
|
1723
|
-
responseFunctionCallArgumentsDeltaStreamingEventSchema,
|
|
1724
|
-
responseFunctionCallArgumentsDeltaStreamingEventTypeEnum,
|
|
1725
|
-
responseFunctionCallArgumentsDoneStreamingEventSchema,
|
|
1726
|
-
responseFunctionCallArgumentsDoneStreamingEventTypeEnum,
|
|
1727
|
-
responseInProgressStreamingEventSchema,
|
|
1728
|
-
responseInProgressStreamingEventTypeEnum,
|
|
1729
|
-
responseIncompleteStreamingEventSchema,
|
|
1730
|
-
responseIncompleteStreamingEventTypeEnum,
|
|
1731
|
-
responseOutputItemAddedStreamingEventSchema,
|
|
1732
|
-
responseOutputItemAddedStreamingEventTypeEnum,
|
|
1733
|
-
responseOutputItemDoneStreamingEventSchema,
|
|
1734
|
-
responseOutputItemDoneStreamingEventTypeEnum,
|
|
1735
|
-
responseOutputTextAnnotationAddedStreamingEventSchema,
|
|
1736
|
-
responseOutputTextAnnotationAddedStreamingEventTypeEnum,
|
|
1737
|
-
responseOutputTextDeltaStreamingEventSchema,
|
|
1738
|
-
responseOutputTextDeltaStreamingEventTypeEnum,
|
|
1739
|
-
responseOutputTextDoneStreamingEventSchema,
|
|
1740
|
-
responseOutputTextDoneStreamingEventTypeEnum,
|
|
1741
|
-
responseQueuedStreamingEventSchema,
|
|
1742
|
-
responseQueuedStreamingEventTypeEnum,
|
|
1743
|
-
responseReasoningDeltaStreamingEventSchema,
|
|
1744
|
-
responseReasoningDeltaStreamingEventTypeEnum,
|
|
1745
|
-
responseReasoningDoneStreamingEventSchema,
|
|
1746
|
-
responseReasoningDoneStreamingEventTypeEnum,
|
|
1747
|
-
responseReasoningSummaryDeltaStreamingEventSchema,
|
|
1748
|
-
responseReasoningSummaryDeltaStreamingEventTypeEnum,
|
|
1749
|
-
responseReasoningSummaryDoneStreamingEventSchema,
|
|
1750
|
-
responseReasoningSummaryDoneStreamingEventTypeEnum,
|
|
1751
|
-
responseReasoningSummaryPartAddedStreamingEventSchema,
|
|
1752
|
-
responseReasoningSummaryPartAddedStreamingEventTypeEnum,
|
|
1753
|
-
responseReasoningSummaryPartDoneStreamingEventSchema,
|
|
1754
|
-
responseReasoningSummaryPartDoneStreamingEventTypeEnum,
|
|
1755
|
-
responseRefusalDeltaStreamingEventSchema,
|
|
1756
|
-
responseRefusalDeltaStreamingEventTypeEnum,
|
|
1757
|
-
responseRefusalDoneStreamingEventSchema,
|
|
1758
|
-
responseRefusalDoneStreamingEventTypeEnum,
|
|
1759
|
-
responseResourceObjectEnum,
|
|
1760
|
-
responseResourceSchema,
|
|
1761
|
-
responsesToolParamSchema,
|
|
1762
|
-
serviceTierEnumEnum,
|
|
1763
|
-
serviceTierEnumSchema,
|
|
1764
|
-
specificFunctionParamSchema,
|
|
1765
|
-
specificFunctionParamTypeEnum,
|
|
1766
|
-
specificToolChoiceParamSchema,
|
|
1767
|
-
streamOptionsParamSchema,
|
|
1768
|
-
summaryTextContentSchema,
|
|
1769
|
-
summaryTextContentTypeEnum,
|
|
1770
|
-
systemMessageItemParamRoleEnum,
|
|
1771
|
-
systemMessageItemParamSchema,
|
|
1772
|
-
systemMessageItemParamTypeEnum,
|
|
1773
|
-
textContentSchema,
|
|
1774
|
-
textContentTypeEnum,
|
|
1775
|
-
textFieldSchema,
|
|
1776
|
-
textFormatParamSchema,
|
|
1777
|
-
textParamSchema,
|
|
1778
|
-
textResponseFormatSchema,
|
|
1779
|
-
textResponseFormatTypeEnum,
|
|
1780
|
-
toolChoiceParamSchema,
|
|
1781
|
-
toolChoiceValueEnumEnum,
|
|
1782
|
-
toolChoiceValueEnumSchema,
|
|
1783
|
-
toolSchema,
|
|
1784
|
-
topLogProbSchema,
|
|
1785
|
-
truncationEnumEnum,
|
|
1786
|
-
truncationEnumSchema,
|
|
1787
|
-
urlCitationBodySchema,
|
|
1788
|
-
urlCitationBodyTypeEnum,
|
|
1789
|
-
urlCitationParamSchema,
|
|
1790
|
-
urlCitationParamTypeEnum,
|
|
1791
|
-
usageSchema,
|
|
1792
|
-
userMessageItemParamRoleEnum,
|
|
1793
|
-
userMessageItemParamSchema,
|
|
1794
|
-
userMessageItemParamTypeEnum,
|
|
1795
|
-
verbosityEnumEnum,
|
|
1796
|
-
verbosityEnumSchema
|
|
1797
|
-
});
|
|
1523
|
+
TekimaxProvider,
|
|
1524
|
+
fileToBase64,
|
|
1525
|
+
generateText,
|
|
1526
|
+
parseThinking,
|
|
1527
|
+
tool
|
|
1528
|
+
};
|