@orq-ai/node 3.14.4 → 3.14.5
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/bin/mcp-server.js +209 -209
- package/bin/mcp-server.js.map +35 -35
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.js +10 -10
- package/models/operations/duplicatetool.js +10 -10
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getalltools.js +10 -10
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +10 -10
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatetool.js +10 -10
- package/package.json +1 -1
- package/packages/orq-rc/README.md +21 -173
- package/packages/orq-rc/docs/sdks/evals/README.md +1 -2767
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +1 -77
- package/packages/orq-rc/src/models/errors/index.ts +0 -38
- package/packages/orq-rc/src/models/operations/createagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +48 -57
- package/packages/orq-rc/src/models/operations/createknowledge.ts +47 -61
- package/packages/orq-rc/src/models/operations/createprompt.ts +4 -4
- package/packages/orq-rc/src/models/operations/createtool.ts +172 -144
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +920 -1129
- package/packages/orq-rc/src/models/operations/deployments.ts +53 -53
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +52 -73
- package/packages/orq-rc/src/models/operations/duplicatetool.ts +10 -10
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getalltools.ts +10 -10
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/index.ts +0 -38
- package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievetool.ts +10 -10
- package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/updateprompt.ts +4 -4
- package/packages/orq-rc/src/models/operations/updatetool.ts +168 -161
- package/packages/orq-rc/src/sdk/evals.ts +0 -570
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +10 -10
- package/src/models/operations/duplicatetool.ts +10 -10
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getalltools.ts +10 -10
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +10 -10
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatetool.ts +10 -10
- package/packages/orq-rc/src/funcs/evalsAgeAppropriate.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsBertScore.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsBleuScore.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsBotDetection.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContains.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsAll.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsAny.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsEmail.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsNone.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsUrl.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsValidLink.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsEndsWith.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsExactMatch.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsFactCheckingKnowledgeBase.ts +0 -183
- package/packages/orq-rc/src/funcs/evalsGrammar.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsLengthBetween.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsLengthGreaterThan.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsLengthLessThan.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsLocalization.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsPii.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsRagasCoherence.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsRagasConciseness.ts +0 -174
- package/packages/orq-rc/src/funcs/evalsRagasContextEntitiesRecall.ts +0 -183
- package/packages/orq-rc/src/funcs/evalsRagasContextPrecision.ts +0 -180
- package/packages/orq-rc/src/funcs/evalsRagasContextRecall.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsRagasCorrectness.ts +0 -174
- package/packages/orq-rc/src/funcs/evalsRagasFaithfulness.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsRagasHarmfulness.ts +0 -174
- package/packages/orq-rc/src/funcs/evalsRagasMaliciousness.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsRagasNoiseSensitivity.ts +0 -180
- package/packages/orq-rc/src/funcs/evalsRagasResponseRelevancy.ts +0 -183
- package/packages/orq-rc/src/funcs/evalsRagasSummarization.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsSentimentClassification.ts +0 -183
- package/packages/orq-rc/src/funcs/evalsSummarization.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsToneOfVoice.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsTranslation.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsValidJson.ts +0 -175
- package/packages/orq-rc/src/mcp-server/tools/evalsAgeAppropriate.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsBertScore.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsBleuScore.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsBotDetection.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContains.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsAll.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsAny.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsEmail.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsNone.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsUrl.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsValidLink.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsEndsWith.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsExactMatch.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsFactCheckingKnowledgeBase.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/evalsGrammar.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsInvoke.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthBetween.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthGreaterThan.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthLessThan.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsLocalization.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsPii.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasCoherence.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasConciseness.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextEntitiesRecall.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextPrecision.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextRecall.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasCorrectness.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasFaithfulness.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasHarmfulness.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasMaliciousness.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasNoiseSensitivity.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasResponseRelevancy.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasSummarization.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsSentimentClassification.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsSummarization.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsToneOfVoice.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsTranslation.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsValidJson.ts +0 -35
- package/packages/orq-rc/src/models/errors/evalsageappropriate.ts +0 -156
- package/packages/orq-rc/src/models/errors/evalsbertscore.ts +0 -154
- package/packages/orq-rc/src/models/errors/evalsbleuscore.ts +0 -154
- package/packages/orq-rc/src/models/errors/evalsbotdetection.ts +0 -155
- package/packages/orq-rc/src/models/errors/evalscontains.ts +0 -154
- package/packages/orq-rc/src/models/errors/evalscontainsall.ts +0 -155
- package/packages/orq-rc/src/models/errors/evalscontainsany.ts +0 -155
- package/packages/orq-rc/src/models/errors/evalscontainsemail.ts +0 -156
- package/packages/orq-rc/src/models/errors/evalscontainsnone.ts +0 -155
- package/packages/orq-rc/src/models/errors/evalscontainsurl.ts +0 -155
- package/packages/orq-rc/src/models/errors/evalscontainsvalidlink.ts +0 -157
- package/packages/orq-rc/src/models/errors/evalsendswith.ts +0 -154
- package/packages/orq-rc/src/models/errors/evalsexactmatch.ts +0 -154
- package/packages/orq-rc/src/models/errors/evalsfactcheckingknowledgebase.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalsgrammar.ts +0 -154
- package/packages/orq-rc/src/models/errors/evalslengthbetween.ts +0 -156
- package/packages/orq-rc/src/models/errors/evalslengthgreaterthan.ts +0 -157
- package/packages/orq-rc/src/models/errors/evalslengthlessthan.ts +0 -156
- package/packages/orq-rc/src/models/errors/evalslocalization.ts +0 -155
- package/packages/orq-rc/src/models/errors/evalspii.ts +0 -154
- package/packages/orq-rc/src/models/errors/evalsragascoherence.ts +0 -156
- package/packages/orq-rc/src/models/errors/evalsragasconciseness.ts +0 -157
- package/packages/orq-rc/src/models/errors/evalsragascontextentitiesrecall.ts +0 -163
- package/packages/orq-rc/src/models/errors/evalsragascontextprecision.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalsragascontextrecall.ts +0 -158
- package/packages/orq-rc/src/models/errors/evalsragascorrectness.ts +0 -157
- package/packages/orq-rc/src/models/errors/evalsragasfaithfulness.ts +0 -157
- package/packages/orq-rc/src/models/errors/evalsragasharmfulness.ts +0 -157
- package/packages/orq-rc/src/models/errors/evalsragasmaliciousness.ts +0 -158
- package/packages/orq-rc/src/models/errors/evalsragasnoisesensitivity.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalsragasresponserelevancy.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalsragassummarization.ts +0 -158
- package/packages/orq-rc/src/models/errors/evalssentimentclassification.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalssummarization.ts +0 -156
- package/packages/orq-rc/src/models/errors/evalstoneofvoice.ts +0 -155
- package/packages/orq-rc/src/models/errors/evalstranslation.ts +0 -155
- package/packages/orq-rc/src/models/errors/evalsvalidjson.ts +0 -154
- package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -154
- package/packages/orq-rc/src/models/operations/evalsageappropriate.ts +0 -320
- package/packages/orq-rc/src/models/operations/evalsbertscore.ts +0 -197
- package/packages/orq-rc/src/models/operations/evalsbleuscore.ts +0 -131
- package/packages/orq-rc/src/models/operations/evalsbotdetection.ts +0 -322
- package/packages/orq-rc/src/models/operations/evalscontains.ts +0 -250
- package/packages/orq-rc/src/models/operations/evalscontainsall.ts +0 -248
- package/packages/orq-rc/src/models/operations/evalscontainsany.ts +0 -254
- package/packages/orq-rc/src/models/operations/evalscontainsemail.ts +0 -181
- package/packages/orq-rc/src/models/operations/evalscontainsnone.ts +0 -254
- package/packages/orq-rc/src/models/operations/evalscontainsurl.ts +0 -181
- package/packages/orq-rc/src/models/operations/evalscontainsvalidlink.ts +0 -186
- package/packages/orq-rc/src/models/operations/evalsendswith.ts +0 -250
- package/packages/orq-rc/src/models/operations/evalsexactmatch.ts +0 -183
- package/packages/orq-rc/src/models/operations/evalsfactcheckingknowledgebase.ts +0 -389
- package/packages/orq-rc/src/models/operations/evalsgrammar.ts +0 -314
- package/packages/orq-rc/src/models/operations/evalslengthbetween.ts +0 -268
- package/packages/orq-rc/src/models/operations/evalslengthgreaterthan.ts +0 -266
- package/packages/orq-rc/src/models/operations/evalslengthlessthan.ts +0 -259
- package/packages/orq-rc/src/models/operations/evalslocalization.ts +0 -326
- package/packages/orq-rc/src/models/operations/evalspii.ts +0 -314
- package/packages/orq-rc/src/models/operations/evalsragascoherence.ts +0 -152
- package/packages/orq-rc/src/models/operations/evalsragasconciseness.ts +0 -153
- package/packages/orq-rc/src/models/operations/evalsragascontextentitiesrecall.ts +0 -164
- package/packages/orq-rc/src/models/operations/evalsragascontextprecision.ts +0 -166
- package/packages/orq-rc/src/models/operations/evalsragascontextrecall.ts +0 -164
- package/packages/orq-rc/src/models/operations/evalsragascorrectness.ts +0 -153
- package/packages/orq-rc/src/models/operations/evalsragasfaithfulness.ts +0 -155
- package/packages/orq-rc/src/models/operations/evalsragasharmfulness.ts +0 -146
- package/packages/orq-rc/src/models/operations/evalsragasmaliciousness.ts +0 -157
- package/packages/orq-rc/src/models/operations/evalsragasnoisesensitivity.ts +0 -166
- package/packages/orq-rc/src/models/operations/evalsragasresponserelevancy.ts +0 -165
- package/packages/orq-rc/src/models/operations/evalsragassummarization.ts +0 -150
- package/packages/orq-rc/src/models/operations/evalssentimentclassification.ts +0 -374
- package/packages/orq-rc/src/models/operations/evalssummarization.ts +0 -329
- package/packages/orq-rc/src/models/operations/evalstoneofvoice.ts +0 -324
- package/packages/orq-rc/src/models/operations/evalstranslation.ts +0 -324
- package/packages/orq-rc/src/models/operations/evalsvalidjson.ts +0 -177
- package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -2551
|
@@ -1,2551 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The role of the prompt message
|
|
14
|
-
*/
|
|
15
|
-
export const Role = {
|
|
16
|
-
System: "system",
|
|
17
|
-
Assistant: "assistant",
|
|
18
|
-
User: "user",
|
|
19
|
-
Exception: "exception",
|
|
20
|
-
Tool: "tool",
|
|
21
|
-
Prompt: "prompt",
|
|
22
|
-
Correction: "correction",
|
|
23
|
-
ExpectedOutput: "expected_output",
|
|
24
|
-
} as const;
|
|
25
|
-
/**
|
|
26
|
-
* The role of the prompt message
|
|
27
|
-
*/
|
|
28
|
-
export type Role = ClosedEnum<typeof Role>;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* The type of the content part. Always `file`.
|
|
32
|
-
*/
|
|
33
|
-
export const InvokeEval2Type = {
|
|
34
|
-
File: "file",
|
|
35
|
-
} as const;
|
|
36
|
-
/**
|
|
37
|
-
* The type of the content part. Always `file`.
|
|
38
|
-
*/
|
|
39
|
-
export type InvokeEval2Type = ClosedEnum<typeof InvokeEval2Type>;
|
|
40
|
-
|
|
41
|
-
export type FileT = {
|
|
42
|
-
/**
|
|
43
|
-
* The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
|
|
44
|
-
*/
|
|
45
|
-
fileData?: string | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* URL to the file. Only supported by Anthropic Claude models for PDF files.
|
|
48
|
-
*/
|
|
49
|
-
uri?: string | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* MIME type of the file (e.g., application/pdf, image/png)
|
|
52
|
-
*/
|
|
53
|
-
mimeType?: string | undefined;
|
|
54
|
-
/**
|
|
55
|
-
* The name of the file, used when passing the file to the model as a string.
|
|
56
|
-
*/
|
|
57
|
-
filename?: string | undefined;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export type Three = {
|
|
61
|
-
/**
|
|
62
|
-
* The type of the content part. Always `file`.
|
|
63
|
-
*/
|
|
64
|
-
type: InvokeEval2Type;
|
|
65
|
-
file: FileT;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export const TwoType = {
|
|
69
|
-
ImageUrl: "image_url",
|
|
70
|
-
} as const;
|
|
71
|
-
export type TwoType = ClosedEnum<typeof TwoType>;
|
|
72
|
-
|
|
73
|
-
export type ImageUrl = {
|
|
74
|
-
/**
|
|
75
|
-
* Either a URL of the image or the base64 encoded data URI.
|
|
76
|
-
*/
|
|
77
|
-
url: string;
|
|
78
|
-
/**
|
|
79
|
-
* Specifies the detail level of the image. Currently only supported with OpenAI models
|
|
80
|
-
*/
|
|
81
|
-
detail?: string | undefined;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* The image part of the prompt message. Only supported with vision models.
|
|
86
|
-
*/
|
|
87
|
-
export type Two2 = {
|
|
88
|
-
type: TwoType;
|
|
89
|
-
imageUrl: ImageUrl;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export const Type = {
|
|
93
|
-
Text: "text",
|
|
94
|
-
} as const;
|
|
95
|
-
export type Type = ClosedEnum<typeof Type>;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Text content part of a prompt message
|
|
99
|
-
*/
|
|
100
|
-
export type One = {
|
|
101
|
-
type: Type;
|
|
102
|
-
text: string;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export type Two = One | Two2 | Three;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
|
|
109
|
-
*/
|
|
110
|
-
export type Content = string | Array<One | Two2 | Three>;
|
|
111
|
-
|
|
112
|
-
export const InvokeEvalType = {
|
|
113
|
-
Function: "function",
|
|
114
|
-
} as const;
|
|
115
|
-
export type InvokeEvalType = ClosedEnum<typeof InvokeEvalType>;
|
|
116
|
-
|
|
117
|
-
export type FunctionT = {
|
|
118
|
-
name: string;
|
|
119
|
-
/**
|
|
120
|
-
* JSON string arguments for the functions
|
|
121
|
-
*/
|
|
122
|
-
arguments: string;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export type ToolCalls = {
|
|
126
|
-
id?: string | undefined;
|
|
127
|
-
index?: number | undefined;
|
|
128
|
-
type: InvokeEvalType;
|
|
129
|
-
function: FunctionT;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export type Messages = {
|
|
133
|
-
/**
|
|
134
|
-
* The role of the prompt message
|
|
135
|
-
*/
|
|
136
|
-
role: Role;
|
|
137
|
-
/**
|
|
138
|
-
* The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
|
|
139
|
-
*/
|
|
140
|
-
content: string | Array<One | Two2 | Three>;
|
|
141
|
-
toolCalls?: Array<ToolCalls> | undefined;
|
|
142
|
-
toolCallId?: string | undefined;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export type InvokeEvalRequestBody = {
|
|
146
|
-
/**
|
|
147
|
-
* Latest user message
|
|
148
|
-
*/
|
|
149
|
-
query?: string | undefined;
|
|
150
|
-
/**
|
|
151
|
-
* The generated response from the model
|
|
152
|
-
*/
|
|
153
|
-
output?: string | undefined;
|
|
154
|
-
/**
|
|
155
|
-
* The reference used to compare the output
|
|
156
|
-
*/
|
|
157
|
-
reference?: string | undefined;
|
|
158
|
-
/**
|
|
159
|
-
* Knowledge base retrievals
|
|
160
|
-
*/
|
|
161
|
-
retrievals?: Array<string> | undefined;
|
|
162
|
-
/**
|
|
163
|
-
* The messages used to generate the output, without the last user message
|
|
164
|
-
*/
|
|
165
|
-
messages?: Array<Messages> | undefined;
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
export type InvokeEvalRequest = {
|
|
169
|
-
/**
|
|
170
|
-
* Evaluator ID
|
|
171
|
-
*/
|
|
172
|
-
id: string;
|
|
173
|
-
requestBody?: InvokeEvalRequestBody | undefined;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type = {
|
|
177
|
-
HttpEval: "http_eval",
|
|
178
|
-
} as const;
|
|
179
|
-
export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type =
|
|
180
|
-
ClosedEnum<typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type>;
|
|
181
|
-
|
|
182
|
-
export type InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue =
|
|
183
|
-
| number
|
|
184
|
-
| boolean;
|
|
185
|
-
|
|
186
|
-
export type InvokeEvalResponseBodyEvalsResponse200Value = {
|
|
187
|
-
type: string;
|
|
188
|
-
value: number | boolean;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
export type InvokeEvalResponseBodyHTTP = {
|
|
192
|
-
type: InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type;
|
|
193
|
-
value?: InvokeEvalResponseBodyEvalsResponse200Value | null | undefined;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type = {
|
|
197
|
-
LlmEvaluator: "llm_evaluator",
|
|
198
|
-
} as const;
|
|
199
|
-
export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type =
|
|
200
|
-
ClosedEnum<typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type>;
|
|
201
|
-
|
|
202
|
-
export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value =
|
|
203
|
-
| number
|
|
204
|
-
| boolean
|
|
205
|
-
| string;
|
|
206
|
-
|
|
207
|
-
export type ResponseBodyOriginalValue = number | boolean | string;
|
|
208
|
-
|
|
209
|
-
export type InvokeEvalResponseBodyEvalsResponseValue = {
|
|
210
|
-
workflowRunId: string;
|
|
211
|
-
value: number | boolean | string;
|
|
212
|
-
explanation?: string | null | undefined;
|
|
213
|
-
originalValue?: number | boolean | string | null | undefined;
|
|
214
|
-
originalExplanation?: string | null | undefined;
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
export type InvokeEvalResponseBodyLLM = {
|
|
218
|
-
type: InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type;
|
|
219
|
-
value: InvokeEvalResponseBodyEvalsResponseValue | null;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type = {
|
|
223
|
-
BertScore: "bert_score",
|
|
224
|
-
} as const;
|
|
225
|
-
export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type =
|
|
226
|
-
ClosedEnum<typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type>;
|
|
227
|
-
|
|
228
|
-
export type InvokeEvalResponseBodyEvalsValue = {
|
|
229
|
-
f1: number;
|
|
230
|
-
precision: number;
|
|
231
|
-
recall: number;
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
export type BERTScore = {
|
|
235
|
-
type: InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type;
|
|
236
|
-
value: InvokeEvalResponseBodyEvalsValue;
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType = {
|
|
240
|
-
RougeN: "rouge_n",
|
|
241
|
-
} as const;
|
|
242
|
-
export type InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType =
|
|
243
|
-
ClosedEnum<typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType>;
|
|
244
|
-
|
|
245
|
-
export type Rouge1 = {
|
|
246
|
-
f1: number;
|
|
247
|
-
precision: number;
|
|
248
|
-
recall: number;
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
export type Rouge2 = {
|
|
252
|
-
f1: number;
|
|
253
|
-
precision: number;
|
|
254
|
-
recall: number;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
export type RougeL = {
|
|
258
|
-
f1: number;
|
|
259
|
-
precision: number;
|
|
260
|
-
recall: number;
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
export type InvokeEvalResponseBodyValue = {
|
|
264
|
-
rouge1: Rouge1;
|
|
265
|
-
rouge2: Rouge2;
|
|
266
|
-
rougeL: RougeL;
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
export type RougeN = {
|
|
270
|
-
type: InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType;
|
|
271
|
-
value: InvokeEvalResponseBodyValue;
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
export const InvokeEvalResponseBodyEvalsResponse200Type = {
|
|
275
|
-
StringArray: "string_array",
|
|
276
|
-
} as const;
|
|
277
|
-
export type InvokeEvalResponseBodyEvalsResponse200Type = ClosedEnum<
|
|
278
|
-
typeof InvokeEvalResponseBodyEvalsResponse200Type
|
|
279
|
-
>;
|
|
280
|
-
|
|
281
|
-
export type StringArray = {
|
|
282
|
-
type: InvokeEvalResponseBodyEvalsResponse200Type;
|
|
283
|
-
values: Array<string | null>;
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
export const InvokeEvalResponseBodyEvalsResponseType = {
|
|
287
|
-
Boolean: "boolean",
|
|
288
|
-
} as const;
|
|
289
|
-
export type InvokeEvalResponseBodyEvalsResponseType = ClosedEnum<
|
|
290
|
-
typeof InvokeEvalResponseBodyEvalsResponseType
|
|
291
|
-
>;
|
|
292
|
-
|
|
293
|
-
export type ResponseBodyValue = boolean | string | number;
|
|
294
|
-
|
|
295
|
-
export type ResponseBodyBoolean = {
|
|
296
|
-
type: InvokeEvalResponseBodyEvalsResponseType;
|
|
297
|
-
value: boolean | string | number | null;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
export const InvokeEvalResponseBodyEvalsType = {
|
|
301
|
-
Number: "number",
|
|
302
|
-
} as const;
|
|
303
|
-
export type InvokeEvalResponseBodyEvalsType = ClosedEnum<
|
|
304
|
-
typeof InvokeEvalResponseBodyEvalsType
|
|
305
|
-
>;
|
|
306
|
-
|
|
307
|
-
export type ResponseBodyNumber = {
|
|
308
|
-
type: InvokeEvalResponseBodyEvalsType;
|
|
309
|
-
originalValue?: number | null | undefined;
|
|
310
|
-
value: number | null;
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
export const InvokeEvalResponseBodyType = {
|
|
314
|
-
String: "string",
|
|
315
|
-
} as const;
|
|
316
|
-
export type InvokeEvalResponseBodyType = ClosedEnum<
|
|
317
|
-
typeof InvokeEvalResponseBodyType
|
|
318
|
-
>;
|
|
319
|
-
|
|
320
|
-
export type String = {
|
|
321
|
-
type: InvokeEvalResponseBodyType;
|
|
322
|
-
originalValue?: string | null | undefined;
|
|
323
|
-
value?: string | null | undefined;
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Returns the result of the evaluator run
|
|
328
|
-
*/
|
|
329
|
-
export type InvokeEvalResponseBody =
|
|
330
|
-
| ResponseBodyNumber
|
|
331
|
-
| ResponseBodyBoolean
|
|
332
|
-
| StringArray
|
|
333
|
-
| RougeN
|
|
334
|
-
| BERTScore
|
|
335
|
-
| InvokeEvalResponseBodyLLM
|
|
336
|
-
| String
|
|
337
|
-
| InvokeEvalResponseBodyHTTP;
|
|
338
|
-
|
|
339
|
-
/** @internal */
|
|
340
|
-
export const Role$inboundSchema: z.ZodNativeEnum<typeof Role> = z.nativeEnum(
|
|
341
|
-
Role,
|
|
342
|
-
);
|
|
343
|
-
|
|
344
|
-
/** @internal */
|
|
345
|
-
export const Role$outboundSchema: z.ZodNativeEnum<typeof Role> =
|
|
346
|
-
Role$inboundSchema;
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* @internal
|
|
350
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
351
|
-
*/
|
|
352
|
-
export namespace Role$ {
|
|
353
|
-
/** @deprecated use `Role$inboundSchema` instead. */
|
|
354
|
-
export const inboundSchema = Role$inboundSchema;
|
|
355
|
-
/** @deprecated use `Role$outboundSchema` instead. */
|
|
356
|
-
export const outboundSchema = Role$outboundSchema;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/** @internal */
|
|
360
|
-
export const InvokeEval2Type$inboundSchema: z.ZodNativeEnum<
|
|
361
|
-
typeof InvokeEval2Type
|
|
362
|
-
> = z.nativeEnum(InvokeEval2Type);
|
|
363
|
-
|
|
364
|
-
/** @internal */
|
|
365
|
-
export const InvokeEval2Type$outboundSchema: z.ZodNativeEnum<
|
|
366
|
-
typeof InvokeEval2Type
|
|
367
|
-
> = InvokeEval2Type$inboundSchema;
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* @internal
|
|
371
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
372
|
-
*/
|
|
373
|
-
export namespace InvokeEval2Type$ {
|
|
374
|
-
/** @deprecated use `InvokeEval2Type$inboundSchema` instead. */
|
|
375
|
-
export const inboundSchema = InvokeEval2Type$inboundSchema;
|
|
376
|
-
/** @deprecated use `InvokeEval2Type$outboundSchema` instead. */
|
|
377
|
-
export const outboundSchema = InvokeEval2Type$outboundSchema;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
/** @internal */
|
|
381
|
-
export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
|
|
382
|
-
.object({
|
|
383
|
-
file_data: z.string().optional(),
|
|
384
|
-
uri: z.string().optional(),
|
|
385
|
-
mimeType: z.string().optional(),
|
|
386
|
-
filename: z.string().optional(),
|
|
387
|
-
}).transform((v) => {
|
|
388
|
-
return remap$(v, {
|
|
389
|
-
"file_data": "fileData",
|
|
390
|
-
});
|
|
391
|
-
});
|
|
392
|
-
|
|
393
|
-
/** @internal */
|
|
394
|
-
export type FileT$Outbound = {
|
|
395
|
-
file_data?: string | undefined;
|
|
396
|
-
uri?: string | undefined;
|
|
397
|
-
mimeType?: string | undefined;
|
|
398
|
-
filename?: string | undefined;
|
|
399
|
-
};
|
|
400
|
-
|
|
401
|
-
/** @internal */
|
|
402
|
-
export const FileT$outboundSchema: z.ZodType<
|
|
403
|
-
FileT$Outbound,
|
|
404
|
-
z.ZodTypeDef,
|
|
405
|
-
FileT
|
|
406
|
-
> = z.object({
|
|
407
|
-
fileData: z.string().optional(),
|
|
408
|
-
uri: z.string().optional(),
|
|
409
|
-
mimeType: z.string().optional(),
|
|
410
|
-
filename: z.string().optional(),
|
|
411
|
-
}).transform((v) => {
|
|
412
|
-
return remap$(v, {
|
|
413
|
-
fileData: "file_data",
|
|
414
|
-
});
|
|
415
|
-
});
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* @internal
|
|
419
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
420
|
-
*/
|
|
421
|
-
export namespace FileT$ {
|
|
422
|
-
/** @deprecated use `FileT$inboundSchema` instead. */
|
|
423
|
-
export const inboundSchema = FileT$inboundSchema;
|
|
424
|
-
/** @deprecated use `FileT$outboundSchema` instead. */
|
|
425
|
-
export const outboundSchema = FileT$outboundSchema;
|
|
426
|
-
/** @deprecated use `FileT$Outbound` instead. */
|
|
427
|
-
export type Outbound = FileT$Outbound;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
export function fileToJSON(fileT: FileT): string {
|
|
431
|
-
return JSON.stringify(FileT$outboundSchema.parse(fileT));
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
export function fileFromJSON(
|
|
435
|
-
jsonString: string,
|
|
436
|
-
): SafeParseResult<FileT, SDKValidationError> {
|
|
437
|
-
return safeParse(
|
|
438
|
-
jsonString,
|
|
439
|
-
(x) => FileT$inboundSchema.parse(JSON.parse(x)),
|
|
440
|
-
`Failed to parse 'FileT' from JSON`,
|
|
441
|
-
);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
/** @internal */
|
|
445
|
-
export const Three$inboundSchema: z.ZodType<Three, z.ZodTypeDef, unknown> = z
|
|
446
|
-
.object({
|
|
447
|
-
type: InvokeEval2Type$inboundSchema,
|
|
448
|
-
file: z.lazy(() => FileT$inboundSchema),
|
|
449
|
-
});
|
|
450
|
-
|
|
451
|
-
/** @internal */
|
|
452
|
-
export type Three$Outbound = {
|
|
453
|
-
type: string;
|
|
454
|
-
file: FileT$Outbound;
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
/** @internal */
|
|
458
|
-
export const Three$outboundSchema: z.ZodType<
|
|
459
|
-
Three$Outbound,
|
|
460
|
-
z.ZodTypeDef,
|
|
461
|
-
Three
|
|
462
|
-
> = z.object({
|
|
463
|
-
type: InvokeEval2Type$outboundSchema,
|
|
464
|
-
file: z.lazy(() => FileT$outboundSchema),
|
|
465
|
-
});
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* @internal
|
|
469
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
470
|
-
*/
|
|
471
|
-
export namespace Three$ {
|
|
472
|
-
/** @deprecated use `Three$inboundSchema` instead. */
|
|
473
|
-
export const inboundSchema = Three$inboundSchema;
|
|
474
|
-
/** @deprecated use `Three$outboundSchema` instead. */
|
|
475
|
-
export const outboundSchema = Three$outboundSchema;
|
|
476
|
-
/** @deprecated use `Three$Outbound` instead. */
|
|
477
|
-
export type Outbound = Three$Outbound;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
export function threeToJSON(three: Three): string {
|
|
481
|
-
return JSON.stringify(Three$outboundSchema.parse(three));
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
export function threeFromJSON(
|
|
485
|
-
jsonString: string,
|
|
486
|
-
): SafeParseResult<Three, SDKValidationError> {
|
|
487
|
-
return safeParse(
|
|
488
|
-
jsonString,
|
|
489
|
-
(x) => Three$inboundSchema.parse(JSON.parse(x)),
|
|
490
|
-
`Failed to parse 'Three' from JSON`,
|
|
491
|
-
);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
/** @internal */
|
|
495
|
-
export const TwoType$inboundSchema: z.ZodNativeEnum<typeof TwoType> = z
|
|
496
|
-
.nativeEnum(TwoType);
|
|
497
|
-
|
|
498
|
-
/** @internal */
|
|
499
|
-
export const TwoType$outboundSchema: z.ZodNativeEnum<typeof TwoType> =
|
|
500
|
-
TwoType$inboundSchema;
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* @internal
|
|
504
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
505
|
-
*/
|
|
506
|
-
export namespace TwoType$ {
|
|
507
|
-
/** @deprecated use `TwoType$inboundSchema` instead. */
|
|
508
|
-
export const inboundSchema = TwoType$inboundSchema;
|
|
509
|
-
/** @deprecated use `TwoType$outboundSchema` instead. */
|
|
510
|
-
export const outboundSchema = TwoType$outboundSchema;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
/** @internal */
|
|
514
|
-
export const ImageUrl$inboundSchema: z.ZodType<
|
|
515
|
-
ImageUrl,
|
|
516
|
-
z.ZodTypeDef,
|
|
517
|
-
unknown
|
|
518
|
-
> = z.object({
|
|
519
|
-
url: z.string(),
|
|
520
|
-
detail: z.string().optional(),
|
|
521
|
-
});
|
|
522
|
-
|
|
523
|
-
/** @internal */
|
|
524
|
-
export type ImageUrl$Outbound = {
|
|
525
|
-
url: string;
|
|
526
|
-
detail?: string | undefined;
|
|
527
|
-
};
|
|
528
|
-
|
|
529
|
-
/** @internal */
|
|
530
|
-
export const ImageUrl$outboundSchema: z.ZodType<
|
|
531
|
-
ImageUrl$Outbound,
|
|
532
|
-
z.ZodTypeDef,
|
|
533
|
-
ImageUrl
|
|
534
|
-
> = z.object({
|
|
535
|
-
url: z.string(),
|
|
536
|
-
detail: z.string().optional(),
|
|
537
|
-
});
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* @internal
|
|
541
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
542
|
-
*/
|
|
543
|
-
export namespace ImageUrl$ {
|
|
544
|
-
/** @deprecated use `ImageUrl$inboundSchema` instead. */
|
|
545
|
-
export const inboundSchema = ImageUrl$inboundSchema;
|
|
546
|
-
/** @deprecated use `ImageUrl$outboundSchema` instead. */
|
|
547
|
-
export const outboundSchema = ImageUrl$outboundSchema;
|
|
548
|
-
/** @deprecated use `ImageUrl$Outbound` instead. */
|
|
549
|
-
export type Outbound = ImageUrl$Outbound;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
export function imageUrlToJSON(imageUrl: ImageUrl): string {
|
|
553
|
-
return JSON.stringify(ImageUrl$outboundSchema.parse(imageUrl));
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
export function imageUrlFromJSON(
|
|
557
|
-
jsonString: string,
|
|
558
|
-
): SafeParseResult<ImageUrl, SDKValidationError> {
|
|
559
|
-
return safeParse(
|
|
560
|
-
jsonString,
|
|
561
|
-
(x) => ImageUrl$inboundSchema.parse(JSON.parse(x)),
|
|
562
|
-
`Failed to parse 'ImageUrl' from JSON`,
|
|
563
|
-
);
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
/** @internal */
|
|
567
|
-
export const Two2$inboundSchema: z.ZodType<Two2, z.ZodTypeDef, unknown> = z
|
|
568
|
-
.object({
|
|
569
|
-
type: TwoType$inboundSchema,
|
|
570
|
-
image_url: z.lazy(() => ImageUrl$inboundSchema),
|
|
571
|
-
}).transform((v) => {
|
|
572
|
-
return remap$(v, {
|
|
573
|
-
"image_url": "imageUrl",
|
|
574
|
-
});
|
|
575
|
-
});
|
|
576
|
-
|
|
577
|
-
/** @internal */
|
|
578
|
-
export type Two2$Outbound = {
|
|
579
|
-
type: string;
|
|
580
|
-
image_url: ImageUrl$Outbound;
|
|
581
|
-
};
|
|
582
|
-
|
|
583
|
-
/** @internal */
|
|
584
|
-
export const Two2$outboundSchema: z.ZodType<Two2$Outbound, z.ZodTypeDef, Two2> =
|
|
585
|
-
z.object({
|
|
586
|
-
type: TwoType$outboundSchema,
|
|
587
|
-
imageUrl: z.lazy(() => ImageUrl$outboundSchema),
|
|
588
|
-
}).transform((v) => {
|
|
589
|
-
return remap$(v, {
|
|
590
|
-
imageUrl: "image_url",
|
|
591
|
-
});
|
|
592
|
-
});
|
|
593
|
-
|
|
594
|
-
/**
|
|
595
|
-
* @internal
|
|
596
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
597
|
-
*/
|
|
598
|
-
export namespace Two2$ {
|
|
599
|
-
/** @deprecated use `Two2$inboundSchema` instead. */
|
|
600
|
-
export const inboundSchema = Two2$inboundSchema;
|
|
601
|
-
/** @deprecated use `Two2$outboundSchema` instead. */
|
|
602
|
-
export const outboundSchema = Two2$outboundSchema;
|
|
603
|
-
/** @deprecated use `Two2$Outbound` instead. */
|
|
604
|
-
export type Outbound = Two2$Outbound;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
export function two2ToJSON(two2: Two2): string {
|
|
608
|
-
return JSON.stringify(Two2$outboundSchema.parse(two2));
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
export function two2FromJSON(
|
|
612
|
-
jsonString: string,
|
|
613
|
-
): SafeParseResult<Two2, SDKValidationError> {
|
|
614
|
-
return safeParse(
|
|
615
|
-
jsonString,
|
|
616
|
-
(x) => Two2$inboundSchema.parse(JSON.parse(x)),
|
|
617
|
-
`Failed to parse 'Two2' from JSON`,
|
|
618
|
-
);
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
/** @internal */
|
|
622
|
-
export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
|
|
623
|
-
Type,
|
|
624
|
-
);
|
|
625
|
-
|
|
626
|
-
/** @internal */
|
|
627
|
-
export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
|
|
628
|
-
Type$inboundSchema;
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* @internal
|
|
632
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
633
|
-
*/
|
|
634
|
-
export namespace Type$ {
|
|
635
|
-
/** @deprecated use `Type$inboundSchema` instead. */
|
|
636
|
-
export const inboundSchema = Type$inboundSchema;
|
|
637
|
-
/** @deprecated use `Type$outboundSchema` instead. */
|
|
638
|
-
export const outboundSchema = Type$outboundSchema;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
/** @internal */
|
|
642
|
-
export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
|
|
643
|
-
.object({
|
|
644
|
-
type: Type$inboundSchema,
|
|
645
|
-
text: z.string(),
|
|
646
|
-
});
|
|
647
|
-
|
|
648
|
-
/** @internal */
|
|
649
|
-
export type One$Outbound = {
|
|
650
|
-
type: string;
|
|
651
|
-
text: string;
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
/** @internal */
|
|
655
|
-
export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
|
|
656
|
-
.object({
|
|
657
|
-
type: Type$outboundSchema,
|
|
658
|
-
text: z.string(),
|
|
659
|
-
});
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* @internal
|
|
663
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
664
|
-
*/
|
|
665
|
-
export namespace One$ {
|
|
666
|
-
/** @deprecated use `One$inboundSchema` instead. */
|
|
667
|
-
export const inboundSchema = One$inboundSchema;
|
|
668
|
-
/** @deprecated use `One$outboundSchema` instead. */
|
|
669
|
-
export const outboundSchema = One$outboundSchema;
|
|
670
|
-
/** @deprecated use `One$Outbound` instead. */
|
|
671
|
-
export type Outbound = One$Outbound;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
export function oneToJSON(one: One): string {
|
|
675
|
-
return JSON.stringify(One$outboundSchema.parse(one));
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
export function oneFromJSON(
|
|
679
|
-
jsonString: string,
|
|
680
|
-
): SafeParseResult<One, SDKValidationError> {
|
|
681
|
-
return safeParse(
|
|
682
|
-
jsonString,
|
|
683
|
-
(x) => One$inboundSchema.parse(JSON.parse(x)),
|
|
684
|
-
`Failed to parse 'One' from JSON`,
|
|
685
|
-
);
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
/** @internal */
|
|
689
|
-
export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z.union(
|
|
690
|
-
[
|
|
691
|
-
z.lazy(() => One$inboundSchema),
|
|
692
|
-
z.lazy(() => Two2$inboundSchema),
|
|
693
|
-
z.lazy(() => Three$inboundSchema),
|
|
694
|
-
],
|
|
695
|
-
);
|
|
696
|
-
|
|
697
|
-
/** @internal */
|
|
698
|
-
export type Two$Outbound = One$Outbound | Two2$Outbound | Three$Outbound;
|
|
699
|
-
|
|
700
|
-
/** @internal */
|
|
701
|
-
export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
|
|
702
|
-
.union([
|
|
703
|
-
z.lazy(() => One$outboundSchema),
|
|
704
|
-
z.lazy(() => Two2$outboundSchema),
|
|
705
|
-
z.lazy(() => Three$outboundSchema),
|
|
706
|
-
]);
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* @internal
|
|
710
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
711
|
-
*/
|
|
712
|
-
export namespace Two$ {
|
|
713
|
-
/** @deprecated use `Two$inboundSchema` instead. */
|
|
714
|
-
export const inboundSchema = Two$inboundSchema;
|
|
715
|
-
/** @deprecated use `Two$outboundSchema` instead. */
|
|
716
|
-
export const outboundSchema = Two$outboundSchema;
|
|
717
|
-
/** @deprecated use `Two$Outbound` instead. */
|
|
718
|
-
export type Outbound = Two$Outbound;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
export function twoToJSON(two: Two): string {
|
|
722
|
-
return JSON.stringify(Two$outboundSchema.parse(two));
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
export function twoFromJSON(
|
|
726
|
-
jsonString: string,
|
|
727
|
-
): SafeParseResult<Two, SDKValidationError> {
|
|
728
|
-
return safeParse(
|
|
729
|
-
jsonString,
|
|
730
|
-
(x) => Two$inboundSchema.parse(JSON.parse(x)),
|
|
731
|
-
`Failed to parse 'Two' from JSON`,
|
|
732
|
-
);
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
/** @internal */
|
|
736
|
-
export const Content$inboundSchema: z.ZodType<Content, z.ZodTypeDef, unknown> =
|
|
737
|
-
z.union([
|
|
738
|
-
z.string(),
|
|
739
|
-
z.array(z.union([
|
|
740
|
-
z.lazy(() => One$inboundSchema),
|
|
741
|
-
z.lazy(() => Two2$inboundSchema),
|
|
742
|
-
z.lazy(() => Three$inboundSchema),
|
|
743
|
-
])),
|
|
744
|
-
]);
|
|
745
|
-
|
|
746
|
-
/** @internal */
|
|
747
|
-
export type Content$Outbound =
|
|
748
|
-
| string
|
|
749
|
-
| Array<One$Outbound | Two2$Outbound | Three$Outbound>;
|
|
750
|
-
|
|
751
|
-
/** @internal */
|
|
752
|
-
export const Content$outboundSchema: z.ZodType<
|
|
753
|
-
Content$Outbound,
|
|
754
|
-
z.ZodTypeDef,
|
|
755
|
-
Content
|
|
756
|
-
> = z.union([
|
|
757
|
-
z.string(),
|
|
758
|
-
z.array(z.union([
|
|
759
|
-
z.lazy(() => One$outboundSchema),
|
|
760
|
-
z.lazy(() => Two2$outboundSchema),
|
|
761
|
-
z.lazy(() => Three$outboundSchema),
|
|
762
|
-
])),
|
|
763
|
-
]);
|
|
764
|
-
|
|
765
|
-
/**
|
|
766
|
-
* @internal
|
|
767
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
768
|
-
*/
|
|
769
|
-
export namespace Content$ {
|
|
770
|
-
/** @deprecated use `Content$inboundSchema` instead. */
|
|
771
|
-
export const inboundSchema = Content$inboundSchema;
|
|
772
|
-
/** @deprecated use `Content$outboundSchema` instead. */
|
|
773
|
-
export const outboundSchema = Content$outboundSchema;
|
|
774
|
-
/** @deprecated use `Content$Outbound` instead. */
|
|
775
|
-
export type Outbound = Content$Outbound;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
export function contentToJSON(content: Content): string {
|
|
779
|
-
return JSON.stringify(Content$outboundSchema.parse(content));
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
export function contentFromJSON(
|
|
783
|
-
jsonString: string,
|
|
784
|
-
): SafeParseResult<Content, SDKValidationError> {
|
|
785
|
-
return safeParse(
|
|
786
|
-
jsonString,
|
|
787
|
-
(x) => Content$inboundSchema.parse(JSON.parse(x)),
|
|
788
|
-
`Failed to parse 'Content' from JSON`,
|
|
789
|
-
);
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
/** @internal */
|
|
793
|
-
export const InvokeEvalType$inboundSchema: z.ZodNativeEnum<
|
|
794
|
-
typeof InvokeEvalType
|
|
795
|
-
> = z.nativeEnum(InvokeEvalType);
|
|
796
|
-
|
|
797
|
-
/** @internal */
|
|
798
|
-
export const InvokeEvalType$outboundSchema: z.ZodNativeEnum<
|
|
799
|
-
typeof InvokeEvalType
|
|
800
|
-
> = InvokeEvalType$inboundSchema;
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* @internal
|
|
804
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
805
|
-
*/
|
|
806
|
-
export namespace InvokeEvalType$ {
|
|
807
|
-
/** @deprecated use `InvokeEvalType$inboundSchema` instead. */
|
|
808
|
-
export const inboundSchema = InvokeEvalType$inboundSchema;
|
|
809
|
-
/** @deprecated use `InvokeEvalType$outboundSchema` instead. */
|
|
810
|
-
export const outboundSchema = InvokeEvalType$outboundSchema;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
/** @internal */
|
|
814
|
-
export const FunctionT$inboundSchema: z.ZodType<
|
|
815
|
-
FunctionT,
|
|
816
|
-
z.ZodTypeDef,
|
|
817
|
-
unknown
|
|
818
|
-
> = z.object({
|
|
819
|
-
name: z.string(),
|
|
820
|
-
arguments: z.string(),
|
|
821
|
-
});
|
|
822
|
-
|
|
823
|
-
/** @internal */
|
|
824
|
-
export type FunctionT$Outbound = {
|
|
825
|
-
name: string;
|
|
826
|
-
arguments: string;
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
/** @internal */
|
|
830
|
-
export const FunctionT$outboundSchema: z.ZodType<
|
|
831
|
-
FunctionT$Outbound,
|
|
832
|
-
z.ZodTypeDef,
|
|
833
|
-
FunctionT
|
|
834
|
-
> = z.object({
|
|
835
|
-
name: z.string(),
|
|
836
|
-
arguments: z.string(),
|
|
837
|
-
});
|
|
838
|
-
|
|
839
|
-
/**
|
|
840
|
-
* @internal
|
|
841
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
842
|
-
*/
|
|
843
|
-
export namespace FunctionT$ {
|
|
844
|
-
/** @deprecated use `FunctionT$inboundSchema` instead. */
|
|
845
|
-
export const inboundSchema = FunctionT$inboundSchema;
|
|
846
|
-
/** @deprecated use `FunctionT$outboundSchema` instead. */
|
|
847
|
-
export const outboundSchema = FunctionT$outboundSchema;
|
|
848
|
-
/** @deprecated use `FunctionT$Outbound` instead. */
|
|
849
|
-
export type Outbound = FunctionT$Outbound;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
export function functionToJSON(functionT: FunctionT): string {
|
|
853
|
-
return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
export function functionFromJSON(
|
|
857
|
-
jsonString: string,
|
|
858
|
-
): SafeParseResult<FunctionT, SDKValidationError> {
|
|
859
|
-
return safeParse(
|
|
860
|
-
jsonString,
|
|
861
|
-
(x) => FunctionT$inboundSchema.parse(JSON.parse(x)),
|
|
862
|
-
`Failed to parse 'FunctionT' from JSON`,
|
|
863
|
-
);
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
/** @internal */
|
|
867
|
-
export const ToolCalls$inboundSchema: z.ZodType<
|
|
868
|
-
ToolCalls,
|
|
869
|
-
z.ZodTypeDef,
|
|
870
|
-
unknown
|
|
871
|
-
> = z.object({
|
|
872
|
-
id: z.string().optional(),
|
|
873
|
-
index: z.number().optional(),
|
|
874
|
-
type: InvokeEvalType$inboundSchema,
|
|
875
|
-
function: z.lazy(() => FunctionT$inboundSchema),
|
|
876
|
-
});
|
|
877
|
-
|
|
878
|
-
/** @internal */
|
|
879
|
-
export type ToolCalls$Outbound = {
|
|
880
|
-
id?: string | undefined;
|
|
881
|
-
index?: number | undefined;
|
|
882
|
-
type: string;
|
|
883
|
-
function: FunctionT$Outbound;
|
|
884
|
-
};
|
|
885
|
-
|
|
886
|
-
/** @internal */
|
|
887
|
-
export const ToolCalls$outboundSchema: z.ZodType<
|
|
888
|
-
ToolCalls$Outbound,
|
|
889
|
-
z.ZodTypeDef,
|
|
890
|
-
ToolCalls
|
|
891
|
-
> = z.object({
|
|
892
|
-
id: z.string().optional(),
|
|
893
|
-
index: z.number().optional(),
|
|
894
|
-
type: InvokeEvalType$outboundSchema,
|
|
895
|
-
function: z.lazy(() => FunctionT$outboundSchema),
|
|
896
|
-
});
|
|
897
|
-
|
|
898
|
-
/**
|
|
899
|
-
* @internal
|
|
900
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
901
|
-
*/
|
|
902
|
-
export namespace ToolCalls$ {
|
|
903
|
-
/** @deprecated use `ToolCalls$inboundSchema` instead. */
|
|
904
|
-
export const inboundSchema = ToolCalls$inboundSchema;
|
|
905
|
-
/** @deprecated use `ToolCalls$outboundSchema` instead. */
|
|
906
|
-
export const outboundSchema = ToolCalls$outboundSchema;
|
|
907
|
-
/** @deprecated use `ToolCalls$Outbound` instead. */
|
|
908
|
-
export type Outbound = ToolCalls$Outbound;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
export function toolCallsToJSON(toolCalls: ToolCalls): string {
|
|
912
|
-
return JSON.stringify(ToolCalls$outboundSchema.parse(toolCalls));
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
export function toolCallsFromJSON(
|
|
916
|
-
jsonString: string,
|
|
917
|
-
): SafeParseResult<ToolCalls, SDKValidationError> {
|
|
918
|
-
return safeParse(
|
|
919
|
-
jsonString,
|
|
920
|
-
(x) => ToolCalls$inboundSchema.parse(JSON.parse(x)),
|
|
921
|
-
`Failed to parse 'ToolCalls' from JSON`,
|
|
922
|
-
);
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
/** @internal */
|
|
926
|
-
export const Messages$inboundSchema: z.ZodType<
|
|
927
|
-
Messages,
|
|
928
|
-
z.ZodTypeDef,
|
|
929
|
-
unknown
|
|
930
|
-
> = z.object({
|
|
931
|
-
role: Role$inboundSchema,
|
|
932
|
-
content: z.union([
|
|
933
|
-
z.string(),
|
|
934
|
-
z.array(z.union([
|
|
935
|
-
z.lazy(() => One$inboundSchema),
|
|
936
|
-
z.lazy(() => Two2$inboundSchema),
|
|
937
|
-
z.lazy(() => Three$inboundSchema),
|
|
938
|
-
])),
|
|
939
|
-
]),
|
|
940
|
-
tool_calls: z.array(z.lazy(() => ToolCalls$inboundSchema)).optional(),
|
|
941
|
-
tool_call_id: z.string().optional(),
|
|
942
|
-
}).transform((v) => {
|
|
943
|
-
return remap$(v, {
|
|
944
|
-
"tool_calls": "toolCalls",
|
|
945
|
-
"tool_call_id": "toolCallId",
|
|
946
|
-
});
|
|
947
|
-
});
|
|
948
|
-
|
|
949
|
-
/** @internal */
|
|
950
|
-
export type Messages$Outbound = {
|
|
951
|
-
role: string;
|
|
952
|
-
content: string | Array<One$Outbound | Two2$Outbound | Three$Outbound>;
|
|
953
|
-
tool_calls?: Array<ToolCalls$Outbound> | undefined;
|
|
954
|
-
tool_call_id?: string | undefined;
|
|
955
|
-
};
|
|
956
|
-
|
|
957
|
-
/** @internal */
|
|
958
|
-
export const Messages$outboundSchema: z.ZodType<
|
|
959
|
-
Messages$Outbound,
|
|
960
|
-
z.ZodTypeDef,
|
|
961
|
-
Messages
|
|
962
|
-
> = z.object({
|
|
963
|
-
role: Role$outboundSchema,
|
|
964
|
-
content: z.union([
|
|
965
|
-
z.string(),
|
|
966
|
-
z.array(z.union([
|
|
967
|
-
z.lazy(() => One$outboundSchema),
|
|
968
|
-
z.lazy(() => Two2$outboundSchema),
|
|
969
|
-
z.lazy(() => Three$outboundSchema),
|
|
970
|
-
])),
|
|
971
|
-
]),
|
|
972
|
-
toolCalls: z.array(z.lazy(() => ToolCalls$outboundSchema)).optional(),
|
|
973
|
-
toolCallId: z.string().optional(),
|
|
974
|
-
}).transform((v) => {
|
|
975
|
-
return remap$(v, {
|
|
976
|
-
toolCalls: "tool_calls",
|
|
977
|
-
toolCallId: "tool_call_id",
|
|
978
|
-
});
|
|
979
|
-
});
|
|
980
|
-
|
|
981
|
-
/**
|
|
982
|
-
* @internal
|
|
983
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
984
|
-
*/
|
|
985
|
-
export namespace Messages$ {
|
|
986
|
-
/** @deprecated use `Messages$inboundSchema` instead. */
|
|
987
|
-
export const inboundSchema = Messages$inboundSchema;
|
|
988
|
-
/** @deprecated use `Messages$outboundSchema` instead. */
|
|
989
|
-
export const outboundSchema = Messages$outboundSchema;
|
|
990
|
-
/** @deprecated use `Messages$Outbound` instead. */
|
|
991
|
-
export type Outbound = Messages$Outbound;
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
export function messagesToJSON(messages: Messages): string {
|
|
995
|
-
return JSON.stringify(Messages$outboundSchema.parse(messages));
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
export function messagesFromJSON(
|
|
999
|
-
jsonString: string,
|
|
1000
|
-
): SafeParseResult<Messages, SDKValidationError> {
|
|
1001
|
-
return safeParse(
|
|
1002
|
-
jsonString,
|
|
1003
|
-
(x) => Messages$inboundSchema.parse(JSON.parse(x)),
|
|
1004
|
-
`Failed to parse 'Messages' from JSON`,
|
|
1005
|
-
);
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
/** @internal */
|
|
1009
|
-
export const InvokeEvalRequestBody$inboundSchema: z.ZodType<
|
|
1010
|
-
InvokeEvalRequestBody,
|
|
1011
|
-
z.ZodTypeDef,
|
|
1012
|
-
unknown
|
|
1013
|
-
> = z.object({
|
|
1014
|
-
query: z.string().optional(),
|
|
1015
|
-
output: z.string().optional(),
|
|
1016
|
-
reference: z.string().optional(),
|
|
1017
|
-
retrievals: z.array(z.string()).optional(),
|
|
1018
|
-
messages: z.array(z.lazy(() => Messages$inboundSchema)).optional(),
|
|
1019
|
-
});
|
|
1020
|
-
|
|
1021
|
-
/** @internal */
|
|
1022
|
-
export type InvokeEvalRequestBody$Outbound = {
|
|
1023
|
-
query?: string | undefined;
|
|
1024
|
-
output?: string | undefined;
|
|
1025
|
-
reference?: string | undefined;
|
|
1026
|
-
retrievals?: Array<string> | undefined;
|
|
1027
|
-
messages?: Array<Messages$Outbound> | undefined;
|
|
1028
|
-
};
|
|
1029
|
-
|
|
1030
|
-
/** @internal */
|
|
1031
|
-
export const InvokeEvalRequestBody$outboundSchema: z.ZodType<
|
|
1032
|
-
InvokeEvalRequestBody$Outbound,
|
|
1033
|
-
z.ZodTypeDef,
|
|
1034
|
-
InvokeEvalRequestBody
|
|
1035
|
-
> = z.object({
|
|
1036
|
-
query: z.string().optional(),
|
|
1037
|
-
output: z.string().optional(),
|
|
1038
|
-
reference: z.string().optional(),
|
|
1039
|
-
retrievals: z.array(z.string()).optional(),
|
|
1040
|
-
messages: z.array(z.lazy(() => Messages$outboundSchema)).optional(),
|
|
1041
|
-
});
|
|
1042
|
-
|
|
1043
|
-
/**
|
|
1044
|
-
* @internal
|
|
1045
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1046
|
-
*/
|
|
1047
|
-
export namespace InvokeEvalRequestBody$ {
|
|
1048
|
-
/** @deprecated use `InvokeEvalRequestBody$inboundSchema` instead. */
|
|
1049
|
-
export const inboundSchema = InvokeEvalRequestBody$inboundSchema;
|
|
1050
|
-
/** @deprecated use `InvokeEvalRequestBody$outboundSchema` instead. */
|
|
1051
|
-
export const outboundSchema = InvokeEvalRequestBody$outboundSchema;
|
|
1052
|
-
/** @deprecated use `InvokeEvalRequestBody$Outbound` instead. */
|
|
1053
|
-
export type Outbound = InvokeEvalRequestBody$Outbound;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
export function invokeEvalRequestBodyToJSON(
|
|
1057
|
-
invokeEvalRequestBody: InvokeEvalRequestBody,
|
|
1058
|
-
): string {
|
|
1059
|
-
return JSON.stringify(
|
|
1060
|
-
InvokeEvalRequestBody$outboundSchema.parse(invokeEvalRequestBody),
|
|
1061
|
-
);
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
export function invokeEvalRequestBodyFromJSON(
|
|
1065
|
-
jsonString: string,
|
|
1066
|
-
): SafeParseResult<InvokeEvalRequestBody, SDKValidationError> {
|
|
1067
|
-
return safeParse(
|
|
1068
|
-
jsonString,
|
|
1069
|
-
(x) => InvokeEvalRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
1070
|
-
`Failed to parse 'InvokeEvalRequestBody' from JSON`,
|
|
1071
|
-
);
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
/** @internal */
|
|
1075
|
-
export const InvokeEvalRequest$inboundSchema: z.ZodType<
|
|
1076
|
-
InvokeEvalRequest,
|
|
1077
|
-
z.ZodTypeDef,
|
|
1078
|
-
unknown
|
|
1079
|
-
> = z.object({
|
|
1080
|
-
id: z.string(),
|
|
1081
|
-
RequestBody: z.lazy(() => InvokeEvalRequestBody$inboundSchema).optional(),
|
|
1082
|
-
}).transform((v) => {
|
|
1083
|
-
return remap$(v, {
|
|
1084
|
-
"RequestBody": "requestBody",
|
|
1085
|
-
});
|
|
1086
|
-
});
|
|
1087
|
-
|
|
1088
|
-
/** @internal */
|
|
1089
|
-
export type InvokeEvalRequest$Outbound = {
|
|
1090
|
-
id: string;
|
|
1091
|
-
RequestBody?: InvokeEvalRequestBody$Outbound | undefined;
|
|
1092
|
-
};
|
|
1093
|
-
|
|
1094
|
-
/** @internal */
|
|
1095
|
-
export const InvokeEvalRequest$outboundSchema: z.ZodType<
|
|
1096
|
-
InvokeEvalRequest$Outbound,
|
|
1097
|
-
z.ZodTypeDef,
|
|
1098
|
-
InvokeEvalRequest
|
|
1099
|
-
> = z.object({
|
|
1100
|
-
id: z.string(),
|
|
1101
|
-
requestBody: z.lazy(() => InvokeEvalRequestBody$outboundSchema).optional(),
|
|
1102
|
-
}).transform((v) => {
|
|
1103
|
-
return remap$(v, {
|
|
1104
|
-
requestBody: "RequestBody",
|
|
1105
|
-
});
|
|
1106
|
-
});
|
|
1107
|
-
|
|
1108
|
-
/**
|
|
1109
|
-
* @internal
|
|
1110
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1111
|
-
*/
|
|
1112
|
-
export namespace InvokeEvalRequest$ {
|
|
1113
|
-
/** @deprecated use `InvokeEvalRequest$inboundSchema` instead. */
|
|
1114
|
-
export const inboundSchema = InvokeEvalRequest$inboundSchema;
|
|
1115
|
-
/** @deprecated use `InvokeEvalRequest$outboundSchema` instead. */
|
|
1116
|
-
export const outboundSchema = InvokeEvalRequest$outboundSchema;
|
|
1117
|
-
/** @deprecated use `InvokeEvalRequest$Outbound` instead. */
|
|
1118
|
-
export type Outbound = InvokeEvalRequest$Outbound;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
export function invokeEvalRequestToJSON(
|
|
1122
|
-
invokeEvalRequest: InvokeEvalRequest,
|
|
1123
|
-
): string {
|
|
1124
|
-
return JSON.stringify(
|
|
1125
|
-
InvokeEvalRequest$outboundSchema.parse(invokeEvalRequest),
|
|
1126
|
-
);
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
export function invokeEvalRequestFromJSON(
|
|
1130
|
-
jsonString: string,
|
|
1131
|
-
): SafeParseResult<InvokeEvalRequest, SDKValidationError> {
|
|
1132
|
-
return safeParse(
|
|
1133
|
-
jsonString,
|
|
1134
|
-
(x) => InvokeEvalRequest$inboundSchema.parse(JSON.parse(x)),
|
|
1135
|
-
`Failed to parse 'InvokeEvalRequest' from JSON`,
|
|
1136
|
-
);
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
/** @internal */
|
|
1140
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$inboundSchema:
|
|
1141
|
-
z.ZodNativeEnum<
|
|
1142
|
-
typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type
|
|
1143
|
-
> = z.nativeEnum(InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type);
|
|
1144
|
-
|
|
1145
|
-
/** @internal */
|
|
1146
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$outboundSchema:
|
|
1147
|
-
z.ZodNativeEnum<
|
|
1148
|
-
typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type
|
|
1149
|
-
> = InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$inboundSchema;
|
|
1150
|
-
|
|
1151
|
-
/**
|
|
1152
|
-
* @internal
|
|
1153
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1154
|
-
*/
|
|
1155
|
-
export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$ {
|
|
1156
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$inboundSchema` instead. */
|
|
1157
|
-
export const inboundSchema =
|
|
1158
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$inboundSchema;
|
|
1159
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$outboundSchema` instead. */
|
|
1160
|
-
export const outboundSchema =
|
|
1161
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$outboundSchema;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
/** @internal */
|
|
1165
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema:
|
|
1166
|
-
z.ZodType<
|
|
1167
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue,
|
|
1168
|
-
z.ZodTypeDef,
|
|
1169
|
-
unknown
|
|
1170
|
-
> = z.union([z.number(), z.boolean()]);
|
|
1171
|
-
|
|
1172
|
-
/** @internal */
|
|
1173
|
-
export type InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$Outbound =
|
|
1174
|
-
| number
|
|
1175
|
-
| boolean;
|
|
1176
|
-
|
|
1177
|
-
/** @internal */
|
|
1178
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$outboundSchema:
|
|
1179
|
-
z.ZodType<
|
|
1180
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$Outbound,
|
|
1181
|
-
z.ZodTypeDef,
|
|
1182
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue
|
|
1183
|
-
> = z.union([z.number(), z.boolean()]);
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* @internal
|
|
1187
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1188
|
-
*/
|
|
1189
|
-
export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$ {
|
|
1190
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema` instead. */
|
|
1191
|
-
export const inboundSchema =
|
|
1192
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema;
|
|
1193
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$outboundSchema` instead. */
|
|
1194
|
-
export const outboundSchema =
|
|
1195
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$outboundSchema;
|
|
1196
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$Outbound` instead. */
|
|
1197
|
-
export type Outbound =
|
|
1198
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$Outbound;
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
export function invokeEvalResponseBodyEvalsResponse200ApplicationJSONValueToJSON(
|
|
1202
|
-
invokeEvalResponseBodyEvalsResponse200ApplicationJSONValue:
|
|
1203
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue,
|
|
1204
|
-
): string {
|
|
1205
|
-
return JSON.stringify(
|
|
1206
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$outboundSchema
|
|
1207
|
-
.parse(invokeEvalResponseBodyEvalsResponse200ApplicationJSONValue),
|
|
1208
|
-
);
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
export function invokeEvalResponseBodyEvalsResponse200ApplicationJSONValueFromJSON(
|
|
1212
|
-
jsonString: string,
|
|
1213
|
-
): SafeParseResult<
|
|
1214
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue,
|
|
1215
|
-
SDKValidationError
|
|
1216
|
-
> {
|
|
1217
|
-
return safeParse(
|
|
1218
|
-
jsonString,
|
|
1219
|
-
(x) =>
|
|
1220
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema
|
|
1221
|
-
.parse(JSON.parse(x)),
|
|
1222
|
-
`Failed to parse 'InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue' from JSON`,
|
|
1223
|
-
);
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
/** @internal */
|
|
1227
|
-
export const InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema:
|
|
1228
|
-
z.ZodType<
|
|
1229
|
-
InvokeEvalResponseBodyEvalsResponse200Value,
|
|
1230
|
-
z.ZodTypeDef,
|
|
1231
|
-
unknown
|
|
1232
|
-
> = z.object({
|
|
1233
|
-
type: z.string(),
|
|
1234
|
-
value: z.union([z.number(), z.boolean()]),
|
|
1235
|
-
});
|
|
1236
|
-
|
|
1237
|
-
/** @internal */
|
|
1238
|
-
export type InvokeEvalResponseBodyEvalsResponse200Value$Outbound = {
|
|
1239
|
-
type: string;
|
|
1240
|
-
value: number | boolean;
|
|
1241
|
-
};
|
|
1242
|
-
|
|
1243
|
-
/** @internal */
|
|
1244
|
-
export const InvokeEvalResponseBodyEvalsResponse200Value$outboundSchema:
|
|
1245
|
-
z.ZodType<
|
|
1246
|
-
InvokeEvalResponseBodyEvalsResponse200Value$Outbound,
|
|
1247
|
-
z.ZodTypeDef,
|
|
1248
|
-
InvokeEvalResponseBodyEvalsResponse200Value
|
|
1249
|
-
> = z.object({
|
|
1250
|
-
type: z.string(),
|
|
1251
|
-
value: z.union([z.number(), z.boolean()]),
|
|
1252
|
-
});
|
|
1253
|
-
|
|
1254
|
-
/**
|
|
1255
|
-
* @internal
|
|
1256
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1257
|
-
*/
|
|
1258
|
-
export namespace InvokeEvalResponseBodyEvalsResponse200Value$ {
|
|
1259
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema` instead. */
|
|
1260
|
-
export const inboundSchema =
|
|
1261
|
-
InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema;
|
|
1262
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200Value$outboundSchema` instead. */
|
|
1263
|
-
export const outboundSchema =
|
|
1264
|
-
InvokeEvalResponseBodyEvalsResponse200Value$outboundSchema;
|
|
1265
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200Value$Outbound` instead. */
|
|
1266
|
-
export type Outbound = InvokeEvalResponseBodyEvalsResponse200Value$Outbound;
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
export function invokeEvalResponseBodyEvalsResponse200ValueToJSON(
|
|
1270
|
-
invokeEvalResponseBodyEvalsResponse200Value:
|
|
1271
|
-
InvokeEvalResponseBodyEvalsResponse200Value,
|
|
1272
|
-
): string {
|
|
1273
|
-
return JSON.stringify(
|
|
1274
|
-
InvokeEvalResponseBodyEvalsResponse200Value$outboundSchema.parse(
|
|
1275
|
-
invokeEvalResponseBodyEvalsResponse200Value,
|
|
1276
|
-
),
|
|
1277
|
-
);
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
export function invokeEvalResponseBodyEvalsResponse200ValueFromJSON(
|
|
1281
|
-
jsonString: string,
|
|
1282
|
-
): SafeParseResult<
|
|
1283
|
-
InvokeEvalResponseBodyEvalsResponse200Value,
|
|
1284
|
-
SDKValidationError
|
|
1285
|
-
> {
|
|
1286
|
-
return safeParse(
|
|
1287
|
-
jsonString,
|
|
1288
|
-
(x) =>
|
|
1289
|
-
InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema.parse(
|
|
1290
|
-
JSON.parse(x),
|
|
1291
|
-
),
|
|
1292
|
-
`Failed to parse 'InvokeEvalResponseBodyEvalsResponse200Value' from JSON`,
|
|
1293
|
-
);
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
/** @internal */
|
|
1297
|
-
export const InvokeEvalResponseBodyHTTP$inboundSchema: z.ZodType<
|
|
1298
|
-
InvokeEvalResponseBodyHTTP,
|
|
1299
|
-
z.ZodTypeDef,
|
|
1300
|
-
unknown
|
|
1301
|
-
> = z.object({
|
|
1302
|
-
type:
|
|
1303
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$inboundSchema,
|
|
1304
|
-
value: z.nullable(
|
|
1305
|
-
z.lazy(() => InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema),
|
|
1306
|
-
).optional(),
|
|
1307
|
-
});
|
|
1308
|
-
|
|
1309
|
-
/** @internal */
|
|
1310
|
-
export type InvokeEvalResponseBodyHTTP$Outbound = {
|
|
1311
|
-
type: string;
|
|
1312
|
-
value?:
|
|
1313
|
-
| InvokeEvalResponseBodyEvalsResponse200Value$Outbound
|
|
1314
|
-
| null
|
|
1315
|
-
| undefined;
|
|
1316
|
-
};
|
|
1317
|
-
|
|
1318
|
-
/** @internal */
|
|
1319
|
-
export const InvokeEvalResponseBodyHTTP$outboundSchema: z.ZodType<
|
|
1320
|
-
InvokeEvalResponseBodyHTTP$Outbound,
|
|
1321
|
-
z.ZodTypeDef,
|
|
1322
|
-
InvokeEvalResponseBodyHTTP
|
|
1323
|
-
> = z.object({
|
|
1324
|
-
type:
|
|
1325
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson8Type$outboundSchema,
|
|
1326
|
-
value: z.nullable(
|
|
1327
|
-
z.lazy(() => InvokeEvalResponseBodyEvalsResponse200Value$outboundSchema),
|
|
1328
|
-
).optional(),
|
|
1329
|
-
});
|
|
1330
|
-
|
|
1331
|
-
/**
|
|
1332
|
-
* @internal
|
|
1333
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1334
|
-
*/
|
|
1335
|
-
export namespace InvokeEvalResponseBodyHTTP$ {
|
|
1336
|
-
/** @deprecated use `InvokeEvalResponseBodyHTTP$inboundSchema` instead. */
|
|
1337
|
-
export const inboundSchema = InvokeEvalResponseBodyHTTP$inboundSchema;
|
|
1338
|
-
/** @deprecated use `InvokeEvalResponseBodyHTTP$outboundSchema` instead. */
|
|
1339
|
-
export const outboundSchema = InvokeEvalResponseBodyHTTP$outboundSchema;
|
|
1340
|
-
/** @deprecated use `InvokeEvalResponseBodyHTTP$Outbound` instead. */
|
|
1341
|
-
export type Outbound = InvokeEvalResponseBodyHTTP$Outbound;
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
export function invokeEvalResponseBodyHTTPToJSON(
|
|
1345
|
-
invokeEvalResponseBodyHTTP: InvokeEvalResponseBodyHTTP,
|
|
1346
|
-
): string {
|
|
1347
|
-
return JSON.stringify(
|
|
1348
|
-
InvokeEvalResponseBodyHTTP$outboundSchema.parse(invokeEvalResponseBodyHTTP),
|
|
1349
|
-
);
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
export function invokeEvalResponseBodyHTTPFromJSON(
|
|
1353
|
-
jsonString: string,
|
|
1354
|
-
): SafeParseResult<InvokeEvalResponseBodyHTTP, SDKValidationError> {
|
|
1355
|
-
return safeParse(
|
|
1356
|
-
jsonString,
|
|
1357
|
-
(x) => InvokeEvalResponseBodyHTTP$inboundSchema.parse(JSON.parse(x)),
|
|
1358
|
-
`Failed to parse 'InvokeEvalResponseBodyHTTP' from JSON`,
|
|
1359
|
-
);
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
/** @internal */
|
|
1363
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$inboundSchema:
|
|
1364
|
-
z.ZodNativeEnum<
|
|
1365
|
-
typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type
|
|
1366
|
-
> = z.nativeEnum(InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type);
|
|
1367
|
-
|
|
1368
|
-
/** @internal */
|
|
1369
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$outboundSchema:
|
|
1370
|
-
z.ZodNativeEnum<
|
|
1371
|
-
typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type
|
|
1372
|
-
> = InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$inboundSchema;
|
|
1373
|
-
|
|
1374
|
-
/**
|
|
1375
|
-
* @internal
|
|
1376
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1377
|
-
*/
|
|
1378
|
-
export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$ {
|
|
1379
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$inboundSchema` instead. */
|
|
1380
|
-
export const inboundSchema =
|
|
1381
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$inboundSchema;
|
|
1382
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$outboundSchema` instead. */
|
|
1383
|
-
export const outboundSchema =
|
|
1384
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$outboundSchema;
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
/** @internal */
|
|
1388
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema:
|
|
1389
|
-
z.ZodType<
|
|
1390
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value,
|
|
1391
|
-
z.ZodTypeDef,
|
|
1392
|
-
unknown
|
|
1393
|
-
> = z.union([z.number(), z.boolean(), z.string()]);
|
|
1394
|
-
|
|
1395
|
-
/** @internal */
|
|
1396
|
-
export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$Outbound =
|
|
1397
|
-
| number
|
|
1398
|
-
| boolean
|
|
1399
|
-
| string;
|
|
1400
|
-
|
|
1401
|
-
/** @internal */
|
|
1402
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$outboundSchema:
|
|
1403
|
-
z.ZodType<
|
|
1404
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$Outbound,
|
|
1405
|
-
z.ZodTypeDef,
|
|
1406
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value
|
|
1407
|
-
> = z.union([z.number(), z.boolean(), z.string()]);
|
|
1408
|
-
|
|
1409
|
-
/**
|
|
1410
|
-
* @internal
|
|
1411
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1412
|
-
*/
|
|
1413
|
-
export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$ {
|
|
1414
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema` instead. */
|
|
1415
|
-
export const inboundSchema =
|
|
1416
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema;
|
|
1417
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$outboundSchema` instead. */
|
|
1418
|
-
export const outboundSchema =
|
|
1419
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$outboundSchema;
|
|
1420
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$Outbound` instead. */
|
|
1421
|
-
export type Outbound =
|
|
1422
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$Outbound;
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
export function invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueToJSON(
|
|
1426
|
-
invokeEvalResponseBodyEvalsResponse200ApplicationJson7Value:
|
|
1427
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value,
|
|
1428
|
-
): string {
|
|
1429
|
-
return JSON.stringify(
|
|
1430
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$outboundSchema
|
|
1431
|
-
.parse(invokeEvalResponseBodyEvalsResponse200ApplicationJson7Value),
|
|
1432
|
-
);
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
export function invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueFromJSON(
|
|
1436
|
-
jsonString: string,
|
|
1437
|
-
): SafeParseResult<
|
|
1438
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value,
|
|
1439
|
-
SDKValidationError
|
|
1440
|
-
> {
|
|
1441
|
-
return safeParse(
|
|
1442
|
-
jsonString,
|
|
1443
|
-
(x) =>
|
|
1444
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema
|
|
1445
|
-
.parse(JSON.parse(x)),
|
|
1446
|
-
`Failed to parse 'InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value' from JSON`,
|
|
1447
|
-
);
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
/** @internal */
|
|
1451
|
-
export const ResponseBodyOriginalValue$inboundSchema: z.ZodType<
|
|
1452
|
-
ResponseBodyOriginalValue,
|
|
1453
|
-
z.ZodTypeDef,
|
|
1454
|
-
unknown
|
|
1455
|
-
> = z.union([z.number(), z.boolean(), z.string()]);
|
|
1456
|
-
|
|
1457
|
-
/** @internal */
|
|
1458
|
-
export type ResponseBodyOriginalValue$Outbound = number | boolean | string;
|
|
1459
|
-
|
|
1460
|
-
/** @internal */
|
|
1461
|
-
export const ResponseBodyOriginalValue$outboundSchema: z.ZodType<
|
|
1462
|
-
ResponseBodyOriginalValue$Outbound,
|
|
1463
|
-
z.ZodTypeDef,
|
|
1464
|
-
ResponseBodyOriginalValue
|
|
1465
|
-
> = z.union([z.number(), z.boolean(), z.string()]);
|
|
1466
|
-
|
|
1467
|
-
/**
|
|
1468
|
-
* @internal
|
|
1469
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1470
|
-
*/
|
|
1471
|
-
export namespace ResponseBodyOriginalValue$ {
|
|
1472
|
-
/** @deprecated use `ResponseBodyOriginalValue$inboundSchema` instead. */
|
|
1473
|
-
export const inboundSchema = ResponseBodyOriginalValue$inboundSchema;
|
|
1474
|
-
/** @deprecated use `ResponseBodyOriginalValue$outboundSchema` instead. */
|
|
1475
|
-
export const outboundSchema = ResponseBodyOriginalValue$outboundSchema;
|
|
1476
|
-
/** @deprecated use `ResponseBodyOriginalValue$Outbound` instead. */
|
|
1477
|
-
export type Outbound = ResponseBodyOriginalValue$Outbound;
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
export function responseBodyOriginalValueToJSON(
|
|
1481
|
-
responseBodyOriginalValue: ResponseBodyOriginalValue,
|
|
1482
|
-
): string {
|
|
1483
|
-
return JSON.stringify(
|
|
1484
|
-
ResponseBodyOriginalValue$outboundSchema.parse(responseBodyOriginalValue),
|
|
1485
|
-
);
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
export function responseBodyOriginalValueFromJSON(
|
|
1489
|
-
jsonString: string,
|
|
1490
|
-
): SafeParseResult<ResponseBodyOriginalValue, SDKValidationError> {
|
|
1491
|
-
return safeParse(
|
|
1492
|
-
jsonString,
|
|
1493
|
-
(x) => ResponseBodyOriginalValue$inboundSchema.parse(JSON.parse(x)),
|
|
1494
|
-
`Failed to parse 'ResponseBodyOriginalValue' from JSON`,
|
|
1495
|
-
);
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
/** @internal */
|
|
1499
|
-
export const InvokeEvalResponseBodyEvalsResponseValue$inboundSchema: z.ZodType<
|
|
1500
|
-
InvokeEvalResponseBodyEvalsResponseValue,
|
|
1501
|
-
z.ZodTypeDef,
|
|
1502
|
-
unknown
|
|
1503
|
-
> = z.object({
|
|
1504
|
-
workflow_run_id: z.string(),
|
|
1505
|
-
value: z.union([z.number(), z.boolean(), z.string()]),
|
|
1506
|
-
explanation: z.nullable(z.string()).optional(),
|
|
1507
|
-
original_value: z.nullable(z.union([z.number(), z.boolean(), z.string()]))
|
|
1508
|
-
.optional(),
|
|
1509
|
-
original_explanation: z.nullable(z.string()).optional(),
|
|
1510
|
-
}).transform((v) => {
|
|
1511
|
-
return remap$(v, {
|
|
1512
|
-
"workflow_run_id": "workflowRunId",
|
|
1513
|
-
"original_value": "originalValue",
|
|
1514
|
-
"original_explanation": "originalExplanation",
|
|
1515
|
-
});
|
|
1516
|
-
});
|
|
1517
|
-
|
|
1518
|
-
/** @internal */
|
|
1519
|
-
export type InvokeEvalResponseBodyEvalsResponseValue$Outbound = {
|
|
1520
|
-
workflow_run_id: string;
|
|
1521
|
-
value: number | boolean | string;
|
|
1522
|
-
explanation?: string | null | undefined;
|
|
1523
|
-
original_value?: number | boolean | string | null | undefined;
|
|
1524
|
-
original_explanation?: string | null | undefined;
|
|
1525
|
-
};
|
|
1526
|
-
|
|
1527
|
-
/** @internal */
|
|
1528
|
-
export const InvokeEvalResponseBodyEvalsResponseValue$outboundSchema: z.ZodType<
|
|
1529
|
-
InvokeEvalResponseBodyEvalsResponseValue$Outbound,
|
|
1530
|
-
z.ZodTypeDef,
|
|
1531
|
-
InvokeEvalResponseBodyEvalsResponseValue
|
|
1532
|
-
> = z.object({
|
|
1533
|
-
workflowRunId: z.string(),
|
|
1534
|
-
value: z.union([z.number(), z.boolean(), z.string()]),
|
|
1535
|
-
explanation: z.nullable(z.string()).optional(),
|
|
1536
|
-
originalValue: z.nullable(z.union([z.number(), z.boolean(), z.string()]))
|
|
1537
|
-
.optional(),
|
|
1538
|
-
originalExplanation: z.nullable(z.string()).optional(),
|
|
1539
|
-
}).transform((v) => {
|
|
1540
|
-
return remap$(v, {
|
|
1541
|
-
workflowRunId: "workflow_run_id",
|
|
1542
|
-
originalValue: "original_value",
|
|
1543
|
-
originalExplanation: "original_explanation",
|
|
1544
|
-
});
|
|
1545
|
-
});
|
|
1546
|
-
|
|
1547
|
-
/**
|
|
1548
|
-
* @internal
|
|
1549
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1550
|
-
*/
|
|
1551
|
-
export namespace InvokeEvalResponseBodyEvalsResponseValue$ {
|
|
1552
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponseValue$inboundSchema` instead. */
|
|
1553
|
-
export const inboundSchema =
|
|
1554
|
-
InvokeEvalResponseBodyEvalsResponseValue$inboundSchema;
|
|
1555
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponseValue$outboundSchema` instead. */
|
|
1556
|
-
export const outboundSchema =
|
|
1557
|
-
InvokeEvalResponseBodyEvalsResponseValue$outboundSchema;
|
|
1558
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponseValue$Outbound` instead. */
|
|
1559
|
-
export type Outbound = InvokeEvalResponseBodyEvalsResponseValue$Outbound;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
export function invokeEvalResponseBodyEvalsResponseValueToJSON(
|
|
1563
|
-
invokeEvalResponseBodyEvalsResponseValue:
|
|
1564
|
-
InvokeEvalResponseBodyEvalsResponseValue,
|
|
1565
|
-
): string {
|
|
1566
|
-
return JSON.stringify(
|
|
1567
|
-
InvokeEvalResponseBodyEvalsResponseValue$outboundSchema.parse(
|
|
1568
|
-
invokeEvalResponseBodyEvalsResponseValue,
|
|
1569
|
-
),
|
|
1570
|
-
);
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
export function invokeEvalResponseBodyEvalsResponseValueFromJSON(
|
|
1574
|
-
jsonString: string,
|
|
1575
|
-
): SafeParseResult<
|
|
1576
|
-
InvokeEvalResponseBodyEvalsResponseValue,
|
|
1577
|
-
SDKValidationError
|
|
1578
|
-
> {
|
|
1579
|
-
return safeParse(
|
|
1580
|
-
jsonString,
|
|
1581
|
-
(x) =>
|
|
1582
|
-
InvokeEvalResponseBodyEvalsResponseValue$inboundSchema.parse(
|
|
1583
|
-
JSON.parse(x),
|
|
1584
|
-
),
|
|
1585
|
-
`Failed to parse 'InvokeEvalResponseBodyEvalsResponseValue' from JSON`,
|
|
1586
|
-
);
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
/** @internal */
|
|
1590
|
-
export const InvokeEvalResponseBodyLLM$inboundSchema: z.ZodType<
|
|
1591
|
-
InvokeEvalResponseBodyLLM,
|
|
1592
|
-
z.ZodTypeDef,
|
|
1593
|
-
unknown
|
|
1594
|
-
> = z.object({
|
|
1595
|
-
type:
|
|
1596
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$inboundSchema,
|
|
1597
|
-
value: z.nullable(
|
|
1598
|
-
z.lazy(() => InvokeEvalResponseBodyEvalsResponseValue$inboundSchema),
|
|
1599
|
-
),
|
|
1600
|
-
});
|
|
1601
|
-
|
|
1602
|
-
/** @internal */
|
|
1603
|
-
export type InvokeEvalResponseBodyLLM$Outbound = {
|
|
1604
|
-
type: string;
|
|
1605
|
-
value: InvokeEvalResponseBodyEvalsResponseValue$Outbound | null;
|
|
1606
|
-
};
|
|
1607
|
-
|
|
1608
|
-
/** @internal */
|
|
1609
|
-
export const InvokeEvalResponseBodyLLM$outboundSchema: z.ZodType<
|
|
1610
|
-
InvokeEvalResponseBodyLLM$Outbound,
|
|
1611
|
-
z.ZodTypeDef,
|
|
1612
|
-
InvokeEvalResponseBodyLLM
|
|
1613
|
-
> = z.object({
|
|
1614
|
-
type:
|
|
1615
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Type$outboundSchema,
|
|
1616
|
-
value: z.nullable(
|
|
1617
|
-
z.lazy(() => InvokeEvalResponseBodyEvalsResponseValue$outboundSchema),
|
|
1618
|
-
),
|
|
1619
|
-
});
|
|
1620
|
-
|
|
1621
|
-
/**
|
|
1622
|
-
* @internal
|
|
1623
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1624
|
-
*/
|
|
1625
|
-
export namespace InvokeEvalResponseBodyLLM$ {
|
|
1626
|
-
/** @deprecated use `InvokeEvalResponseBodyLLM$inboundSchema` instead. */
|
|
1627
|
-
export const inboundSchema = InvokeEvalResponseBodyLLM$inboundSchema;
|
|
1628
|
-
/** @deprecated use `InvokeEvalResponseBodyLLM$outboundSchema` instead. */
|
|
1629
|
-
export const outboundSchema = InvokeEvalResponseBodyLLM$outboundSchema;
|
|
1630
|
-
/** @deprecated use `InvokeEvalResponseBodyLLM$Outbound` instead. */
|
|
1631
|
-
export type Outbound = InvokeEvalResponseBodyLLM$Outbound;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
export function invokeEvalResponseBodyLLMToJSON(
|
|
1635
|
-
invokeEvalResponseBodyLLM: InvokeEvalResponseBodyLLM,
|
|
1636
|
-
): string {
|
|
1637
|
-
return JSON.stringify(
|
|
1638
|
-
InvokeEvalResponseBodyLLM$outboundSchema.parse(invokeEvalResponseBodyLLM),
|
|
1639
|
-
);
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
export function invokeEvalResponseBodyLLMFromJSON(
|
|
1643
|
-
jsonString: string,
|
|
1644
|
-
): SafeParseResult<InvokeEvalResponseBodyLLM, SDKValidationError> {
|
|
1645
|
-
return safeParse(
|
|
1646
|
-
jsonString,
|
|
1647
|
-
(x) => InvokeEvalResponseBodyLLM$inboundSchema.parse(JSON.parse(x)),
|
|
1648
|
-
`Failed to parse 'InvokeEvalResponseBodyLLM' from JSON`,
|
|
1649
|
-
);
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
/** @internal */
|
|
1653
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$inboundSchema:
|
|
1654
|
-
z.ZodNativeEnum<
|
|
1655
|
-
typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type
|
|
1656
|
-
> = z.nativeEnum(InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type);
|
|
1657
|
-
|
|
1658
|
-
/** @internal */
|
|
1659
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$outboundSchema:
|
|
1660
|
-
z.ZodNativeEnum<
|
|
1661
|
-
typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type
|
|
1662
|
-
> = InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$inboundSchema;
|
|
1663
|
-
|
|
1664
|
-
/**
|
|
1665
|
-
* @internal
|
|
1666
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1667
|
-
*/
|
|
1668
|
-
export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$ {
|
|
1669
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$inboundSchema` instead. */
|
|
1670
|
-
export const inboundSchema =
|
|
1671
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$inboundSchema;
|
|
1672
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$outboundSchema` instead. */
|
|
1673
|
-
export const outboundSchema =
|
|
1674
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$outboundSchema;
|
|
1675
|
-
}
|
|
1676
|
-
|
|
1677
|
-
/** @internal */
|
|
1678
|
-
export const InvokeEvalResponseBodyEvalsValue$inboundSchema: z.ZodType<
|
|
1679
|
-
InvokeEvalResponseBodyEvalsValue,
|
|
1680
|
-
z.ZodTypeDef,
|
|
1681
|
-
unknown
|
|
1682
|
-
> = z.object({
|
|
1683
|
-
f1: z.number(),
|
|
1684
|
-
precision: z.number(),
|
|
1685
|
-
recall: z.number(),
|
|
1686
|
-
});
|
|
1687
|
-
|
|
1688
|
-
/** @internal */
|
|
1689
|
-
export type InvokeEvalResponseBodyEvalsValue$Outbound = {
|
|
1690
|
-
f1: number;
|
|
1691
|
-
precision: number;
|
|
1692
|
-
recall: number;
|
|
1693
|
-
};
|
|
1694
|
-
|
|
1695
|
-
/** @internal */
|
|
1696
|
-
export const InvokeEvalResponseBodyEvalsValue$outboundSchema: z.ZodType<
|
|
1697
|
-
InvokeEvalResponseBodyEvalsValue$Outbound,
|
|
1698
|
-
z.ZodTypeDef,
|
|
1699
|
-
InvokeEvalResponseBodyEvalsValue
|
|
1700
|
-
> = z.object({
|
|
1701
|
-
f1: z.number(),
|
|
1702
|
-
precision: z.number(),
|
|
1703
|
-
recall: z.number(),
|
|
1704
|
-
});
|
|
1705
|
-
|
|
1706
|
-
/**
|
|
1707
|
-
* @internal
|
|
1708
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1709
|
-
*/
|
|
1710
|
-
export namespace InvokeEvalResponseBodyEvalsValue$ {
|
|
1711
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsValue$inboundSchema` instead. */
|
|
1712
|
-
export const inboundSchema = InvokeEvalResponseBodyEvalsValue$inboundSchema;
|
|
1713
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsValue$outboundSchema` instead. */
|
|
1714
|
-
export const outboundSchema = InvokeEvalResponseBodyEvalsValue$outboundSchema;
|
|
1715
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsValue$Outbound` instead. */
|
|
1716
|
-
export type Outbound = InvokeEvalResponseBodyEvalsValue$Outbound;
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
export function invokeEvalResponseBodyEvalsValueToJSON(
|
|
1720
|
-
invokeEvalResponseBodyEvalsValue: InvokeEvalResponseBodyEvalsValue,
|
|
1721
|
-
): string {
|
|
1722
|
-
return JSON.stringify(
|
|
1723
|
-
InvokeEvalResponseBodyEvalsValue$outboundSchema.parse(
|
|
1724
|
-
invokeEvalResponseBodyEvalsValue,
|
|
1725
|
-
),
|
|
1726
|
-
);
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
|
-
export function invokeEvalResponseBodyEvalsValueFromJSON(
|
|
1730
|
-
jsonString: string,
|
|
1731
|
-
): SafeParseResult<InvokeEvalResponseBodyEvalsValue, SDKValidationError> {
|
|
1732
|
-
return safeParse(
|
|
1733
|
-
jsonString,
|
|
1734
|
-
(x) => InvokeEvalResponseBodyEvalsValue$inboundSchema.parse(JSON.parse(x)),
|
|
1735
|
-
`Failed to parse 'InvokeEvalResponseBodyEvalsValue' from JSON`,
|
|
1736
|
-
);
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
|
-
/** @internal */
|
|
1740
|
-
export const BERTScore$inboundSchema: z.ZodType<
|
|
1741
|
-
BERTScore,
|
|
1742
|
-
z.ZodTypeDef,
|
|
1743
|
-
unknown
|
|
1744
|
-
> = z.object({
|
|
1745
|
-
type:
|
|
1746
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$inboundSchema,
|
|
1747
|
-
value: z.lazy(() => InvokeEvalResponseBodyEvalsValue$inboundSchema),
|
|
1748
|
-
});
|
|
1749
|
-
|
|
1750
|
-
/** @internal */
|
|
1751
|
-
export type BERTScore$Outbound = {
|
|
1752
|
-
type: string;
|
|
1753
|
-
value: InvokeEvalResponseBodyEvalsValue$Outbound;
|
|
1754
|
-
};
|
|
1755
|
-
|
|
1756
|
-
/** @internal */
|
|
1757
|
-
export const BERTScore$outboundSchema: z.ZodType<
|
|
1758
|
-
BERTScore$Outbound,
|
|
1759
|
-
z.ZodTypeDef,
|
|
1760
|
-
BERTScore
|
|
1761
|
-
> = z.object({
|
|
1762
|
-
type:
|
|
1763
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJson6Type$outboundSchema,
|
|
1764
|
-
value: z.lazy(() => InvokeEvalResponseBodyEvalsValue$outboundSchema),
|
|
1765
|
-
});
|
|
1766
|
-
|
|
1767
|
-
/**
|
|
1768
|
-
* @internal
|
|
1769
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1770
|
-
*/
|
|
1771
|
-
export namespace BERTScore$ {
|
|
1772
|
-
/** @deprecated use `BERTScore$inboundSchema` instead. */
|
|
1773
|
-
export const inboundSchema = BERTScore$inboundSchema;
|
|
1774
|
-
/** @deprecated use `BERTScore$outboundSchema` instead. */
|
|
1775
|
-
export const outboundSchema = BERTScore$outboundSchema;
|
|
1776
|
-
/** @deprecated use `BERTScore$Outbound` instead. */
|
|
1777
|
-
export type Outbound = BERTScore$Outbound;
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
export function bertScoreToJSON(bertScore: BERTScore): string {
|
|
1781
|
-
return JSON.stringify(BERTScore$outboundSchema.parse(bertScore));
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
export function bertScoreFromJSON(
|
|
1785
|
-
jsonString: string,
|
|
1786
|
-
): SafeParseResult<BERTScore, SDKValidationError> {
|
|
1787
|
-
return safeParse(
|
|
1788
|
-
jsonString,
|
|
1789
|
-
(x) => BERTScore$inboundSchema.parse(JSON.parse(x)),
|
|
1790
|
-
`Failed to parse 'BERTScore' from JSON`,
|
|
1791
|
-
);
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
/** @internal */
|
|
1795
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema:
|
|
1796
|
-
z.ZodNativeEnum<
|
|
1797
|
-
typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType
|
|
1798
|
-
> = z.nativeEnum(InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType);
|
|
1799
|
-
|
|
1800
|
-
/** @internal */
|
|
1801
|
-
export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$outboundSchema:
|
|
1802
|
-
z.ZodNativeEnum<
|
|
1803
|
-
typeof InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType
|
|
1804
|
-
> = InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema;
|
|
1805
|
-
|
|
1806
|
-
/**
|
|
1807
|
-
* @internal
|
|
1808
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1809
|
-
*/
|
|
1810
|
-
export namespace InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$ {
|
|
1811
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema` instead. */
|
|
1812
|
-
export const inboundSchema =
|
|
1813
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema;
|
|
1814
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$outboundSchema` instead. */
|
|
1815
|
-
export const outboundSchema =
|
|
1816
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$outboundSchema;
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
/** @internal */
|
|
1820
|
-
export const Rouge1$inboundSchema: z.ZodType<Rouge1, z.ZodTypeDef, unknown> = z
|
|
1821
|
-
.object({
|
|
1822
|
-
f1: z.number(),
|
|
1823
|
-
precision: z.number(),
|
|
1824
|
-
recall: z.number(),
|
|
1825
|
-
});
|
|
1826
|
-
|
|
1827
|
-
/** @internal */
|
|
1828
|
-
export type Rouge1$Outbound = {
|
|
1829
|
-
f1: number;
|
|
1830
|
-
precision: number;
|
|
1831
|
-
recall: number;
|
|
1832
|
-
};
|
|
1833
|
-
|
|
1834
|
-
/** @internal */
|
|
1835
|
-
export const Rouge1$outboundSchema: z.ZodType<
|
|
1836
|
-
Rouge1$Outbound,
|
|
1837
|
-
z.ZodTypeDef,
|
|
1838
|
-
Rouge1
|
|
1839
|
-
> = z.object({
|
|
1840
|
-
f1: z.number(),
|
|
1841
|
-
precision: z.number(),
|
|
1842
|
-
recall: z.number(),
|
|
1843
|
-
});
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
* @internal
|
|
1847
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1848
|
-
*/
|
|
1849
|
-
export namespace Rouge1$ {
|
|
1850
|
-
/** @deprecated use `Rouge1$inboundSchema` instead. */
|
|
1851
|
-
export const inboundSchema = Rouge1$inboundSchema;
|
|
1852
|
-
/** @deprecated use `Rouge1$outboundSchema` instead. */
|
|
1853
|
-
export const outboundSchema = Rouge1$outboundSchema;
|
|
1854
|
-
/** @deprecated use `Rouge1$Outbound` instead. */
|
|
1855
|
-
export type Outbound = Rouge1$Outbound;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
export function rouge1ToJSON(rouge1: Rouge1): string {
|
|
1859
|
-
return JSON.stringify(Rouge1$outboundSchema.parse(rouge1));
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
export function rouge1FromJSON(
|
|
1863
|
-
jsonString: string,
|
|
1864
|
-
): SafeParseResult<Rouge1, SDKValidationError> {
|
|
1865
|
-
return safeParse(
|
|
1866
|
-
jsonString,
|
|
1867
|
-
(x) => Rouge1$inboundSchema.parse(JSON.parse(x)),
|
|
1868
|
-
`Failed to parse 'Rouge1' from JSON`,
|
|
1869
|
-
);
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
|
-
/** @internal */
|
|
1873
|
-
export const Rouge2$inboundSchema: z.ZodType<Rouge2, z.ZodTypeDef, unknown> = z
|
|
1874
|
-
.object({
|
|
1875
|
-
f1: z.number(),
|
|
1876
|
-
precision: z.number(),
|
|
1877
|
-
recall: z.number(),
|
|
1878
|
-
});
|
|
1879
|
-
|
|
1880
|
-
/** @internal */
|
|
1881
|
-
export type Rouge2$Outbound = {
|
|
1882
|
-
f1: number;
|
|
1883
|
-
precision: number;
|
|
1884
|
-
recall: number;
|
|
1885
|
-
};
|
|
1886
|
-
|
|
1887
|
-
/** @internal */
|
|
1888
|
-
export const Rouge2$outboundSchema: z.ZodType<
|
|
1889
|
-
Rouge2$Outbound,
|
|
1890
|
-
z.ZodTypeDef,
|
|
1891
|
-
Rouge2
|
|
1892
|
-
> = z.object({
|
|
1893
|
-
f1: z.number(),
|
|
1894
|
-
precision: z.number(),
|
|
1895
|
-
recall: z.number(),
|
|
1896
|
-
});
|
|
1897
|
-
|
|
1898
|
-
/**
|
|
1899
|
-
* @internal
|
|
1900
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1901
|
-
*/
|
|
1902
|
-
export namespace Rouge2$ {
|
|
1903
|
-
/** @deprecated use `Rouge2$inboundSchema` instead. */
|
|
1904
|
-
export const inboundSchema = Rouge2$inboundSchema;
|
|
1905
|
-
/** @deprecated use `Rouge2$outboundSchema` instead. */
|
|
1906
|
-
export const outboundSchema = Rouge2$outboundSchema;
|
|
1907
|
-
/** @deprecated use `Rouge2$Outbound` instead. */
|
|
1908
|
-
export type Outbound = Rouge2$Outbound;
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
export function rouge2ToJSON(rouge2: Rouge2): string {
|
|
1912
|
-
return JSON.stringify(Rouge2$outboundSchema.parse(rouge2));
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
export function rouge2FromJSON(
|
|
1916
|
-
jsonString: string,
|
|
1917
|
-
): SafeParseResult<Rouge2, SDKValidationError> {
|
|
1918
|
-
return safeParse(
|
|
1919
|
-
jsonString,
|
|
1920
|
-
(x) => Rouge2$inboundSchema.parse(JSON.parse(x)),
|
|
1921
|
-
`Failed to parse 'Rouge2' from JSON`,
|
|
1922
|
-
);
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
/** @internal */
|
|
1926
|
-
export const RougeL$inboundSchema: z.ZodType<RougeL, z.ZodTypeDef, unknown> = z
|
|
1927
|
-
.object({
|
|
1928
|
-
f1: z.number(),
|
|
1929
|
-
precision: z.number(),
|
|
1930
|
-
recall: z.number(),
|
|
1931
|
-
});
|
|
1932
|
-
|
|
1933
|
-
/** @internal */
|
|
1934
|
-
export type RougeL$Outbound = {
|
|
1935
|
-
f1: number;
|
|
1936
|
-
precision: number;
|
|
1937
|
-
recall: number;
|
|
1938
|
-
};
|
|
1939
|
-
|
|
1940
|
-
/** @internal */
|
|
1941
|
-
export const RougeL$outboundSchema: z.ZodType<
|
|
1942
|
-
RougeL$Outbound,
|
|
1943
|
-
z.ZodTypeDef,
|
|
1944
|
-
RougeL
|
|
1945
|
-
> = z.object({
|
|
1946
|
-
f1: z.number(),
|
|
1947
|
-
precision: z.number(),
|
|
1948
|
-
recall: z.number(),
|
|
1949
|
-
});
|
|
1950
|
-
|
|
1951
|
-
/**
|
|
1952
|
-
* @internal
|
|
1953
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1954
|
-
*/
|
|
1955
|
-
export namespace RougeL$ {
|
|
1956
|
-
/** @deprecated use `RougeL$inboundSchema` instead. */
|
|
1957
|
-
export const inboundSchema = RougeL$inboundSchema;
|
|
1958
|
-
/** @deprecated use `RougeL$outboundSchema` instead. */
|
|
1959
|
-
export const outboundSchema = RougeL$outboundSchema;
|
|
1960
|
-
/** @deprecated use `RougeL$Outbound` instead. */
|
|
1961
|
-
export type Outbound = RougeL$Outbound;
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
export function rougeLToJSON(rougeL: RougeL): string {
|
|
1965
|
-
return JSON.stringify(RougeL$outboundSchema.parse(rougeL));
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
export function rougeLFromJSON(
|
|
1969
|
-
jsonString: string,
|
|
1970
|
-
): SafeParseResult<RougeL, SDKValidationError> {
|
|
1971
|
-
return safeParse(
|
|
1972
|
-
jsonString,
|
|
1973
|
-
(x) => RougeL$inboundSchema.parse(JSON.parse(x)),
|
|
1974
|
-
`Failed to parse 'RougeL' from JSON`,
|
|
1975
|
-
);
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
/** @internal */
|
|
1979
|
-
export const InvokeEvalResponseBodyValue$inboundSchema: z.ZodType<
|
|
1980
|
-
InvokeEvalResponseBodyValue,
|
|
1981
|
-
z.ZodTypeDef,
|
|
1982
|
-
unknown
|
|
1983
|
-
> = z.object({
|
|
1984
|
-
rouge_1: z.lazy(() => Rouge1$inboundSchema),
|
|
1985
|
-
rouge_2: z.lazy(() => Rouge2$inboundSchema),
|
|
1986
|
-
rouge_l: z.lazy(() => RougeL$inboundSchema),
|
|
1987
|
-
}).transform((v) => {
|
|
1988
|
-
return remap$(v, {
|
|
1989
|
-
"rouge_1": "rouge1",
|
|
1990
|
-
"rouge_2": "rouge2",
|
|
1991
|
-
"rouge_l": "rougeL",
|
|
1992
|
-
});
|
|
1993
|
-
});
|
|
1994
|
-
|
|
1995
|
-
/** @internal */
|
|
1996
|
-
export type InvokeEvalResponseBodyValue$Outbound = {
|
|
1997
|
-
rouge_1: Rouge1$Outbound;
|
|
1998
|
-
rouge_2: Rouge2$Outbound;
|
|
1999
|
-
rouge_l: RougeL$Outbound;
|
|
2000
|
-
};
|
|
2001
|
-
|
|
2002
|
-
/** @internal */
|
|
2003
|
-
export const InvokeEvalResponseBodyValue$outboundSchema: z.ZodType<
|
|
2004
|
-
InvokeEvalResponseBodyValue$Outbound,
|
|
2005
|
-
z.ZodTypeDef,
|
|
2006
|
-
InvokeEvalResponseBodyValue
|
|
2007
|
-
> = z.object({
|
|
2008
|
-
rouge1: z.lazy(() => Rouge1$outboundSchema),
|
|
2009
|
-
rouge2: z.lazy(() => Rouge2$outboundSchema),
|
|
2010
|
-
rougeL: z.lazy(() => RougeL$outboundSchema),
|
|
2011
|
-
}).transform((v) => {
|
|
2012
|
-
return remap$(v, {
|
|
2013
|
-
rouge1: "rouge_1",
|
|
2014
|
-
rouge2: "rouge_2",
|
|
2015
|
-
rougeL: "rouge_l",
|
|
2016
|
-
});
|
|
2017
|
-
});
|
|
2018
|
-
|
|
2019
|
-
/**
|
|
2020
|
-
* @internal
|
|
2021
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2022
|
-
*/
|
|
2023
|
-
export namespace InvokeEvalResponseBodyValue$ {
|
|
2024
|
-
/** @deprecated use `InvokeEvalResponseBodyValue$inboundSchema` instead. */
|
|
2025
|
-
export const inboundSchema = InvokeEvalResponseBodyValue$inboundSchema;
|
|
2026
|
-
/** @deprecated use `InvokeEvalResponseBodyValue$outboundSchema` instead. */
|
|
2027
|
-
export const outboundSchema = InvokeEvalResponseBodyValue$outboundSchema;
|
|
2028
|
-
/** @deprecated use `InvokeEvalResponseBodyValue$Outbound` instead. */
|
|
2029
|
-
export type Outbound = InvokeEvalResponseBodyValue$Outbound;
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2032
|
-
export function invokeEvalResponseBodyValueToJSON(
|
|
2033
|
-
invokeEvalResponseBodyValue: InvokeEvalResponseBodyValue,
|
|
2034
|
-
): string {
|
|
2035
|
-
return JSON.stringify(
|
|
2036
|
-
InvokeEvalResponseBodyValue$outboundSchema.parse(
|
|
2037
|
-
invokeEvalResponseBodyValue,
|
|
2038
|
-
),
|
|
2039
|
-
);
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
export function invokeEvalResponseBodyValueFromJSON(
|
|
2043
|
-
jsonString: string,
|
|
2044
|
-
): SafeParseResult<InvokeEvalResponseBodyValue, SDKValidationError> {
|
|
2045
|
-
return safeParse(
|
|
2046
|
-
jsonString,
|
|
2047
|
-
(x) => InvokeEvalResponseBodyValue$inboundSchema.parse(JSON.parse(x)),
|
|
2048
|
-
`Failed to parse 'InvokeEvalResponseBodyValue' from JSON`,
|
|
2049
|
-
);
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
/** @internal */
|
|
2053
|
-
export const RougeN$inboundSchema: z.ZodType<RougeN, z.ZodTypeDef, unknown> = z
|
|
2054
|
-
.object({
|
|
2055
|
-
type:
|
|
2056
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema,
|
|
2057
|
-
value: z.lazy(() => InvokeEvalResponseBodyValue$inboundSchema),
|
|
2058
|
-
});
|
|
2059
|
-
|
|
2060
|
-
/** @internal */
|
|
2061
|
-
export type RougeN$Outbound = {
|
|
2062
|
-
type: string;
|
|
2063
|
-
value: InvokeEvalResponseBodyValue$Outbound;
|
|
2064
|
-
};
|
|
2065
|
-
|
|
2066
|
-
/** @internal */
|
|
2067
|
-
export const RougeN$outboundSchema: z.ZodType<
|
|
2068
|
-
RougeN$Outbound,
|
|
2069
|
-
z.ZodTypeDef,
|
|
2070
|
-
RougeN
|
|
2071
|
-
> = z.object({
|
|
2072
|
-
type:
|
|
2073
|
-
InvokeEvalResponseBodyEvalsResponse200ApplicationJSONType$outboundSchema,
|
|
2074
|
-
value: z.lazy(() => InvokeEvalResponseBodyValue$outboundSchema),
|
|
2075
|
-
});
|
|
2076
|
-
|
|
2077
|
-
/**
|
|
2078
|
-
* @internal
|
|
2079
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2080
|
-
*/
|
|
2081
|
-
export namespace RougeN$ {
|
|
2082
|
-
/** @deprecated use `RougeN$inboundSchema` instead. */
|
|
2083
|
-
export const inboundSchema = RougeN$inboundSchema;
|
|
2084
|
-
/** @deprecated use `RougeN$outboundSchema` instead. */
|
|
2085
|
-
export const outboundSchema = RougeN$outboundSchema;
|
|
2086
|
-
/** @deprecated use `RougeN$Outbound` instead. */
|
|
2087
|
-
export type Outbound = RougeN$Outbound;
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
export function rougeNToJSON(rougeN: RougeN): string {
|
|
2091
|
-
return JSON.stringify(RougeN$outboundSchema.parse(rougeN));
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
export function rougeNFromJSON(
|
|
2095
|
-
jsonString: string,
|
|
2096
|
-
): SafeParseResult<RougeN, SDKValidationError> {
|
|
2097
|
-
return safeParse(
|
|
2098
|
-
jsonString,
|
|
2099
|
-
(x) => RougeN$inboundSchema.parse(JSON.parse(x)),
|
|
2100
|
-
`Failed to parse 'RougeN' from JSON`,
|
|
2101
|
-
);
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
/** @internal */
|
|
2105
|
-
export const InvokeEvalResponseBodyEvalsResponse200Type$inboundSchema:
|
|
2106
|
-
z.ZodNativeEnum<typeof InvokeEvalResponseBodyEvalsResponse200Type> = z
|
|
2107
|
-
.nativeEnum(InvokeEvalResponseBodyEvalsResponse200Type);
|
|
2108
|
-
|
|
2109
|
-
/** @internal */
|
|
2110
|
-
export const InvokeEvalResponseBodyEvalsResponse200Type$outboundSchema:
|
|
2111
|
-
z.ZodNativeEnum<typeof InvokeEvalResponseBodyEvalsResponse200Type> =
|
|
2112
|
-
InvokeEvalResponseBodyEvalsResponse200Type$inboundSchema;
|
|
2113
|
-
|
|
2114
|
-
/**
|
|
2115
|
-
* @internal
|
|
2116
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2117
|
-
*/
|
|
2118
|
-
export namespace InvokeEvalResponseBodyEvalsResponse200Type$ {
|
|
2119
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200Type$inboundSchema` instead. */
|
|
2120
|
-
export const inboundSchema =
|
|
2121
|
-
InvokeEvalResponseBodyEvalsResponse200Type$inboundSchema;
|
|
2122
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponse200Type$outboundSchema` instead. */
|
|
2123
|
-
export const outboundSchema =
|
|
2124
|
-
InvokeEvalResponseBodyEvalsResponse200Type$outboundSchema;
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
/** @internal */
|
|
2128
|
-
export const StringArray$inboundSchema: z.ZodType<
|
|
2129
|
-
StringArray,
|
|
2130
|
-
z.ZodTypeDef,
|
|
2131
|
-
unknown
|
|
2132
|
-
> = z.object({
|
|
2133
|
-
type: InvokeEvalResponseBodyEvalsResponse200Type$inboundSchema,
|
|
2134
|
-
values: z.array(z.nullable(z.string())),
|
|
2135
|
-
});
|
|
2136
|
-
|
|
2137
|
-
/** @internal */
|
|
2138
|
-
export type StringArray$Outbound = {
|
|
2139
|
-
type: string;
|
|
2140
|
-
values: Array<string | null>;
|
|
2141
|
-
};
|
|
2142
|
-
|
|
2143
|
-
/** @internal */
|
|
2144
|
-
export const StringArray$outboundSchema: z.ZodType<
|
|
2145
|
-
StringArray$Outbound,
|
|
2146
|
-
z.ZodTypeDef,
|
|
2147
|
-
StringArray
|
|
2148
|
-
> = z.object({
|
|
2149
|
-
type: InvokeEvalResponseBodyEvalsResponse200Type$outboundSchema,
|
|
2150
|
-
values: z.array(z.nullable(z.string())),
|
|
2151
|
-
});
|
|
2152
|
-
|
|
2153
|
-
/**
|
|
2154
|
-
* @internal
|
|
2155
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2156
|
-
*/
|
|
2157
|
-
export namespace StringArray$ {
|
|
2158
|
-
/** @deprecated use `StringArray$inboundSchema` instead. */
|
|
2159
|
-
export const inboundSchema = StringArray$inboundSchema;
|
|
2160
|
-
/** @deprecated use `StringArray$outboundSchema` instead. */
|
|
2161
|
-
export const outboundSchema = StringArray$outboundSchema;
|
|
2162
|
-
/** @deprecated use `StringArray$Outbound` instead. */
|
|
2163
|
-
export type Outbound = StringArray$Outbound;
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
export function stringArrayToJSON(stringArray: StringArray): string {
|
|
2167
|
-
return JSON.stringify(StringArray$outboundSchema.parse(stringArray));
|
|
2168
|
-
}
|
|
2169
|
-
|
|
2170
|
-
export function stringArrayFromJSON(
|
|
2171
|
-
jsonString: string,
|
|
2172
|
-
): SafeParseResult<StringArray, SDKValidationError> {
|
|
2173
|
-
return safeParse(
|
|
2174
|
-
jsonString,
|
|
2175
|
-
(x) => StringArray$inboundSchema.parse(JSON.parse(x)),
|
|
2176
|
-
`Failed to parse 'StringArray' from JSON`,
|
|
2177
|
-
);
|
|
2178
|
-
}
|
|
2179
|
-
|
|
2180
|
-
/** @internal */
|
|
2181
|
-
export const InvokeEvalResponseBodyEvalsResponseType$inboundSchema:
|
|
2182
|
-
z.ZodNativeEnum<typeof InvokeEvalResponseBodyEvalsResponseType> = z
|
|
2183
|
-
.nativeEnum(InvokeEvalResponseBodyEvalsResponseType);
|
|
2184
|
-
|
|
2185
|
-
/** @internal */
|
|
2186
|
-
export const InvokeEvalResponseBodyEvalsResponseType$outboundSchema:
|
|
2187
|
-
z.ZodNativeEnum<typeof InvokeEvalResponseBodyEvalsResponseType> =
|
|
2188
|
-
InvokeEvalResponseBodyEvalsResponseType$inboundSchema;
|
|
2189
|
-
|
|
2190
|
-
/**
|
|
2191
|
-
* @internal
|
|
2192
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2193
|
-
*/
|
|
2194
|
-
export namespace InvokeEvalResponseBodyEvalsResponseType$ {
|
|
2195
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponseType$inboundSchema` instead. */
|
|
2196
|
-
export const inboundSchema =
|
|
2197
|
-
InvokeEvalResponseBodyEvalsResponseType$inboundSchema;
|
|
2198
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsResponseType$outboundSchema` instead. */
|
|
2199
|
-
export const outboundSchema =
|
|
2200
|
-
InvokeEvalResponseBodyEvalsResponseType$outboundSchema;
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
/** @internal */
|
|
2204
|
-
export const ResponseBodyValue$inboundSchema: z.ZodType<
|
|
2205
|
-
ResponseBodyValue,
|
|
2206
|
-
z.ZodTypeDef,
|
|
2207
|
-
unknown
|
|
2208
|
-
> = z.union([z.boolean(), z.string(), z.number()]);
|
|
2209
|
-
|
|
2210
|
-
/** @internal */
|
|
2211
|
-
export type ResponseBodyValue$Outbound = boolean | string | number;
|
|
2212
|
-
|
|
2213
|
-
/** @internal */
|
|
2214
|
-
export const ResponseBodyValue$outboundSchema: z.ZodType<
|
|
2215
|
-
ResponseBodyValue$Outbound,
|
|
2216
|
-
z.ZodTypeDef,
|
|
2217
|
-
ResponseBodyValue
|
|
2218
|
-
> = z.union([z.boolean(), z.string(), z.number()]);
|
|
2219
|
-
|
|
2220
|
-
/**
|
|
2221
|
-
* @internal
|
|
2222
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2223
|
-
*/
|
|
2224
|
-
export namespace ResponseBodyValue$ {
|
|
2225
|
-
/** @deprecated use `ResponseBodyValue$inboundSchema` instead. */
|
|
2226
|
-
export const inboundSchema = ResponseBodyValue$inboundSchema;
|
|
2227
|
-
/** @deprecated use `ResponseBodyValue$outboundSchema` instead. */
|
|
2228
|
-
export const outboundSchema = ResponseBodyValue$outboundSchema;
|
|
2229
|
-
/** @deprecated use `ResponseBodyValue$Outbound` instead. */
|
|
2230
|
-
export type Outbound = ResponseBodyValue$Outbound;
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2233
|
-
export function responseBodyValueToJSON(
|
|
2234
|
-
responseBodyValue: ResponseBodyValue,
|
|
2235
|
-
): string {
|
|
2236
|
-
return JSON.stringify(
|
|
2237
|
-
ResponseBodyValue$outboundSchema.parse(responseBodyValue),
|
|
2238
|
-
);
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2241
|
-
export function responseBodyValueFromJSON(
|
|
2242
|
-
jsonString: string,
|
|
2243
|
-
): SafeParseResult<ResponseBodyValue, SDKValidationError> {
|
|
2244
|
-
return safeParse(
|
|
2245
|
-
jsonString,
|
|
2246
|
-
(x) => ResponseBodyValue$inboundSchema.parse(JSON.parse(x)),
|
|
2247
|
-
`Failed to parse 'ResponseBodyValue' from JSON`,
|
|
2248
|
-
);
|
|
2249
|
-
}
|
|
2250
|
-
|
|
2251
|
-
/** @internal */
|
|
2252
|
-
export const ResponseBodyBoolean$inboundSchema: z.ZodType<
|
|
2253
|
-
ResponseBodyBoolean,
|
|
2254
|
-
z.ZodTypeDef,
|
|
2255
|
-
unknown
|
|
2256
|
-
> = z.object({
|
|
2257
|
-
type: InvokeEvalResponseBodyEvalsResponseType$inboundSchema,
|
|
2258
|
-
value: z.nullable(z.union([z.boolean(), z.string(), z.number()])),
|
|
2259
|
-
});
|
|
2260
|
-
|
|
2261
|
-
/** @internal */
|
|
2262
|
-
export type ResponseBodyBoolean$Outbound = {
|
|
2263
|
-
type: string;
|
|
2264
|
-
value: boolean | string | number | null;
|
|
2265
|
-
};
|
|
2266
|
-
|
|
2267
|
-
/** @internal */
|
|
2268
|
-
export const ResponseBodyBoolean$outboundSchema: z.ZodType<
|
|
2269
|
-
ResponseBodyBoolean$Outbound,
|
|
2270
|
-
z.ZodTypeDef,
|
|
2271
|
-
ResponseBodyBoolean
|
|
2272
|
-
> = z.object({
|
|
2273
|
-
type: InvokeEvalResponseBodyEvalsResponseType$outboundSchema,
|
|
2274
|
-
value: z.nullable(z.union([z.boolean(), z.string(), z.number()])),
|
|
2275
|
-
});
|
|
2276
|
-
|
|
2277
|
-
/**
|
|
2278
|
-
* @internal
|
|
2279
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2280
|
-
*/
|
|
2281
|
-
export namespace ResponseBodyBoolean$ {
|
|
2282
|
-
/** @deprecated use `ResponseBodyBoolean$inboundSchema` instead. */
|
|
2283
|
-
export const inboundSchema = ResponseBodyBoolean$inboundSchema;
|
|
2284
|
-
/** @deprecated use `ResponseBodyBoolean$outboundSchema` instead. */
|
|
2285
|
-
export const outboundSchema = ResponseBodyBoolean$outboundSchema;
|
|
2286
|
-
/** @deprecated use `ResponseBodyBoolean$Outbound` instead. */
|
|
2287
|
-
export type Outbound = ResponseBodyBoolean$Outbound;
|
|
2288
|
-
}
|
|
2289
|
-
|
|
2290
|
-
export function responseBodyBooleanToJSON(
|
|
2291
|
-
responseBodyBoolean: ResponseBodyBoolean,
|
|
2292
|
-
): string {
|
|
2293
|
-
return JSON.stringify(
|
|
2294
|
-
ResponseBodyBoolean$outboundSchema.parse(responseBodyBoolean),
|
|
2295
|
-
);
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
|
-
export function responseBodyBooleanFromJSON(
|
|
2299
|
-
jsonString: string,
|
|
2300
|
-
): SafeParseResult<ResponseBodyBoolean, SDKValidationError> {
|
|
2301
|
-
return safeParse(
|
|
2302
|
-
jsonString,
|
|
2303
|
-
(x) => ResponseBodyBoolean$inboundSchema.parse(JSON.parse(x)),
|
|
2304
|
-
`Failed to parse 'ResponseBodyBoolean' from JSON`,
|
|
2305
|
-
);
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
/** @internal */
|
|
2309
|
-
export const InvokeEvalResponseBodyEvalsType$inboundSchema: z.ZodNativeEnum<
|
|
2310
|
-
typeof InvokeEvalResponseBodyEvalsType
|
|
2311
|
-
> = z.nativeEnum(InvokeEvalResponseBodyEvalsType);
|
|
2312
|
-
|
|
2313
|
-
/** @internal */
|
|
2314
|
-
export const InvokeEvalResponseBodyEvalsType$outboundSchema: z.ZodNativeEnum<
|
|
2315
|
-
typeof InvokeEvalResponseBodyEvalsType
|
|
2316
|
-
> = InvokeEvalResponseBodyEvalsType$inboundSchema;
|
|
2317
|
-
|
|
2318
|
-
/**
|
|
2319
|
-
* @internal
|
|
2320
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2321
|
-
*/
|
|
2322
|
-
export namespace InvokeEvalResponseBodyEvalsType$ {
|
|
2323
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsType$inboundSchema` instead. */
|
|
2324
|
-
export const inboundSchema = InvokeEvalResponseBodyEvalsType$inboundSchema;
|
|
2325
|
-
/** @deprecated use `InvokeEvalResponseBodyEvalsType$outboundSchema` instead. */
|
|
2326
|
-
export const outboundSchema = InvokeEvalResponseBodyEvalsType$outboundSchema;
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
/** @internal */
|
|
2330
|
-
export const ResponseBodyNumber$inboundSchema: z.ZodType<
|
|
2331
|
-
ResponseBodyNumber,
|
|
2332
|
-
z.ZodTypeDef,
|
|
2333
|
-
unknown
|
|
2334
|
-
> = z.object({
|
|
2335
|
-
type: InvokeEvalResponseBodyEvalsType$inboundSchema,
|
|
2336
|
-
original_value: z.nullable(z.number()).optional(),
|
|
2337
|
-
value: z.nullable(z.number()),
|
|
2338
|
-
}).transform((v) => {
|
|
2339
|
-
return remap$(v, {
|
|
2340
|
-
"original_value": "originalValue",
|
|
2341
|
-
});
|
|
2342
|
-
});
|
|
2343
|
-
|
|
2344
|
-
/** @internal */
|
|
2345
|
-
export type ResponseBodyNumber$Outbound = {
|
|
2346
|
-
type: string;
|
|
2347
|
-
original_value?: number | null | undefined;
|
|
2348
|
-
value: number | null;
|
|
2349
|
-
};
|
|
2350
|
-
|
|
2351
|
-
/** @internal */
|
|
2352
|
-
export const ResponseBodyNumber$outboundSchema: z.ZodType<
|
|
2353
|
-
ResponseBodyNumber$Outbound,
|
|
2354
|
-
z.ZodTypeDef,
|
|
2355
|
-
ResponseBodyNumber
|
|
2356
|
-
> = z.object({
|
|
2357
|
-
type: InvokeEvalResponseBodyEvalsType$outboundSchema,
|
|
2358
|
-
originalValue: z.nullable(z.number()).optional(),
|
|
2359
|
-
value: z.nullable(z.number()),
|
|
2360
|
-
}).transform((v) => {
|
|
2361
|
-
return remap$(v, {
|
|
2362
|
-
originalValue: "original_value",
|
|
2363
|
-
});
|
|
2364
|
-
});
|
|
2365
|
-
|
|
2366
|
-
/**
|
|
2367
|
-
* @internal
|
|
2368
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2369
|
-
*/
|
|
2370
|
-
export namespace ResponseBodyNumber$ {
|
|
2371
|
-
/** @deprecated use `ResponseBodyNumber$inboundSchema` instead. */
|
|
2372
|
-
export const inboundSchema = ResponseBodyNumber$inboundSchema;
|
|
2373
|
-
/** @deprecated use `ResponseBodyNumber$outboundSchema` instead. */
|
|
2374
|
-
export const outboundSchema = ResponseBodyNumber$outboundSchema;
|
|
2375
|
-
/** @deprecated use `ResponseBodyNumber$Outbound` instead. */
|
|
2376
|
-
export type Outbound = ResponseBodyNumber$Outbound;
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
export function responseBodyNumberToJSON(
|
|
2380
|
-
responseBodyNumber: ResponseBodyNumber,
|
|
2381
|
-
): string {
|
|
2382
|
-
return JSON.stringify(
|
|
2383
|
-
ResponseBodyNumber$outboundSchema.parse(responseBodyNumber),
|
|
2384
|
-
);
|
|
2385
|
-
}
|
|
2386
|
-
|
|
2387
|
-
export function responseBodyNumberFromJSON(
|
|
2388
|
-
jsonString: string,
|
|
2389
|
-
): SafeParseResult<ResponseBodyNumber, SDKValidationError> {
|
|
2390
|
-
return safeParse(
|
|
2391
|
-
jsonString,
|
|
2392
|
-
(x) => ResponseBodyNumber$inboundSchema.parse(JSON.parse(x)),
|
|
2393
|
-
`Failed to parse 'ResponseBodyNumber' from JSON`,
|
|
2394
|
-
);
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
/** @internal */
|
|
2398
|
-
export const InvokeEvalResponseBodyType$inboundSchema: z.ZodNativeEnum<
|
|
2399
|
-
typeof InvokeEvalResponseBodyType
|
|
2400
|
-
> = z.nativeEnum(InvokeEvalResponseBodyType);
|
|
2401
|
-
|
|
2402
|
-
/** @internal */
|
|
2403
|
-
export const InvokeEvalResponseBodyType$outboundSchema: z.ZodNativeEnum<
|
|
2404
|
-
typeof InvokeEvalResponseBodyType
|
|
2405
|
-
> = InvokeEvalResponseBodyType$inboundSchema;
|
|
2406
|
-
|
|
2407
|
-
/**
|
|
2408
|
-
* @internal
|
|
2409
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2410
|
-
*/
|
|
2411
|
-
export namespace InvokeEvalResponseBodyType$ {
|
|
2412
|
-
/** @deprecated use `InvokeEvalResponseBodyType$inboundSchema` instead. */
|
|
2413
|
-
export const inboundSchema = InvokeEvalResponseBodyType$inboundSchema;
|
|
2414
|
-
/** @deprecated use `InvokeEvalResponseBodyType$outboundSchema` instead. */
|
|
2415
|
-
export const outboundSchema = InvokeEvalResponseBodyType$outboundSchema;
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
|
-
/** @internal */
|
|
2419
|
-
export const String$inboundSchema: z.ZodType<String, z.ZodTypeDef, unknown> = z
|
|
2420
|
-
.object({
|
|
2421
|
-
type: InvokeEvalResponseBodyType$inboundSchema,
|
|
2422
|
-
original_value: z.nullable(z.string()).optional(),
|
|
2423
|
-
value: z.nullable(z.string()).optional(),
|
|
2424
|
-
}).transform((v) => {
|
|
2425
|
-
return remap$(v, {
|
|
2426
|
-
"original_value": "originalValue",
|
|
2427
|
-
});
|
|
2428
|
-
});
|
|
2429
|
-
|
|
2430
|
-
/** @internal */
|
|
2431
|
-
export type String$Outbound = {
|
|
2432
|
-
type: string;
|
|
2433
|
-
original_value?: string | null | undefined;
|
|
2434
|
-
value?: string | null | undefined;
|
|
2435
|
-
};
|
|
2436
|
-
|
|
2437
|
-
/** @internal */
|
|
2438
|
-
export const String$outboundSchema: z.ZodType<
|
|
2439
|
-
String$Outbound,
|
|
2440
|
-
z.ZodTypeDef,
|
|
2441
|
-
String
|
|
2442
|
-
> = z.object({
|
|
2443
|
-
type: InvokeEvalResponseBodyType$outboundSchema,
|
|
2444
|
-
originalValue: z.nullable(z.string()).optional(),
|
|
2445
|
-
value: z.nullable(z.string()).optional(),
|
|
2446
|
-
}).transform((v) => {
|
|
2447
|
-
return remap$(v, {
|
|
2448
|
-
originalValue: "original_value",
|
|
2449
|
-
});
|
|
2450
|
-
});
|
|
2451
|
-
|
|
2452
|
-
/**
|
|
2453
|
-
* @internal
|
|
2454
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2455
|
-
*/
|
|
2456
|
-
export namespace String$ {
|
|
2457
|
-
/** @deprecated use `String$inboundSchema` instead. */
|
|
2458
|
-
export const inboundSchema = String$inboundSchema;
|
|
2459
|
-
/** @deprecated use `String$outboundSchema` instead. */
|
|
2460
|
-
export const outboundSchema = String$outboundSchema;
|
|
2461
|
-
/** @deprecated use `String$Outbound` instead. */
|
|
2462
|
-
export type Outbound = String$Outbound;
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
export function stringToJSON(string: String): string {
|
|
2466
|
-
return JSON.stringify(String$outboundSchema.parse(string));
|
|
2467
|
-
}
|
|
2468
|
-
|
|
2469
|
-
export function stringFromJSON(
|
|
2470
|
-
jsonString: string,
|
|
2471
|
-
): SafeParseResult<String, SDKValidationError> {
|
|
2472
|
-
return safeParse(
|
|
2473
|
-
jsonString,
|
|
2474
|
-
(x) => String$inboundSchema.parse(JSON.parse(x)),
|
|
2475
|
-
`Failed to parse 'String' from JSON`,
|
|
2476
|
-
);
|
|
2477
|
-
}
|
|
2478
|
-
|
|
2479
|
-
/** @internal */
|
|
2480
|
-
export const InvokeEvalResponseBody$inboundSchema: z.ZodType<
|
|
2481
|
-
InvokeEvalResponseBody,
|
|
2482
|
-
z.ZodTypeDef,
|
|
2483
|
-
unknown
|
|
2484
|
-
> = z.union([
|
|
2485
|
-
z.lazy(() => ResponseBodyNumber$inboundSchema),
|
|
2486
|
-
z.lazy(() => ResponseBodyBoolean$inboundSchema),
|
|
2487
|
-
z.lazy(() => StringArray$inboundSchema),
|
|
2488
|
-
z.lazy(() => RougeN$inboundSchema),
|
|
2489
|
-
z.lazy(() => BERTScore$inboundSchema),
|
|
2490
|
-
z.lazy(() => InvokeEvalResponseBodyLLM$inboundSchema),
|
|
2491
|
-
z.lazy(() => String$inboundSchema),
|
|
2492
|
-
z.lazy(() => InvokeEvalResponseBodyHTTP$inboundSchema),
|
|
2493
|
-
]);
|
|
2494
|
-
|
|
2495
|
-
/** @internal */
|
|
2496
|
-
export type InvokeEvalResponseBody$Outbound =
|
|
2497
|
-
| ResponseBodyNumber$Outbound
|
|
2498
|
-
| ResponseBodyBoolean$Outbound
|
|
2499
|
-
| StringArray$Outbound
|
|
2500
|
-
| RougeN$Outbound
|
|
2501
|
-
| BERTScore$Outbound
|
|
2502
|
-
| InvokeEvalResponseBodyLLM$Outbound
|
|
2503
|
-
| String$Outbound
|
|
2504
|
-
| InvokeEvalResponseBodyHTTP$Outbound;
|
|
2505
|
-
|
|
2506
|
-
/** @internal */
|
|
2507
|
-
export const InvokeEvalResponseBody$outboundSchema: z.ZodType<
|
|
2508
|
-
InvokeEvalResponseBody$Outbound,
|
|
2509
|
-
z.ZodTypeDef,
|
|
2510
|
-
InvokeEvalResponseBody
|
|
2511
|
-
> = z.union([
|
|
2512
|
-
z.lazy(() => ResponseBodyNumber$outboundSchema),
|
|
2513
|
-
z.lazy(() => ResponseBodyBoolean$outboundSchema),
|
|
2514
|
-
z.lazy(() => StringArray$outboundSchema),
|
|
2515
|
-
z.lazy(() => RougeN$outboundSchema),
|
|
2516
|
-
z.lazy(() => BERTScore$outboundSchema),
|
|
2517
|
-
z.lazy(() => InvokeEvalResponseBodyLLM$outboundSchema),
|
|
2518
|
-
z.lazy(() => String$outboundSchema),
|
|
2519
|
-
z.lazy(() => InvokeEvalResponseBodyHTTP$outboundSchema),
|
|
2520
|
-
]);
|
|
2521
|
-
|
|
2522
|
-
/**
|
|
2523
|
-
* @internal
|
|
2524
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2525
|
-
*/
|
|
2526
|
-
export namespace InvokeEvalResponseBody$ {
|
|
2527
|
-
/** @deprecated use `InvokeEvalResponseBody$inboundSchema` instead. */
|
|
2528
|
-
export const inboundSchema = InvokeEvalResponseBody$inboundSchema;
|
|
2529
|
-
/** @deprecated use `InvokeEvalResponseBody$outboundSchema` instead. */
|
|
2530
|
-
export const outboundSchema = InvokeEvalResponseBody$outboundSchema;
|
|
2531
|
-
/** @deprecated use `InvokeEvalResponseBody$Outbound` instead. */
|
|
2532
|
-
export type Outbound = InvokeEvalResponseBody$Outbound;
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
export function invokeEvalResponseBodyToJSON(
|
|
2536
|
-
invokeEvalResponseBody: InvokeEvalResponseBody,
|
|
2537
|
-
): string {
|
|
2538
|
-
return JSON.stringify(
|
|
2539
|
-
InvokeEvalResponseBody$outboundSchema.parse(invokeEvalResponseBody),
|
|
2540
|
-
);
|
|
2541
|
-
}
|
|
2542
|
-
|
|
2543
|
-
export function invokeEvalResponseBodyFromJSON(
|
|
2544
|
-
jsonString: string,
|
|
2545
|
-
): SafeParseResult<InvokeEvalResponseBody, SDKValidationError> {
|
|
2546
|
-
return safeParse(
|
|
2547
|
-
jsonString,
|
|
2548
|
-
(x) => InvokeEvalResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
2549
|
-
`Failed to parse 'InvokeEvalResponseBody' from JSON`,
|
|
2550
|
-
);
|
|
2551
|
-
}
|