@tstdl/base 0.93.125 → 0.93.126
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/ai/genkit/tests/multi-region.test.js +6 -6
- package/ai/index.d.ts +2 -6
- package/ai/index.js +2 -6
- package/ai/parser/index.d.ts +1 -0
- package/ai/parser/index.js +1 -0
- package/ai/parser/parser.d.ts +12 -0
- package/ai/parser/parser.js +28 -0
- package/ai/prompts/build.d.ts +21 -0
- package/ai/prompts/build.js +25 -0
- package/ai/prompts/index.d.ts +2 -0
- package/ai/prompts/index.js +2 -0
- package/ai/prompts/instructions-formatter.d.ts +9 -22
- package/ai/prompts/instructions-formatter.js +20 -7
- package/ai/prompts/instructions.js +1 -1
- package/ai/prompts/steering.d.ts +27 -0
- package/ai/prompts/steering.js +54 -0
- package/ai/tests/instructions-formatter.test.js +115 -0
- package/ai/tests/steering.test.js +37 -0
- package/application/application.d.ts +2 -1
- package/application/application.js +3 -0
- package/authentication/client/module.d.ts +1 -1
- package/authentication/client/module.js +4 -5
- package/authentication/tests/authentication-ancillary.service.test.js +1 -1
- package/authentication/tests/authentication.api-controller.test.js +3 -1
- package/authentication/tests/authentication.api-request-token.provider.test.js +1 -1
- package/authentication/tests/authentication.client-service.test.js +1 -1
- package/authentication/tests/authentication.service.test.js +1 -1
- package/authentication/tests/subject.service.test.js +1 -1
- package/circuit-breaker/tests/circuit-breaker.test.js +1 -1
- package/document-management/api/document-management.api.d.ts +16 -16
- package/document-management/api/document-management.api.js +12 -12
- package/document-management/models/ai-configuration.d.ts +59 -0
- package/document-management/models/ai-configuration.js +1 -0
- package/document-management/models/document-assignment-scope.model.js +2 -4
- package/document-management/models/document-assignment-task.model.js +2 -4
- package/document-management/models/document-collection-assignment.model.js +2 -4
- package/document-management/models/document-collection.model.js +2 -3
- package/document-management/models/document-content.model.d.ts +6 -0
- package/document-management/models/document-content.model.js +32 -0
- package/document-management/models/document-property-value.model.js +1 -2
- package/document-management/models/document-request-collection-assignment.model.js +2 -4
- package/document-management/models/document-request.model.js +2 -4
- package/document-management/models/document-tag-assignment.model.js +2 -3
- package/document-management/models/document-validation-execution-related-document.model.js +2 -4
- package/document-management/models/document-validation-execution.model.js +2 -5
- package/document-management/models/document-workflow.model.d.ts +2 -1
- package/document-management/models/document-workflow.model.js +4 -5
- package/document-management/models/document.model.js +2 -3
- package/document-management/models/index.d.ts +2 -0
- package/document-management/models/index.js +2 -0
- package/document-management/server/api/document-management.api.d.ts +7 -7
- package/document-management/server/api/document-management.api.js +9 -9
- package/document-management/server/configure.d.ts +4 -1
- package/document-management/server/configure.js +9 -4
- package/document-management/server/drizzle/{0000_complex_black_bird.sql → 0000_curious_nighthawk.sql} +7 -27
- package/document-management/server/drizzle/meta/0000_snapshot.json +12 -284
- package/document-management/server/drizzle/meta/_journal.json +2 -2
- package/document-management/server/module.d.ts +2 -0
- package/document-management/server/module.js +1 -0
- package/document-management/server/schemas.d.ts +2 -1
- package/document-management/server/services/document-file.service.d.ts +6 -6
- package/document-management/server/services/document-file.service.js +7 -81
- package/document-management/server/services/document-management-ai-provider.service.d.ts +66 -0
- package/document-management/server/services/document-management-ai-provider.service.js +2 -0
- package/document-management/server/services/document-management-ai.service.d.ts +44 -7
- package/document-management/server/services/document-management-ai.service.js +332 -329
- package/document-management/server/services/document-validation.service.d.ts +1 -1
- package/document-management/server/services/document-workflow.service.d.ts +4 -3
- package/document-management/server/services/document-workflow.service.js +26 -9
- package/document-management/server/services/document.service.d.ts +7 -3
- package/document-management/server/services/document.service.js +13 -4
- package/document-management/server/services/index.d.ts +1 -0
- package/document-management/server/services/index.js +1 -0
- package/document-management/server/validators/ai-validation-executor.d.ts +419 -12
- package/document-management/server/validators/ai-validation-executor.js +51 -46
- package/document-management/server/validators/single-document-validation-executor.d.ts +1 -3
- package/document-management/server/validators/single-document-validation-executor.js +2 -4
- package/document-management/service-models/document.service-model.d.ts +3 -3
- package/document-management/service-models/document.service-model.js +1 -1
- package/document-management/tests/ai-config-hierarchy.test.d.ts +1 -0
- package/document-management/tests/ai-config-hierarchy.test.js +64 -0
- package/document-management/tests/ai-config-integration.test.d.ts +1 -0
- package/document-management/tests/ai-config-integration.test.js +125 -0
- package/document-management/tests/ai-config-merge.test.d.ts +1 -0
- package/document-management/tests/ai-config-merge.test.js +38 -0
- package/document-management/tests/document-management-ai-overrides.test.d.ts +1 -0
- package/document-management/tests/document-management-ai-overrides.test.js +64 -0
- package/document-management/tests/document-management-core.test.js +6 -6
- package/document-management/tests/document-management.api.test.js +5 -5
- package/document-management/tests/document-statistics.service.test.js +10 -6
- package/document-management/tests/document-validation-ai-overrides.test.d.ts +1 -0
- package/document-management/tests/document-validation-ai-overrides.test.js +85 -0
- package/document-management/tests/document.service.test.js +15 -11
- package/document-management/tests/enum-helpers.test.js +5 -5
- package/examples/document-management/ai-provider.d.ts +20 -0
- package/examples/document-management/ai-provider.js +74 -0
- package/examples/document-management/main.js +9 -6
- package/examples/injector/graph-example.d.ts +1 -0
- package/examples/injector/graph-example.js +340 -0
- package/injector/decorators.d.ts +4 -4
- package/injector/decorators.js +5 -6
- package/injector/forward-ref.d.ts +15 -0
- package/injector/forward-ref.js +20 -0
- package/injector/graph.d.ts +113 -0
- package/injector/graph.js +631 -0
- package/injector/index.d.ts +2 -0
- package/injector/index.js +2 -0
- package/injector/inject.d.ts +15 -15
- package/injector/injector.d.ts +101 -13
- package/injector/injector.js +103 -59
- package/injector/resolve-chain.d.ts +20 -6
- package/injector/resolve-chain.js +39 -14
- package/injector/tests/advanced.test.d.ts +1 -0
- package/injector/tests/advanced.test.js +116 -0
- package/injector/tests/async-init.test.d.ts +1 -0
- package/injector/tests/async-init.test.js +77 -0
- package/injector/tests/basic.test.d.ts +1 -0
- package/injector/tests/basic.test.js +114 -0
- package/injector/tests/hierarchical.test.d.ts +1 -0
- package/injector/tests/hierarchical.test.js +59 -0
- package/injector/tests/lifecycles.test.d.ts +1 -0
- package/injector/tests/lifecycles.test.js +109 -0
- package/injector/token.d.ts +2 -1
- package/injector/token.js +4 -1
- package/injector/type-info.d.ts +1 -5
- package/injector/types.d.ts +4 -10
- package/logger/tests/pretty-print.test.d.ts +1 -0
- package/logger/{formatters → tests}/pretty-print.test.js +1 -1
- package/logger/transports/console.d.ts +3 -2
- package/logger/transports/console.js +4 -3
- package/notification/tests/notification-api.test.js +8 -5
- package/notification/tests/notification-client.test.d.ts +1 -0
- package/notification/tests/{unit/notification-client.test.js → notification-client.test.js} +5 -5
- package/notification/tests/notification-flow.test.js +6 -5
- package/notification/tests/notification-sse.service.test.js +1 -1
- package/notification/tests/notification-type.service.test.js +1 -1
- package/object-storage/s3/s3.object-storage.js +3 -0
- package/object-storage/s3/tests/s3.object-storage.integration.test.js +1 -1
- package/orm/tests/repository-attributes.test.js +10 -17
- package/orm/tests/repository-cti-mapping.test.js +2 -2
- package/orm/tests/repository-cti-soft-delete.test.js +1 -1
- package/orm/tests/repository-cti.test.js +19 -33
- package/orm/tests/repository-extra-coverage.test.js +1 -1
- package/orm/tests/repository-search.test.js +5 -2
- package/orm/tests/transaction-safety.test.js +1 -1
- package/package.json +7 -9
- package/rate-limit/tests/postgres-rate-limiter.test.js +6 -16
- package/renderer/d2.d.ts +77 -0
- package/renderer/d2.js +68 -0
- package/renderer/graphviz.d.ts +47 -0
- package/renderer/graphviz.js +58 -0
- package/renderer/index.d.ts +4 -0
- package/renderer/index.js +4 -0
- package/renderer/typst.d.ts +57 -0
- package/renderer/typst.js +62 -0
- package/rpc/adapters/readable-stream.adapter.d.ts +3 -0
- package/rpc/adapters/readable-stream.adapter.js +5 -1
- package/rpc/rpc.js +28 -3
- package/rpc/tests/rpc.integration.test.js +3 -1
- package/schema/schemas/nullable.js +1 -1
- package/task-queue/task-queue.d.ts +2 -0
- package/task-queue/task-queue.js +6 -2
- package/task-queue/tests/complex.test.js +1 -1
- package/task-queue/tests/dependencies.test.js +3 -3
- package/task-queue/tests/extensive-dependencies.test.js +1 -1
- package/task-queue/tests/queue.test.js +1 -1
- package/task-queue/tests/worker.test.js +4 -7
- package/test5.js +52 -8
- package/{unit-test → testing}/integration-setup.d.ts +1 -0
- package/{unit-test → testing}/integration-setup.js +13 -0
- package/utils/base64.d.ts +7 -0
- package/utils/base64.js +10 -1
- package/utils/noop.d.ts +7 -1
- package/utils/noop.js +7 -1
- package/ai/ai-file.service.d.ts +0 -57
- package/ai/ai-file.service.js +0 -233
- package/ai/ai-session.d.ts +0 -38
- package/ai/ai-session.js +0 -50
- package/ai/ai.service.d.ts +0 -126
- package/ai/ai.service.js +0 -481
- package/ai/functions.d.ts +0 -9
- package/ai/functions.js +0 -38
- package/ai/module.d.ts +0 -26
- package/ai/module.js +0 -25
- package/ai/types.d.ts +0 -229
- package/ai/types.js +0 -33
- package/latex/index.d.ts +0 -1
- package/latex/index.js +0 -1
- package/typst/index.d.ts +0 -1
- package/typst/index.js +0 -1
- package/typst/render.d.ts +0 -23
- package/typst/render.js +0 -32
- /package/{logger/formatters/pretty-print.test.d.ts → ai/tests/instructions-formatter.test.d.ts} +0 -0
- /package/{notification/tests/unit/notification-client.test.d.ts → ai/tests/steering.test.d.ts} +0 -0
- /package/{latex/render.d.ts → renderer/latex.d.ts} +0 -0
- /package/{latex/render.js → renderer/latex.js} +0 -0
- /package/{unit-test → testing}/index.d.ts +0 -0
- /package/{unit-test → testing}/index.js +0 -0
|
@@ -1,19 +1,426 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type EnumType } from '../../../enumeration/enumeration.js';
|
|
1
|
+
import { type Instructions } from '../../../ai/prompts/index.js';
|
|
3
2
|
import type { SchemaTestable } from '../../../schema/schema.js';
|
|
3
|
+
import type { AiConfiguration } from '../../models/index.js';
|
|
4
|
+
import { DocumentManagementAiProviderService } from '../services/document-management-ai-provider.service.js';
|
|
4
5
|
import { DocumentValidationExecutor, type DocumentValidationExecutorContext, type DocumentValidationExecutorResult } from './validator.js';
|
|
5
|
-
export declare const AiValidationDifficulty: {
|
|
6
|
-
readonly Easy: "easy";
|
|
7
|
-
readonly Medium: "medium";
|
|
8
|
-
readonly Hard: "hard";
|
|
9
|
-
};
|
|
10
|
-
export type AiValidationDifficulty = EnumType<typeof AiValidationDifficulty>;
|
|
11
6
|
export declare abstract class AiValidationExecutor<R> extends DocumentValidationExecutor {
|
|
12
|
-
protected readonly
|
|
7
|
+
protected readonly genkit: import("genkit").Genkit;
|
|
8
|
+
protected readonly baseModel: import("genkit").ModelReference<import("zod").ZodObject<{
|
|
9
|
+
version: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10
|
+
maxOutputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
11
|
+
topK: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
12
|
+
stopSequences: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
13
|
+
} & {
|
|
14
|
+
apiKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
15
|
+
labels: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
16
|
+
temperature: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
17
|
+
topP: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
18
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
safetySettings: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
20
|
+
category: import("zod").ZodEnum<["HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", "HARM_CATEGORY_SEXUALLY_EXPLICIT"]>;
|
|
21
|
+
threshold: import("zod").ZodEnum<["BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE"]>;
|
|
22
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
23
|
+
category: import("zod").ZodEnum<["HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", "HARM_CATEGORY_SEXUALLY_EXPLICIT"]>;
|
|
24
|
+
threshold: import("zod").ZodEnum<["BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE"]>;
|
|
25
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
26
|
+
category: import("zod").ZodEnum<["HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", "HARM_CATEGORY_SEXUALLY_EXPLICIT"]>;
|
|
27
|
+
threshold: import("zod").ZodEnum<["BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE"]>;
|
|
28
|
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
29
|
+
vertexRetrieval: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
30
|
+
datastore: import("zod").ZodObject<{
|
|
31
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
32
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
33
|
+
dataStoreId: import("zod").ZodString;
|
|
34
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
35
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
37
|
+
dataStoreId: import("zod").ZodString;
|
|
38
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
39
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
40
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
41
|
+
dataStoreId: import("zod").ZodString;
|
|
42
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
43
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
44
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
45
|
+
datastore: import("zod").ZodObject<{
|
|
46
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
47
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
48
|
+
dataStoreId: import("zod").ZodString;
|
|
49
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
50
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
|
+
dataStoreId: import("zod").ZodString;
|
|
53
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
54
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
56
|
+
dataStoreId: import("zod").ZodString;
|
|
57
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
58
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
59
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
60
|
+
datastore: import("zod").ZodObject<{
|
|
61
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
|
+
dataStoreId: import("zod").ZodString;
|
|
64
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
65
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
66
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
67
|
+
dataStoreId: import("zod").ZodString;
|
|
68
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
69
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
70
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
+
dataStoreId: import("zod").ZodString;
|
|
72
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
73
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
74
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
75
|
+
googleSearchRetrieval: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
76
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
77
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
78
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
79
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
80
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
81
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
82
|
+
functionCallingConfig: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
83
|
+
mode: import("zod").ZodOptional<import("zod").ZodEnum<["MODE_UNSPECIFIED", "AUTO", "ANY", "NONE"]>>;
|
|
84
|
+
allowedFunctionNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
85
|
+
streamFunctionCallArguments: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
86
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
87
|
+
mode: import("zod").ZodOptional<import("zod").ZodEnum<["MODE_UNSPECIFIED", "AUTO", "ANY", "NONE"]>>;
|
|
88
|
+
allowedFunctionNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
89
|
+
streamFunctionCallArguments: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
90
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
91
|
+
mode: import("zod").ZodOptional<import("zod").ZodEnum<["MODE_UNSPECIFIED", "AUTO", "ANY", "NONE"]>>;
|
|
92
|
+
allowedFunctionNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
93
|
+
streamFunctionCallArguments: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
94
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
95
|
+
retrievalConfig: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
96
|
+
latLng: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
97
|
+
latitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
98
|
+
longitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
99
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
100
|
+
latitude?: number | undefined;
|
|
101
|
+
longitude?: number | undefined;
|
|
102
|
+
}, {
|
|
103
|
+
latitude?: number | undefined;
|
|
104
|
+
longitude?: number | undefined;
|
|
105
|
+
}>>;
|
|
106
|
+
languageCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
107
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
108
|
+
latLng: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
109
|
+
latitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
110
|
+
longitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
111
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
112
|
+
latitude?: number | undefined;
|
|
113
|
+
longitude?: number | undefined;
|
|
114
|
+
}, {
|
|
115
|
+
latitude?: number | undefined;
|
|
116
|
+
longitude?: number | undefined;
|
|
117
|
+
}>>;
|
|
118
|
+
languageCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
119
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
120
|
+
latLng: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
121
|
+
latitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
122
|
+
longitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
123
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
124
|
+
latitude?: number | undefined;
|
|
125
|
+
longitude?: number | undefined;
|
|
126
|
+
}, {
|
|
127
|
+
latitude?: number | undefined;
|
|
128
|
+
longitude?: number | undefined;
|
|
129
|
+
}>>;
|
|
130
|
+
languageCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
131
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
132
|
+
thinkingConfig: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
133
|
+
includeThoughts: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
134
|
+
thinkingBudget: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
135
|
+
thinkingLevel: import("zod").ZodOptional<import("zod").ZodEnum<["MINIMAL", "LOW", "MEDIUM", "HIGH"]>>;
|
|
136
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
137
|
+
includeThoughts: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
138
|
+
thinkingBudget: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
139
|
+
thinkingLevel: import("zod").ZodOptional<import("zod").ZodEnum<["MINIMAL", "LOW", "MEDIUM", "HIGH"]>>;
|
|
140
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
141
|
+
includeThoughts: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
142
|
+
thinkingBudget: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
143
|
+
thinkingLevel: import("zod").ZodOptional<import("zod").ZodEnum<["MINIMAL", "LOW", "MEDIUM", "HIGH"]>>;
|
|
144
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
145
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
146
|
+
version: import("zod").ZodOptional<import("zod").ZodString>;
|
|
147
|
+
maxOutputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
148
|
+
topK: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
149
|
+
stopSequences: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
150
|
+
} & {
|
|
151
|
+
apiKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
152
|
+
labels: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
153
|
+
temperature: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
154
|
+
topP: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
155
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
156
|
+
safetySettings: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
157
|
+
category: import("zod").ZodEnum<["HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", "HARM_CATEGORY_SEXUALLY_EXPLICIT"]>;
|
|
158
|
+
threshold: import("zod").ZodEnum<["BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE"]>;
|
|
159
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
160
|
+
category: import("zod").ZodEnum<["HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", "HARM_CATEGORY_SEXUALLY_EXPLICIT"]>;
|
|
161
|
+
threshold: import("zod").ZodEnum<["BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE"]>;
|
|
162
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
163
|
+
category: import("zod").ZodEnum<["HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", "HARM_CATEGORY_SEXUALLY_EXPLICIT"]>;
|
|
164
|
+
threshold: import("zod").ZodEnum<["BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE"]>;
|
|
165
|
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
166
|
+
vertexRetrieval: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
167
|
+
datastore: import("zod").ZodObject<{
|
|
168
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
169
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
170
|
+
dataStoreId: import("zod").ZodString;
|
|
171
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
172
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
173
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
174
|
+
dataStoreId: import("zod").ZodString;
|
|
175
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
176
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
177
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
178
|
+
dataStoreId: import("zod").ZodString;
|
|
179
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
180
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
181
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
182
|
+
datastore: import("zod").ZodObject<{
|
|
183
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
184
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
185
|
+
dataStoreId: import("zod").ZodString;
|
|
186
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
187
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
188
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
189
|
+
dataStoreId: import("zod").ZodString;
|
|
190
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
191
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
192
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
193
|
+
dataStoreId: import("zod").ZodString;
|
|
194
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
195
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
196
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
197
|
+
datastore: import("zod").ZodObject<{
|
|
198
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
199
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
200
|
+
dataStoreId: import("zod").ZodString;
|
|
201
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
202
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
203
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
204
|
+
dataStoreId: import("zod").ZodString;
|
|
205
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
206
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
207
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
208
|
+
dataStoreId: import("zod").ZodString;
|
|
209
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
210
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
211
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
212
|
+
googleSearchRetrieval: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
213
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
214
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
215
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
216
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
217
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
218
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
219
|
+
functionCallingConfig: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
220
|
+
mode: import("zod").ZodOptional<import("zod").ZodEnum<["MODE_UNSPECIFIED", "AUTO", "ANY", "NONE"]>>;
|
|
221
|
+
allowedFunctionNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
222
|
+
streamFunctionCallArguments: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
223
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
224
|
+
mode: import("zod").ZodOptional<import("zod").ZodEnum<["MODE_UNSPECIFIED", "AUTO", "ANY", "NONE"]>>;
|
|
225
|
+
allowedFunctionNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
226
|
+
streamFunctionCallArguments: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
227
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
228
|
+
mode: import("zod").ZodOptional<import("zod").ZodEnum<["MODE_UNSPECIFIED", "AUTO", "ANY", "NONE"]>>;
|
|
229
|
+
allowedFunctionNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
230
|
+
streamFunctionCallArguments: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
231
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
232
|
+
retrievalConfig: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
233
|
+
latLng: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
234
|
+
latitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
235
|
+
longitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
236
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
237
|
+
latitude?: number | undefined;
|
|
238
|
+
longitude?: number | undefined;
|
|
239
|
+
}, {
|
|
240
|
+
latitude?: number | undefined;
|
|
241
|
+
longitude?: number | undefined;
|
|
242
|
+
}>>;
|
|
243
|
+
languageCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
244
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
245
|
+
latLng: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
246
|
+
latitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
247
|
+
longitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
248
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
249
|
+
latitude?: number | undefined;
|
|
250
|
+
longitude?: number | undefined;
|
|
251
|
+
}, {
|
|
252
|
+
latitude?: number | undefined;
|
|
253
|
+
longitude?: number | undefined;
|
|
254
|
+
}>>;
|
|
255
|
+
languageCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
256
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
257
|
+
latLng: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
258
|
+
latitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
259
|
+
longitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
260
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
261
|
+
latitude?: number | undefined;
|
|
262
|
+
longitude?: number | undefined;
|
|
263
|
+
}, {
|
|
264
|
+
latitude?: number | undefined;
|
|
265
|
+
longitude?: number | undefined;
|
|
266
|
+
}>>;
|
|
267
|
+
languageCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
268
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
269
|
+
thinkingConfig: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
270
|
+
includeThoughts: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
271
|
+
thinkingBudget: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
272
|
+
thinkingLevel: import("zod").ZodOptional<import("zod").ZodEnum<["MINIMAL", "LOW", "MEDIUM", "HIGH"]>>;
|
|
273
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
274
|
+
includeThoughts: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
275
|
+
thinkingBudget: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
276
|
+
thinkingLevel: import("zod").ZodOptional<import("zod").ZodEnum<["MINIMAL", "LOW", "MEDIUM", "HIGH"]>>;
|
|
277
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
278
|
+
includeThoughts: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
279
|
+
thinkingBudget: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
280
|
+
thinkingLevel: import("zod").ZodOptional<import("zod").ZodEnum<["MINIMAL", "LOW", "MEDIUM", "HIGH"]>>;
|
|
281
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
282
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
283
|
+
version: import("zod").ZodOptional<import("zod").ZodString>;
|
|
284
|
+
maxOutputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
285
|
+
topK: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
286
|
+
stopSequences: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
287
|
+
} & {
|
|
288
|
+
apiKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
289
|
+
labels: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
290
|
+
temperature: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
291
|
+
topP: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
292
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
293
|
+
safetySettings: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
294
|
+
category: import("zod").ZodEnum<["HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", "HARM_CATEGORY_SEXUALLY_EXPLICIT"]>;
|
|
295
|
+
threshold: import("zod").ZodEnum<["BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE"]>;
|
|
296
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
297
|
+
category: import("zod").ZodEnum<["HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", "HARM_CATEGORY_SEXUALLY_EXPLICIT"]>;
|
|
298
|
+
threshold: import("zod").ZodEnum<["BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE"]>;
|
|
299
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
300
|
+
category: import("zod").ZodEnum<["HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", "HARM_CATEGORY_SEXUALLY_EXPLICIT"]>;
|
|
301
|
+
threshold: import("zod").ZodEnum<["BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE"]>;
|
|
302
|
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
303
|
+
vertexRetrieval: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
304
|
+
datastore: import("zod").ZodObject<{
|
|
305
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
306
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
307
|
+
dataStoreId: import("zod").ZodString;
|
|
308
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
309
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
310
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
311
|
+
dataStoreId: import("zod").ZodString;
|
|
312
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
313
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
314
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
315
|
+
dataStoreId: import("zod").ZodString;
|
|
316
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
317
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
318
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
319
|
+
datastore: import("zod").ZodObject<{
|
|
320
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
321
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
322
|
+
dataStoreId: import("zod").ZodString;
|
|
323
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
324
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
325
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
326
|
+
dataStoreId: import("zod").ZodString;
|
|
327
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
328
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
329
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
330
|
+
dataStoreId: import("zod").ZodString;
|
|
331
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
332
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
333
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
334
|
+
datastore: import("zod").ZodObject<{
|
|
335
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
336
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
337
|
+
dataStoreId: import("zod").ZodString;
|
|
338
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
339
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
340
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
341
|
+
dataStoreId: import("zod").ZodString;
|
|
342
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
343
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
344
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
345
|
+
dataStoreId: import("zod").ZodString;
|
|
346
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
347
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
348
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
349
|
+
googleSearchRetrieval: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
350
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
351
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
352
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
353
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
354
|
+
disableAttribution: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
355
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
356
|
+
functionCallingConfig: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
357
|
+
mode: import("zod").ZodOptional<import("zod").ZodEnum<["MODE_UNSPECIFIED", "AUTO", "ANY", "NONE"]>>;
|
|
358
|
+
allowedFunctionNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
359
|
+
streamFunctionCallArguments: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
360
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
361
|
+
mode: import("zod").ZodOptional<import("zod").ZodEnum<["MODE_UNSPECIFIED", "AUTO", "ANY", "NONE"]>>;
|
|
362
|
+
allowedFunctionNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
363
|
+
streamFunctionCallArguments: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
364
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
365
|
+
mode: import("zod").ZodOptional<import("zod").ZodEnum<["MODE_UNSPECIFIED", "AUTO", "ANY", "NONE"]>>;
|
|
366
|
+
allowedFunctionNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
367
|
+
streamFunctionCallArguments: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
368
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
369
|
+
retrievalConfig: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
370
|
+
latLng: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
371
|
+
latitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
372
|
+
longitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
373
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
374
|
+
latitude?: number | undefined;
|
|
375
|
+
longitude?: number | undefined;
|
|
376
|
+
}, {
|
|
377
|
+
latitude?: number | undefined;
|
|
378
|
+
longitude?: number | undefined;
|
|
379
|
+
}>>;
|
|
380
|
+
languageCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
381
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
382
|
+
latLng: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
383
|
+
latitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
384
|
+
longitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
385
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
386
|
+
latitude?: number | undefined;
|
|
387
|
+
longitude?: number | undefined;
|
|
388
|
+
}, {
|
|
389
|
+
latitude?: number | undefined;
|
|
390
|
+
longitude?: number | undefined;
|
|
391
|
+
}>>;
|
|
392
|
+
languageCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
393
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
394
|
+
latLng: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
395
|
+
latitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
396
|
+
longitude: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
397
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
398
|
+
latitude?: number | undefined;
|
|
399
|
+
longitude?: number | undefined;
|
|
400
|
+
}, {
|
|
401
|
+
latitude?: number | undefined;
|
|
402
|
+
longitude?: number | undefined;
|
|
403
|
+
}>>;
|
|
404
|
+
languageCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
405
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
406
|
+
thinkingConfig: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
407
|
+
includeThoughts: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
408
|
+
thinkingBudget: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
409
|
+
thinkingLevel: import("zod").ZodOptional<import("zod").ZodEnum<["MINIMAL", "LOW", "MEDIUM", "HIGH"]>>;
|
|
410
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
411
|
+
includeThoughts: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
412
|
+
thinkingBudget: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
413
|
+
thinkingLevel: import("zod").ZodOptional<import("zod").ZodEnum<["MINIMAL", "LOW", "MEDIUM", "HIGH"]>>;
|
|
414
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
415
|
+
includeThoughts: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
416
|
+
thinkingBudget: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
417
|
+
thinkingLevel: import("zod").ZodOptional<import("zod").ZodEnum<["MINIMAL", "LOW", "MEDIUM", "HIGH"]>>;
|
|
418
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
419
|
+
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
420
|
+
protected readonly aiProvider: DocumentManagementAiProviderService | undefined;
|
|
13
421
|
abstract readonly schema: SchemaTestable<R>;
|
|
14
|
-
|
|
15
|
-
abstract readonly thinking: boolean;
|
|
422
|
+
protected getAiConfiguration(_context: DocumentValidationExecutorContext): AiConfiguration | Promise<AiConfiguration>;
|
|
16
423
|
execute(context: DocumentValidationExecutorContext): Promise<DocumentValidationExecutorResult>;
|
|
17
|
-
abstract
|
|
424
|
+
abstract getValidationInstructions(context: DocumentValidationExecutorContext): string | Instructions | Promise<string | Instructions>;
|
|
18
425
|
abstract getResult(output: R): DocumentValidationExecutorResult | Promise<DocumentValidationExecutorResult>;
|
|
19
426
|
}
|
|
@@ -1,51 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { AiService } from '../../../ai/index.js';
|
|
8
|
-
import { defineEnum } from '../../../enumeration/enumeration.js';
|
|
9
|
-
import { Singleton } from '../../../injector/decorators.js';
|
|
1
|
+
import { convertToGenkitSchema, injectGenkit, injectModel } from '../../../ai/genkit/index.js';
|
|
2
|
+
import { buildPrompts, jsonOutputInstructions } from '../../../ai/prompts/index.js';
|
|
10
3
|
import { inject } from '../../../injector/inject.js';
|
|
11
|
-
import {
|
|
4
|
+
import { isDefined, isNull } from '../../../utils/type-guards.js';
|
|
5
|
+
import { DocumentManagementAiProviderService } from '../services/document-management-ai-provider.service.js';
|
|
12
6
|
import { DocumentValidationExecutor } from './validator.js';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
const systemPromptBase = {
|
|
8
|
+
Role: 'You are an expert in document validation.',
|
|
9
|
+
Task: 'Validate a document based on the provided validation instructions and document content.',
|
|
10
|
+
Objective: 'Analyze the document carefully and provide a structured validation result according to the defined schema.',
|
|
11
|
+
...jsonOutputInstructions,
|
|
12
|
+
};
|
|
13
|
+
export class AiValidationExecutor extends DocumentValidationExecutor {
|
|
14
|
+
genkit = injectGenkit();
|
|
15
|
+
baseModel = injectModel('gemini-2.5-flash');
|
|
16
|
+
aiProvider = inject(DocumentManagementAiProviderService, undefined, { optional: true });
|
|
17
|
+
getAiConfiguration(_context) {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
20
|
async execute(context) {
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
21
|
+
const providerGlobalConfig = await this.aiProvider?.getGlobalConfiguration(context.execution.tenantId);
|
|
22
|
+
const executorConfig = await this.getAiConfiguration(context);
|
|
23
|
+
const providerValidationConfig = await this.aiProvider?.getValidationConfiguration(context.execution.tenantId, context);
|
|
24
|
+
const validationInstructions = await this.getValidationInstructions(context);
|
|
25
|
+
const model = providerValidationConfig?.model ?? executorConfig.model ?? providerGlobalConfig?.defaults?.model ?? this.baseModel;
|
|
26
|
+
const language = providerValidationConfig?.language ?? executorConfig.language ?? providerGlobalConfig?.defaults?.language;
|
|
27
|
+
const { systemPrompt, userPrompt } = buildPrompts({
|
|
28
|
+
baseSystemInstructions: systemPromptBase,
|
|
29
|
+
baseUserInstructions: { Task: 'Validate the document based on the provided system and validation instructions and the document content.' },
|
|
30
|
+
additionalSystemInstructions: [
|
|
31
|
+
providerGlobalConfig?.defaults?.prompt?.systemAddition,
|
|
32
|
+
executorConfig.prompt?.systemAddition,
|
|
33
|
+
providerValidationConfig?.prompt?.systemAddition,
|
|
34
|
+
].filter(isDefined),
|
|
35
|
+
additionalUserInstructions: [
|
|
36
|
+
{ 'Validation Instructions': validationInstructions },
|
|
37
|
+
providerGlobalConfig?.defaults?.prompt?.userAddition,
|
|
38
|
+
executorConfig.prompt?.userAddition,
|
|
39
|
+
providerValidationConfig?.prompt?.userAddition,
|
|
40
|
+
].filter(isDefined),
|
|
41
|
+
systemInstructionsOverride: providerValidationConfig?.prompt?.systemOverride ?? executorConfig.prompt?.systemOverride ?? providerGlobalConfig?.defaults?.prompt?.systemOverride,
|
|
42
|
+
userInstructionsOverride: providerValidationConfig?.prompt?.userOverride ?? executorConfig.prompt?.userOverride ?? providerGlobalConfig?.defaults?.prompt?.userOverride,
|
|
43
|
+
language,
|
|
44
44
|
});
|
|
45
|
-
|
|
45
|
+
const generation = await this.genkit.generate({
|
|
46
|
+
model: model,
|
|
47
|
+
output: { schema: convertToGenkitSchema(this.schema) },
|
|
48
|
+
system: systemPrompt,
|
|
49
|
+
prompt: userPrompt,
|
|
50
|
+
});
|
|
51
|
+
if (isNull(generation.output)) {
|
|
52
|
+
throw new Error('AI returned null output');
|
|
53
|
+
}
|
|
54
|
+
return await this.getResult(generation.output);
|
|
46
55
|
}
|
|
47
|
-
}
|
|
48
|
-
AiValidationExecutor = __decorate([
|
|
49
|
-
Singleton()
|
|
50
|
-
], AiValidationExecutor);
|
|
51
|
-
export { AiValidationExecutor };
|
|
56
|
+
}
|
|
@@ -6,12 +6,10 @@ export declare class SingleDocumentValidationExecutor extends AiValidationExecut
|
|
|
6
6
|
reason?: string;
|
|
7
7
|
}> {
|
|
8
8
|
readonly identifier = "single-document";
|
|
9
|
-
readonly difficulty: "medium";
|
|
10
|
-
readonly thinking = true;
|
|
11
9
|
schema: import("../../../schema/index.js").ObjectSchema<{
|
|
12
10
|
hasMultipleDocuments: boolean;
|
|
13
11
|
reason?: string | undefined;
|
|
14
12
|
}>;
|
|
15
|
-
|
|
13
|
+
getValidationInstructions(): string;
|
|
16
14
|
getResult(output: SchemaOutput<typeof this['schema']>): DocumentValidationExecutorResult;
|
|
17
15
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { boolean, object, optional, string } from '../../../schema/index.js';
|
|
2
2
|
import { DocumentValidationResultStatus } from '../../models/document-validation-execution.model.js';
|
|
3
|
-
import {
|
|
3
|
+
import { AiValidationExecutor } from './ai-validation-executor.js';
|
|
4
4
|
export class SingleDocumentValidationExecutor extends AiValidationExecutor {
|
|
5
5
|
identifier = 'single-document';
|
|
6
|
-
difficulty = AiValidationDifficulty.Medium;
|
|
7
|
-
thinking = true;
|
|
8
6
|
schema = object({
|
|
9
7
|
hasMultipleDocuments: boolean(),
|
|
10
8
|
reason: optional(string()),
|
|
11
9
|
});
|
|
12
|
-
|
|
10
|
+
getValidationInstructions() {
|
|
13
11
|
return 'Überprüfe ob das Dokument aus mehreren einzelnen Dokumenten zusammengesetzt ist. Falls ja, begründe in wenigen Worten. Antworte auf deutsch.';
|
|
14
12
|
}
|
|
15
13
|
getResult(output) {
|
|
@@ -163,7 +163,7 @@ export declare const deleteDocumentRequestParametersSchema: import("../../schema
|
|
|
163
163
|
attributes: import("../../orm/index.js").HasDefault<import("../../orm/index.js").Json<import("../../orm/index.js").EntityMetadataAttributes>>;
|
|
164
164
|
}> | undefined;
|
|
165
165
|
}>;
|
|
166
|
-
export declare const
|
|
166
|
+
export declare const getDataParametersSchema: import("../../schema/index.js").ObjectSchema<{
|
|
167
167
|
collectionIds: string | string[];
|
|
168
168
|
}>;
|
|
169
169
|
export declare const createCollectionParametersSchema: import("../../schema/index.js").ObjectSchema<{
|
|
@@ -236,10 +236,10 @@ export declare const addOrArchiveDocumentToOrFromCollectionParametersSchema: imp
|
|
|
236
236
|
}>;
|
|
237
237
|
export declare const proceedDocumentWorkflowParametersSchema: import("../../schema/index.js").ObjectSchema<{
|
|
238
238
|
id: string;
|
|
239
|
-
state: "error" | "pending" | "running" | "completed" | "
|
|
239
|
+
state: "error" | "pending" | "running" | "completed" | "review" | "failed";
|
|
240
240
|
}>;
|
|
241
241
|
export type MetadataParameter = SchemaOutput<typeof metadataParameterObjectSchema>;
|
|
242
|
-
export type LoadDataParameters = SchemaOutput<typeof
|
|
242
|
+
export type LoadDataParameters = SchemaOutput<typeof getDataParametersSchema>;
|
|
243
243
|
export type CreateCollectionParameters = SchemaOutput<typeof createCollectionParametersSchema>;
|
|
244
244
|
export type CreateDocumentParameters = SchemaOutput<typeof createDocumentParametersSchema>;
|
|
245
245
|
export type ApproveDocumentRequestParameters = SchemaOutput<typeof approveDocumentRequestParametersSchema>;
|