@orq-ai/node 3.6.3 → 3.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +40 -40
- package/bin/mcp-server.js.map +21 -21
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/bulkcreatedatapoints.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/package.json +1 -1
- package/packages/orq-rc/README.md +73 -2
- package/packages/orq-rc/docs/sdks/datasets/README.md +0 -77
- package/packages/orq-rc/docs/sdks/evals/README.md +2661 -0
- package/packages/orq-rc/docs/sdks/knowledge/README.md +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/funcs/evalsAgeAppropriate.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsBleuScore.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsBotDetection.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContains.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsAll.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsAny.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsEmail.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsNone.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsUrl.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsValidLink.ts +173 -0
- package/packages/orq-rc/src/funcs/{datasetsCreateDatapoints.ts → evalsCreate.ts} +27 -29
- package/packages/orq-rc/src/funcs/evalsEndsWith.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsExactMatch.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsFactCheckingKnowledgeBase.ts +179 -0
- package/packages/orq-rc/src/funcs/evalsGrammar.ts +169 -0
- package/packages/orq-rc/src/funcs/evalsLengthBetween.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsLengthGreaterThan.ts +173 -0
- package/packages/orq-rc/src/funcs/evalsLengthLessThan.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsLocalization.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsPii.ts +169 -0
- package/packages/orq-rc/src/funcs/evalsRagasCoherence.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsRagasConciseness.ts +170 -0
- package/packages/orq-rc/src/funcs/evalsRagasContextPrecision.ts +176 -0
- package/packages/orq-rc/src/funcs/evalsRagasCorrectness.ts +170 -0
- package/packages/orq-rc/src/funcs/evalsRagasFaithfulness.ts +173 -0
- package/packages/orq-rc/src/funcs/evalsRagasHarmfulness.ts +170 -0
- package/packages/orq-rc/src/funcs/evalsRagasMaliciousness.ts +173 -0
- package/packages/orq-rc/src/funcs/evalsRagasResponseRelevancy.ts +179 -0
- package/packages/orq-rc/src/funcs/evalsRagasSummarization.ts +173 -0
- package/packages/orq-rc/src/funcs/evalsRunBertScore.ts +169 -0
- package/packages/orq-rc/src/funcs/evalsSentimentClassification.ts +179 -0
- package/packages/orq-rc/src/funcs/evalsSummarization.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsToneOfVoice.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsTranslation.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsValidJson.ts +171 -0
- package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +4 -4
- package/packages/orq-rc/src/index.ts +2 -0
- 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 +71 -3
- package/packages/orq-rc/src/mcp-server/tools/evalsAgeAppropriate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsBleuScore.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsBotDetection.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/{datasetsCreateDatapoints.ts → evalsContains.ts} +6 -8
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsAll.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsAny.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsEmail.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsNone.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsUrl.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsValidLink.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsCreate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsEndsWith.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsExactMatch.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsFactCheckingKnowledgeBase.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsGrammar.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthBetween.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthGreaterThan.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthLessThan.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsLocalization.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsPii.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasCoherence.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasConciseness.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextPrecision.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasCorrectness.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasFaithfulness.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasHarmfulness.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasMaliciousness.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasResponseRelevancy.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasSummarization.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRunBertScore.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsSentimentClassification.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsSummarization.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsToneOfVoice.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsTranslation.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsValidJson.ts +35 -0
- package/packages/orq-rc/src/models/errors/createeval.ts +71 -0
- package/packages/orq-rc/src/models/errors/evalsageappropriate.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalsbleuscore.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalsbotdetection.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalscontains.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalscontainsall.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalscontainsany.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalscontainsemail.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalscontainsnone.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalscontainsurl.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalscontainsvalidlink.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalsendswith.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalsexactmatch.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalsfactcheckingknowledgebase.ts +143 -0
- package/packages/orq-rc/src/models/errors/evalsgrammar.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalslengthbetween.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalslengthgreaterthan.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalslengthlessthan.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalslocalization.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalspii.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalsragascoherence.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalsragasconciseness.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalsragascontextprecision.ts +143 -0
- package/packages/orq-rc/src/models/errors/evalsragascorrectness.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalsragasfaithfulness.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalsragasharmfulness.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalsragasmaliciousness.ts +141 -0
- package/packages/orq-rc/src/models/errors/evalsragasresponserelevancy.ts +143 -0
- package/packages/orq-rc/src/models/errors/evalsragassummarization.ts +141 -0
- package/packages/orq-rc/src/models/errors/evalssentimentclassification.ts +143 -0
- package/packages/orq-rc/src/models/errors/evalssummarization.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalstoneofvoice.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalstranslation.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalsvalidjson.ts +137 -0
- package/packages/orq-rc/src/models/errors/index.ts +35 -0
- package/packages/orq-rc/src/models/errors/runbertscore.ts +137 -0
- package/packages/orq-rc/src/models/operations/createchunk.ts +20 -24
- 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 +4045 -972
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +3830 -0
- package/packages/orq-rc/src/models/operations/evalsageappropriate.ts +253 -0
- package/packages/orq-rc/src/models/operations/evalsbleuscore.ts +131 -0
- package/packages/orq-rc/src/models/operations/evalsbotdetection.ts +249 -0
- package/packages/orq-rc/src/models/operations/evalscontains.ts +250 -0
- package/packages/orq-rc/src/models/operations/evalscontainsall.ts +248 -0
- package/packages/orq-rc/src/models/operations/evalscontainsany.ts +254 -0
- package/packages/orq-rc/src/models/operations/evalscontainsemail.ts +181 -0
- package/packages/orq-rc/src/models/operations/evalscontainsnone.ts +254 -0
- package/packages/orq-rc/src/models/operations/evalscontainsurl.ts +181 -0
- package/packages/orq-rc/src/models/operations/evalscontainsvalidlink.ts +186 -0
- package/packages/orq-rc/src/models/operations/evalsendswith.ts +250 -0
- package/packages/orq-rc/src/models/operations/evalsexactmatch.ts +183 -0
- package/packages/orq-rc/src/models/operations/evalsfactcheckingknowledgebase.ts +299 -0
- package/packages/orq-rc/src/models/operations/evalsgrammar.ts +243 -0
- package/packages/orq-rc/src/models/operations/evalslengthbetween.ts +268 -0
- package/packages/orq-rc/src/models/operations/evalslengthgreaterthan.ts +266 -0
- package/packages/orq-rc/src/models/operations/evalslengthlessthan.ts +259 -0
- package/packages/orq-rc/src/models/operations/evalslocalization.ts +253 -0
- package/packages/orq-rc/src/models/operations/evalspii.ts +243 -0
- package/packages/orq-rc/src/models/operations/evalsragascoherence.ts +152 -0
- package/packages/orq-rc/src/models/operations/evalsragasconciseness.ts +153 -0
- package/packages/orq-rc/src/models/operations/evalsragascontextprecision.ts +166 -0
- package/packages/orq-rc/src/models/operations/evalsragascorrectness.ts +153 -0
- package/packages/orq-rc/src/models/operations/evalsragasfaithfulness.ts +155 -0
- package/packages/orq-rc/src/models/operations/evalsragasharmfulness.ts +146 -0
- package/packages/orq-rc/src/models/operations/evalsragasmaliciousness.ts +157 -0
- package/packages/orq-rc/src/models/operations/evalsragasresponserelevancy.ts +165 -0
- package/packages/orq-rc/src/models/operations/evalsragassummarization.ts +150 -0
- package/packages/orq-rc/src/models/operations/evalssentimentclassification.ts +285 -0
- package/packages/orq-rc/src/models/operations/evalssummarization.ts +253 -0
- package/packages/orq-rc/src/models/operations/evalstoneofvoice.ts +251 -0
- package/packages/orq-rc/src/models/operations/evalstranslation.ts +251 -0
- package/packages/orq-rc/src/models/operations/evalsvalidjson.ts +177 -0
- 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/index.ts +35 -1
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1805 -301
- 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/retrievedatapoint.ts +1737 -277
- 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/runbertscore.ts +197 -0
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +3990 -976
- 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/sdk/datasets.ts +0 -18
- package/packages/orq-rc/src/sdk/evals.ts +534 -0
- package/packages/orq-rc/src/sdk/knowledge.ts +1 -1
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/src/index.ts +2 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/bulkcreatedatapoints.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 +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- 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/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +0 -2232
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type EvalsGrammarRequestBody = {
|
|
11
|
+
input: string;
|
|
12
|
+
model: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type EvalsGrammarEvalsValue = number | boolean | string;
|
|
16
|
+
|
|
17
|
+
export type EvalsGrammarValue = {
|
|
18
|
+
value: number | boolean | string;
|
|
19
|
+
explanation?: string | null | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Returns the result of the evaluator run
|
|
24
|
+
*/
|
|
25
|
+
export type EvalsGrammarResponseBody = {
|
|
26
|
+
value: EvalsGrammarValue | null;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const EvalsGrammarRequestBody$inboundSchema: z.ZodType<
|
|
31
|
+
EvalsGrammarRequestBody,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
input: z.string(),
|
|
36
|
+
model: z.string(),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type EvalsGrammarRequestBody$Outbound = {
|
|
41
|
+
input: string;
|
|
42
|
+
model: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const EvalsGrammarRequestBody$outboundSchema: z.ZodType<
|
|
47
|
+
EvalsGrammarRequestBody$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
EvalsGrammarRequestBody
|
|
50
|
+
> = z.object({
|
|
51
|
+
input: z.string(),
|
|
52
|
+
model: z.string(),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
+
*/
|
|
59
|
+
export namespace EvalsGrammarRequestBody$ {
|
|
60
|
+
/** @deprecated use `EvalsGrammarRequestBody$inboundSchema` instead. */
|
|
61
|
+
export const inboundSchema = EvalsGrammarRequestBody$inboundSchema;
|
|
62
|
+
/** @deprecated use `EvalsGrammarRequestBody$outboundSchema` instead. */
|
|
63
|
+
export const outboundSchema = EvalsGrammarRequestBody$outboundSchema;
|
|
64
|
+
/** @deprecated use `EvalsGrammarRequestBody$Outbound` instead. */
|
|
65
|
+
export type Outbound = EvalsGrammarRequestBody$Outbound;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function evalsGrammarRequestBodyToJSON(
|
|
69
|
+
evalsGrammarRequestBody: EvalsGrammarRequestBody,
|
|
70
|
+
): string {
|
|
71
|
+
return JSON.stringify(
|
|
72
|
+
EvalsGrammarRequestBody$outboundSchema.parse(evalsGrammarRequestBody),
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function evalsGrammarRequestBodyFromJSON(
|
|
77
|
+
jsonString: string,
|
|
78
|
+
): SafeParseResult<EvalsGrammarRequestBody, SDKValidationError> {
|
|
79
|
+
return safeParse(
|
|
80
|
+
jsonString,
|
|
81
|
+
(x) => EvalsGrammarRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
82
|
+
`Failed to parse 'EvalsGrammarRequestBody' from JSON`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const EvalsGrammarEvalsValue$inboundSchema: z.ZodType<
|
|
88
|
+
EvalsGrammarEvalsValue,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
unknown
|
|
91
|
+
> = z.union([z.number(), z.boolean(), z.string()]);
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export type EvalsGrammarEvalsValue$Outbound = number | boolean | string;
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const EvalsGrammarEvalsValue$outboundSchema: z.ZodType<
|
|
98
|
+
EvalsGrammarEvalsValue$Outbound,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
EvalsGrammarEvalsValue
|
|
101
|
+
> = z.union([z.number(), z.boolean(), z.string()]);
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
106
|
+
*/
|
|
107
|
+
export namespace EvalsGrammarEvalsValue$ {
|
|
108
|
+
/** @deprecated use `EvalsGrammarEvalsValue$inboundSchema` instead. */
|
|
109
|
+
export const inboundSchema = EvalsGrammarEvalsValue$inboundSchema;
|
|
110
|
+
/** @deprecated use `EvalsGrammarEvalsValue$outboundSchema` instead. */
|
|
111
|
+
export const outboundSchema = EvalsGrammarEvalsValue$outboundSchema;
|
|
112
|
+
/** @deprecated use `EvalsGrammarEvalsValue$Outbound` instead. */
|
|
113
|
+
export type Outbound = EvalsGrammarEvalsValue$Outbound;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function evalsGrammarEvalsValueToJSON(
|
|
117
|
+
evalsGrammarEvalsValue: EvalsGrammarEvalsValue,
|
|
118
|
+
): string {
|
|
119
|
+
return JSON.stringify(
|
|
120
|
+
EvalsGrammarEvalsValue$outboundSchema.parse(evalsGrammarEvalsValue),
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function evalsGrammarEvalsValueFromJSON(
|
|
125
|
+
jsonString: string,
|
|
126
|
+
): SafeParseResult<EvalsGrammarEvalsValue, SDKValidationError> {
|
|
127
|
+
return safeParse(
|
|
128
|
+
jsonString,
|
|
129
|
+
(x) => EvalsGrammarEvalsValue$inboundSchema.parse(JSON.parse(x)),
|
|
130
|
+
`Failed to parse 'EvalsGrammarEvalsValue' from JSON`,
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** @internal */
|
|
135
|
+
export const EvalsGrammarValue$inboundSchema: z.ZodType<
|
|
136
|
+
EvalsGrammarValue,
|
|
137
|
+
z.ZodTypeDef,
|
|
138
|
+
unknown
|
|
139
|
+
> = z.object({
|
|
140
|
+
value: z.union([z.number(), z.boolean(), z.string()]),
|
|
141
|
+
explanation: z.nullable(z.string()).optional(),
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export type EvalsGrammarValue$Outbound = {
|
|
146
|
+
value: number | boolean | string;
|
|
147
|
+
explanation?: string | null | undefined;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
export const EvalsGrammarValue$outboundSchema: z.ZodType<
|
|
152
|
+
EvalsGrammarValue$Outbound,
|
|
153
|
+
z.ZodTypeDef,
|
|
154
|
+
EvalsGrammarValue
|
|
155
|
+
> = z.object({
|
|
156
|
+
value: z.union([z.number(), z.boolean(), z.string()]),
|
|
157
|
+
explanation: z.nullable(z.string()).optional(),
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @internal
|
|
162
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
163
|
+
*/
|
|
164
|
+
export namespace EvalsGrammarValue$ {
|
|
165
|
+
/** @deprecated use `EvalsGrammarValue$inboundSchema` instead. */
|
|
166
|
+
export const inboundSchema = EvalsGrammarValue$inboundSchema;
|
|
167
|
+
/** @deprecated use `EvalsGrammarValue$outboundSchema` instead. */
|
|
168
|
+
export const outboundSchema = EvalsGrammarValue$outboundSchema;
|
|
169
|
+
/** @deprecated use `EvalsGrammarValue$Outbound` instead. */
|
|
170
|
+
export type Outbound = EvalsGrammarValue$Outbound;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function evalsGrammarValueToJSON(
|
|
174
|
+
evalsGrammarValue: EvalsGrammarValue,
|
|
175
|
+
): string {
|
|
176
|
+
return JSON.stringify(
|
|
177
|
+
EvalsGrammarValue$outboundSchema.parse(evalsGrammarValue),
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export function evalsGrammarValueFromJSON(
|
|
182
|
+
jsonString: string,
|
|
183
|
+
): SafeParseResult<EvalsGrammarValue, SDKValidationError> {
|
|
184
|
+
return safeParse(
|
|
185
|
+
jsonString,
|
|
186
|
+
(x) => EvalsGrammarValue$inboundSchema.parse(JSON.parse(x)),
|
|
187
|
+
`Failed to parse 'EvalsGrammarValue' from JSON`,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export const EvalsGrammarResponseBody$inboundSchema: z.ZodType<
|
|
193
|
+
EvalsGrammarResponseBody,
|
|
194
|
+
z.ZodTypeDef,
|
|
195
|
+
unknown
|
|
196
|
+
> = z.object({
|
|
197
|
+
value: z.nullable(z.lazy(() => EvalsGrammarValue$inboundSchema)),
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
/** @internal */
|
|
201
|
+
export type EvalsGrammarResponseBody$Outbound = {
|
|
202
|
+
value: EvalsGrammarValue$Outbound | null;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/** @internal */
|
|
206
|
+
export const EvalsGrammarResponseBody$outboundSchema: z.ZodType<
|
|
207
|
+
EvalsGrammarResponseBody$Outbound,
|
|
208
|
+
z.ZodTypeDef,
|
|
209
|
+
EvalsGrammarResponseBody
|
|
210
|
+
> = z.object({
|
|
211
|
+
value: z.nullable(z.lazy(() => EvalsGrammarValue$outboundSchema)),
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @internal
|
|
216
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
217
|
+
*/
|
|
218
|
+
export namespace EvalsGrammarResponseBody$ {
|
|
219
|
+
/** @deprecated use `EvalsGrammarResponseBody$inboundSchema` instead. */
|
|
220
|
+
export const inboundSchema = EvalsGrammarResponseBody$inboundSchema;
|
|
221
|
+
/** @deprecated use `EvalsGrammarResponseBody$outboundSchema` instead. */
|
|
222
|
+
export const outboundSchema = EvalsGrammarResponseBody$outboundSchema;
|
|
223
|
+
/** @deprecated use `EvalsGrammarResponseBody$Outbound` instead. */
|
|
224
|
+
export type Outbound = EvalsGrammarResponseBody$Outbound;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export function evalsGrammarResponseBodyToJSON(
|
|
228
|
+
evalsGrammarResponseBody: EvalsGrammarResponseBody,
|
|
229
|
+
): string {
|
|
230
|
+
return JSON.stringify(
|
|
231
|
+
EvalsGrammarResponseBody$outboundSchema.parse(evalsGrammarResponseBody),
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export function evalsGrammarResponseBodyFromJSON(
|
|
236
|
+
jsonString: string,
|
|
237
|
+
): SafeParseResult<EvalsGrammarResponseBody, SDKValidationError> {
|
|
238
|
+
return safeParse(
|
|
239
|
+
jsonString,
|
|
240
|
+
(x) => EvalsGrammarResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
241
|
+
`Failed to parse 'EvalsGrammarResponseBody' from JSON`,
|
|
242
|
+
);
|
|
243
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type EvalsLengthBetweenFunctionParams = {
|
|
12
|
+
minLength: number;
|
|
13
|
+
maxLength: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type EvalsLengthBetweenRequestBody = {
|
|
17
|
+
output: string;
|
|
18
|
+
functionParams: EvalsLengthBetweenFunctionParams;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type EvalsLengthBetweenValue = boolean | string | number;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Returns the result of the evaluator run
|
|
25
|
+
*/
|
|
26
|
+
export type EvalsLengthBetweenResponseBody = {
|
|
27
|
+
value: boolean | string | number | null;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const EvalsLengthBetweenFunctionParams$inboundSchema: z.ZodType<
|
|
32
|
+
EvalsLengthBetweenFunctionParams,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
min_length: z.number(),
|
|
37
|
+
max_length: z.number(),
|
|
38
|
+
}).transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"min_length": "minLength",
|
|
41
|
+
"max_length": "maxLength",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type EvalsLengthBetweenFunctionParams$Outbound = {
|
|
47
|
+
min_length: number;
|
|
48
|
+
max_length: number;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const EvalsLengthBetweenFunctionParams$outboundSchema: z.ZodType<
|
|
53
|
+
EvalsLengthBetweenFunctionParams$Outbound,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
EvalsLengthBetweenFunctionParams
|
|
56
|
+
> = z.object({
|
|
57
|
+
minLength: z.number(),
|
|
58
|
+
maxLength: z.number(),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
minLength: "min_length",
|
|
62
|
+
maxLength: "max_length",
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
69
|
+
*/
|
|
70
|
+
export namespace EvalsLengthBetweenFunctionParams$ {
|
|
71
|
+
/** @deprecated use `EvalsLengthBetweenFunctionParams$inboundSchema` instead. */
|
|
72
|
+
export const inboundSchema = EvalsLengthBetweenFunctionParams$inboundSchema;
|
|
73
|
+
/** @deprecated use `EvalsLengthBetweenFunctionParams$outboundSchema` instead. */
|
|
74
|
+
export const outboundSchema = EvalsLengthBetweenFunctionParams$outboundSchema;
|
|
75
|
+
/** @deprecated use `EvalsLengthBetweenFunctionParams$Outbound` instead. */
|
|
76
|
+
export type Outbound = EvalsLengthBetweenFunctionParams$Outbound;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function evalsLengthBetweenFunctionParamsToJSON(
|
|
80
|
+
evalsLengthBetweenFunctionParams: EvalsLengthBetweenFunctionParams,
|
|
81
|
+
): string {
|
|
82
|
+
return JSON.stringify(
|
|
83
|
+
EvalsLengthBetweenFunctionParams$outboundSchema.parse(
|
|
84
|
+
evalsLengthBetweenFunctionParams,
|
|
85
|
+
),
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function evalsLengthBetweenFunctionParamsFromJSON(
|
|
90
|
+
jsonString: string,
|
|
91
|
+
): SafeParseResult<EvalsLengthBetweenFunctionParams, SDKValidationError> {
|
|
92
|
+
return safeParse(
|
|
93
|
+
jsonString,
|
|
94
|
+
(x) => EvalsLengthBetweenFunctionParams$inboundSchema.parse(JSON.parse(x)),
|
|
95
|
+
`Failed to parse 'EvalsLengthBetweenFunctionParams' from JSON`,
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const EvalsLengthBetweenRequestBody$inboundSchema: z.ZodType<
|
|
101
|
+
EvalsLengthBetweenRequestBody,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
unknown
|
|
104
|
+
> = z.object({
|
|
105
|
+
output: z.string(),
|
|
106
|
+
function_params: z.lazy(() => EvalsLengthBetweenFunctionParams$inboundSchema),
|
|
107
|
+
}).transform((v) => {
|
|
108
|
+
return remap$(v, {
|
|
109
|
+
"function_params": "functionParams",
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export type EvalsLengthBetweenRequestBody$Outbound = {
|
|
115
|
+
output: string;
|
|
116
|
+
function_params: EvalsLengthBetweenFunctionParams$Outbound;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const EvalsLengthBetweenRequestBody$outboundSchema: z.ZodType<
|
|
121
|
+
EvalsLengthBetweenRequestBody$Outbound,
|
|
122
|
+
z.ZodTypeDef,
|
|
123
|
+
EvalsLengthBetweenRequestBody
|
|
124
|
+
> = z.object({
|
|
125
|
+
output: z.string(),
|
|
126
|
+
functionParams: z.lazy(() => EvalsLengthBetweenFunctionParams$outboundSchema),
|
|
127
|
+
}).transform((v) => {
|
|
128
|
+
return remap$(v, {
|
|
129
|
+
functionParams: "function_params",
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @internal
|
|
135
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
136
|
+
*/
|
|
137
|
+
export namespace EvalsLengthBetweenRequestBody$ {
|
|
138
|
+
/** @deprecated use `EvalsLengthBetweenRequestBody$inboundSchema` instead. */
|
|
139
|
+
export const inboundSchema = EvalsLengthBetweenRequestBody$inboundSchema;
|
|
140
|
+
/** @deprecated use `EvalsLengthBetweenRequestBody$outboundSchema` instead. */
|
|
141
|
+
export const outboundSchema = EvalsLengthBetweenRequestBody$outboundSchema;
|
|
142
|
+
/** @deprecated use `EvalsLengthBetweenRequestBody$Outbound` instead. */
|
|
143
|
+
export type Outbound = EvalsLengthBetweenRequestBody$Outbound;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function evalsLengthBetweenRequestBodyToJSON(
|
|
147
|
+
evalsLengthBetweenRequestBody: EvalsLengthBetweenRequestBody,
|
|
148
|
+
): string {
|
|
149
|
+
return JSON.stringify(
|
|
150
|
+
EvalsLengthBetweenRequestBody$outboundSchema.parse(
|
|
151
|
+
evalsLengthBetweenRequestBody,
|
|
152
|
+
),
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function evalsLengthBetweenRequestBodyFromJSON(
|
|
157
|
+
jsonString: string,
|
|
158
|
+
): SafeParseResult<EvalsLengthBetweenRequestBody, SDKValidationError> {
|
|
159
|
+
return safeParse(
|
|
160
|
+
jsonString,
|
|
161
|
+
(x) => EvalsLengthBetweenRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
162
|
+
`Failed to parse 'EvalsLengthBetweenRequestBody' from JSON`,
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const EvalsLengthBetweenValue$inboundSchema: z.ZodType<
|
|
168
|
+
EvalsLengthBetweenValue,
|
|
169
|
+
z.ZodTypeDef,
|
|
170
|
+
unknown
|
|
171
|
+
> = z.union([z.boolean(), z.string(), z.number()]);
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export type EvalsLengthBetweenValue$Outbound = boolean | string | number;
|
|
175
|
+
|
|
176
|
+
/** @internal */
|
|
177
|
+
export const EvalsLengthBetweenValue$outboundSchema: z.ZodType<
|
|
178
|
+
EvalsLengthBetweenValue$Outbound,
|
|
179
|
+
z.ZodTypeDef,
|
|
180
|
+
EvalsLengthBetweenValue
|
|
181
|
+
> = z.union([z.boolean(), z.string(), z.number()]);
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @internal
|
|
185
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
186
|
+
*/
|
|
187
|
+
export namespace EvalsLengthBetweenValue$ {
|
|
188
|
+
/** @deprecated use `EvalsLengthBetweenValue$inboundSchema` instead. */
|
|
189
|
+
export const inboundSchema = EvalsLengthBetweenValue$inboundSchema;
|
|
190
|
+
/** @deprecated use `EvalsLengthBetweenValue$outboundSchema` instead. */
|
|
191
|
+
export const outboundSchema = EvalsLengthBetweenValue$outboundSchema;
|
|
192
|
+
/** @deprecated use `EvalsLengthBetweenValue$Outbound` instead. */
|
|
193
|
+
export type Outbound = EvalsLengthBetweenValue$Outbound;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function evalsLengthBetweenValueToJSON(
|
|
197
|
+
evalsLengthBetweenValue: EvalsLengthBetweenValue,
|
|
198
|
+
): string {
|
|
199
|
+
return JSON.stringify(
|
|
200
|
+
EvalsLengthBetweenValue$outboundSchema.parse(evalsLengthBetweenValue),
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export function evalsLengthBetweenValueFromJSON(
|
|
205
|
+
jsonString: string,
|
|
206
|
+
): SafeParseResult<EvalsLengthBetweenValue, SDKValidationError> {
|
|
207
|
+
return safeParse(
|
|
208
|
+
jsonString,
|
|
209
|
+
(x) => EvalsLengthBetweenValue$inboundSchema.parse(JSON.parse(x)),
|
|
210
|
+
`Failed to parse 'EvalsLengthBetweenValue' from JSON`,
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** @internal */
|
|
215
|
+
export const EvalsLengthBetweenResponseBody$inboundSchema: z.ZodType<
|
|
216
|
+
EvalsLengthBetweenResponseBody,
|
|
217
|
+
z.ZodTypeDef,
|
|
218
|
+
unknown
|
|
219
|
+
> = z.object({
|
|
220
|
+
value: z.nullable(z.union([z.boolean(), z.string(), z.number()])),
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
/** @internal */
|
|
224
|
+
export type EvalsLengthBetweenResponseBody$Outbound = {
|
|
225
|
+
value: boolean | string | number | null;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/** @internal */
|
|
229
|
+
export const EvalsLengthBetweenResponseBody$outboundSchema: z.ZodType<
|
|
230
|
+
EvalsLengthBetweenResponseBody$Outbound,
|
|
231
|
+
z.ZodTypeDef,
|
|
232
|
+
EvalsLengthBetweenResponseBody
|
|
233
|
+
> = z.object({
|
|
234
|
+
value: z.nullable(z.union([z.boolean(), z.string(), z.number()])),
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @internal
|
|
239
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
240
|
+
*/
|
|
241
|
+
export namespace EvalsLengthBetweenResponseBody$ {
|
|
242
|
+
/** @deprecated use `EvalsLengthBetweenResponseBody$inboundSchema` instead. */
|
|
243
|
+
export const inboundSchema = EvalsLengthBetweenResponseBody$inboundSchema;
|
|
244
|
+
/** @deprecated use `EvalsLengthBetweenResponseBody$outboundSchema` instead. */
|
|
245
|
+
export const outboundSchema = EvalsLengthBetweenResponseBody$outboundSchema;
|
|
246
|
+
/** @deprecated use `EvalsLengthBetweenResponseBody$Outbound` instead. */
|
|
247
|
+
export type Outbound = EvalsLengthBetweenResponseBody$Outbound;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export function evalsLengthBetweenResponseBodyToJSON(
|
|
251
|
+
evalsLengthBetweenResponseBody: EvalsLengthBetweenResponseBody,
|
|
252
|
+
): string {
|
|
253
|
+
return JSON.stringify(
|
|
254
|
+
EvalsLengthBetweenResponseBody$outboundSchema.parse(
|
|
255
|
+
evalsLengthBetweenResponseBody,
|
|
256
|
+
),
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export function evalsLengthBetweenResponseBodyFromJSON(
|
|
261
|
+
jsonString: string,
|
|
262
|
+
): SafeParseResult<EvalsLengthBetweenResponseBody, SDKValidationError> {
|
|
263
|
+
return safeParse(
|
|
264
|
+
jsonString,
|
|
265
|
+
(x) => EvalsLengthBetweenResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
266
|
+
`Failed to parse 'EvalsLengthBetweenResponseBody' from JSON`,
|
|
267
|
+
);
|
|
268
|
+
}
|