@memberjunction/server 2.51.0 → 2.53.0
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/dist/generated/generated.d.ts +74 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +399 -0
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.js +1 -1
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/generic/RunViewResolver.d.ts +28 -0
- package/dist/generic/RunViewResolver.d.ts.map +1 -1
- package/dist/generic/RunViewResolver.js +138 -0
- package/dist/generic/RunViewResolver.js.map +1 -1
- package/dist/resolvers/FileResolver.js +1 -1
- package/dist/resolvers/FileResolver.js.map +1 -1
- package/dist/resolvers/QueryResolver.d.ts +2 -0
- package/dist/resolvers/QueryResolver.d.ts.map +1 -1
- package/dist/resolvers/QueryResolver.js +57 -0
- package/dist/resolvers/QueryResolver.js.map +1 -1
- package/dist/resolvers/RunAIPromptResolver.d.ts +1 -1
- package/dist/resolvers/RunAIPromptResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIPromptResolver.js +53 -3
- package/dist/resolvers/RunAIPromptResolver.js.map +1 -1
- package/package.json +25 -25
- package/src/generated/generated.ts +241 -0
- package/src/generic/ResolverBase.ts +1 -1
- package/src/generic/RunViewResolver.ts +718 -587
- package/src/resolvers/FileResolver.ts +1 -1
- package/src/resolvers/QueryResolver.ts +134 -81
- package/src/resolvers/RunAIPromptResolver.ts +52 -2
|
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
|
-
import { Resolver, Mutation, Arg, Ctx, ObjectType, Field } from 'type-graphql';
|
|
13
|
+
import { Resolver, Mutation, Arg, Ctx, ObjectType, Field, Int } from 'type-graphql';
|
|
14
14
|
import { LogError, LogStatus, Metadata } from '@memberjunction/core';
|
|
15
15
|
import { AIPromptRunner, AIPromptParams } from '@memberjunction/ai-prompts';
|
|
16
16
|
import { ResolverBase } from '../generic/ResolverBase.js';
|
|
@@ -66,7 +66,7 @@ AIPromptRunResult = __decorate([
|
|
|
66
66
|
], AIPromptRunResult);
|
|
67
67
|
export { AIPromptRunResult };
|
|
68
68
|
let RunAIPromptResolver = class RunAIPromptResolver extends ResolverBase {
|
|
69
|
-
async RunAIPrompt(promptId, { userPayload }, data, modelId, vendorId, configurationId, skipValidation, templateData) {
|
|
69
|
+
async RunAIPrompt(promptId, { userPayload }, data, modelId, vendorId, configurationId, skipValidation, templateData, responseFormat, temperature, topP, topK, minP, frequencyPenalty, presencePenalty, seed, stopSequences, includeLogProbs, topLogProbs, messages) {
|
|
70
70
|
const startTime = Date.now();
|
|
71
71
|
try {
|
|
72
72
|
LogStatus(`=== RUNNING AI PROMPT FOR ID: ${promptId} ===`);
|
|
@@ -131,6 +131,44 @@ let RunAIPromptResolver = class RunAIPromptResolver extends ResolverBase {
|
|
|
131
131
|
promptParams.configurationId = configurationId;
|
|
132
132
|
promptParams.contextUser = currentUser;
|
|
133
133
|
promptParams.skipValidation = skipValidation || false;
|
|
134
|
+
if (messages) {
|
|
135
|
+
try {
|
|
136
|
+
promptParams.conversationMessages = JSON.parse(messages);
|
|
137
|
+
}
|
|
138
|
+
catch (parseError) {
|
|
139
|
+
promptParams.conversationMessages = [{
|
|
140
|
+
role: 'user',
|
|
141
|
+
content: messages
|
|
142
|
+
}];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (responseFormat) {
|
|
146
|
+
promptEntity.ResponseFormat = responseFormat;
|
|
147
|
+
}
|
|
148
|
+
const additionalParams = {};
|
|
149
|
+
if (temperature != null)
|
|
150
|
+
additionalParams.temperature = temperature;
|
|
151
|
+
if (topP != null)
|
|
152
|
+
additionalParams.topP = topP;
|
|
153
|
+
if (topK != null)
|
|
154
|
+
additionalParams.topK = topK;
|
|
155
|
+
if (minP != null)
|
|
156
|
+
additionalParams.minP = minP;
|
|
157
|
+
if (frequencyPenalty != null)
|
|
158
|
+
additionalParams.frequencyPenalty = frequencyPenalty;
|
|
159
|
+
if (presencePenalty != null)
|
|
160
|
+
additionalParams.presencePenalty = presencePenalty;
|
|
161
|
+
if (seed != null)
|
|
162
|
+
additionalParams.seed = seed;
|
|
163
|
+
if (stopSequences != null)
|
|
164
|
+
additionalParams.stopSequences = stopSequences;
|
|
165
|
+
if (includeLogProbs != null)
|
|
166
|
+
additionalParams.includeLogProbs = includeLogProbs;
|
|
167
|
+
if (topLogProbs != null)
|
|
168
|
+
additionalParams.topLogProbs = topLogProbs;
|
|
169
|
+
if (Object.keys(additionalParams).length > 0) {
|
|
170
|
+
promptParams.additionalParameters = additionalParams;
|
|
171
|
+
}
|
|
134
172
|
const result = await promptRunner.ExecutePrompt(promptParams);
|
|
135
173
|
const executionTime = Date.now() - startTime;
|
|
136
174
|
if (result.success) {
|
|
@@ -177,8 +215,20 @@ __decorate([
|
|
|
177
215
|
__param(5, Arg('configurationId', { nullable: true })),
|
|
178
216
|
__param(6, Arg('skipValidation', { nullable: true })),
|
|
179
217
|
__param(7, Arg('templateData', { nullable: true })),
|
|
218
|
+
__param(8, Arg('responseFormat', { nullable: true })),
|
|
219
|
+
__param(9, Arg('temperature', { nullable: true })),
|
|
220
|
+
__param(10, Arg('topP', { nullable: true })),
|
|
221
|
+
__param(11, Arg('topK', () => Int, { nullable: true })),
|
|
222
|
+
__param(12, Arg('minP', { nullable: true })),
|
|
223
|
+
__param(13, Arg('frequencyPenalty', { nullable: true })),
|
|
224
|
+
__param(14, Arg('presencePenalty', { nullable: true })),
|
|
225
|
+
__param(15, Arg('seed', () => Int, { nullable: true })),
|
|
226
|
+
__param(16, Arg('stopSequences', () => [String], { nullable: true })),
|
|
227
|
+
__param(17, Arg('includeLogProbs', { nullable: true })),
|
|
228
|
+
__param(18, Arg('topLogProbs', () => Int, { nullable: true })),
|
|
229
|
+
__param(19, Arg('messages', { nullable: true })),
|
|
180
230
|
__metadata("design:type", Function),
|
|
181
|
-
__metadata("design:paramtypes", [String, Object, String, String, String, String, Boolean, String]),
|
|
231
|
+
__metadata("design:paramtypes", [String, Object, String, String, String, String, Boolean, String, String, Number, Number, Number, Number, Number, Number, Number, Array, Boolean, Number, String]),
|
|
182
232
|
__metadata("design:returntype", Promise)
|
|
183
233
|
], RunAIPromptResolver.prototype, "RunAIPrompt", null);
|
|
184
234
|
RunAIPromptResolver = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunAIPromptResolver.js","sourceRoot":"","sources":["../../src/resolvers/RunAIPromptResolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"RunAIPromptResolver.js","sourceRoot":"","sources":["../../src/resolvers/RunAIPromptResolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEpF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAGnD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAE1B,OAAO,CAAU;IAGjB,MAAM,CAAU;IAGhB,YAAY,CAAU;IAGtB,KAAK,CAAU;IAGf,eAAe,CAAU;IAGzB,UAAU,CAAU;IAGpB,WAAW,CAAU;IAGrB,SAAS,CAAU;IAGnB,gBAAgB,CAAU;CAC7B,CAAA;AAzBG;I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E,IAAI,EAAE,CAAC,CAAA;IACxD,YAAA,GAAG,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1C,YAAA,GAAG,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IACjD,YAAA,GAAG,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;;;;sDA6JvC;AAnLQ,mBAAmB;IAD/B,QAAQ,EAAE;GACE,mBAAmB,CAoL/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.53.0",
|
|
4
4
|
"description": "MemberJunction: This project provides API access via GraphQL to the common data store.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -22,30 +22,30 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@apollo/server": "^4.9.1",
|
|
24
24
|
"@graphql-tools/utils": "^10.0.1",
|
|
25
|
-
"@memberjunction/actions": "2.
|
|
26
|
-
"@memberjunction/ai": "2.
|
|
27
|
-
"@memberjunction/ai-agents": "2.
|
|
28
|
-
"@memberjunction/ai-mistral": "2.
|
|
29
|
-
"@memberjunction/ai-openai": "2.
|
|
30
|
-
"@memberjunction/ai-vectors-pinecone": "2.
|
|
31
|
-
"@memberjunction/aiengine": "2.
|
|
32
|
-
"@memberjunction/ai-prompts": "2.
|
|
33
|
-
"@memberjunction/core": "2.
|
|
34
|
-
"@memberjunction/core-actions": "2.
|
|
35
|
-
"@memberjunction/core-entities": "2.
|
|
36
|
-
"@memberjunction/core-entities-server": "2.
|
|
37
|
-
"@memberjunction/data-context": "2.
|
|
38
|
-
"@memberjunction/data-context-server": "2.
|
|
39
|
-
"@memberjunction/doc-utils": "2.
|
|
40
|
-
"@memberjunction/entity-communications-server": "2.
|
|
41
|
-
"@memberjunction/external-change-detection": "2.
|
|
42
|
-
"@memberjunction/global": "2.
|
|
43
|
-
"@memberjunction/graphql-dataprovider": "2.
|
|
44
|
-
"@memberjunction/queue": "2.
|
|
45
|
-
"@memberjunction/skip-types": "2.
|
|
46
|
-
"@memberjunction/sqlserver-dataprovider": "2.
|
|
47
|
-
"@memberjunction/storage": "2.
|
|
48
|
-
"@memberjunction/templates": "2.
|
|
25
|
+
"@memberjunction/actions": "2.53.0",
|
|
26
|
+
"@memberjunction/ai": "2.53.0",
|
|
27
|
+
"@memberjunction/ai-agents": "2.53.0",
|
|
28
|
+
"@memberjunction/ai-mistral": "2.53.0",
|
|
29
|
+
"@memberjunction/ai-openai": "2.53.0",
|
|
30
|
+
"@memberjunction/ai-vectors-pinecone": "2.53.0",
|
|
31
|
+
"@memberjunction/aiengine": "2.53.0",
|
|
32
|
+
"@memberjunction/ai-prompts": "2.53.0",
|
|
33
|
+
"@memberjunction/core": "2.53.0",
|
|
34
|
+
"@memberjunction/core-actions": "2.53.0",
|
|
35
|
+
"@memberjunction/core-entities": "2.53.0",
|
|
36
|
+
"@memberjunction/core-entities-server": "2.53.0",
|
|
37
|
+
"@memberjunction/data-context": "2.53.0",
|
|
38
|
+
"@memberjunction/data-context-server": "2.53.0",
|
|
39
|
+
"@memberjunction/doc-utils": "2.53.0",
|
|
40
|
+
"@memberjunction/entity-communications-server": "2.53.0",
|
|
41
|
+
"@memberjunction/external-change-detection": "2.53.0",
|
|
42
|
+
"@memberjunction/global": "2.53.0",
|
|
43
|
+
"@memberjunction/graphql-dataprovider": "2.53.0",
|
|
44
|
+
"@memberjunction/queue": "2.53.0",
|
|
45
|
+
"@memberjunction/skip-types": "2.53.0",
|
|
46
|
+
"@memberjunction/sqlserver-dataprovider": "2.53.0",
|
|
47
|
+
"@memberjunction/storage": "2.53.0",
|
|
48
|
+
"@memberjunction/templates": "2.53.0",
|
|
49
49
|
"@types/compression": "^1.7.5",
|
|
50
50
|
"@types/cors": "^2.8.13",
|
|
51
51
|
"@types/jsonwebtoken": "9.0.6",
|
|
@@ -3804,6 +3804,37 @@ export class AIPrompt_ {
|
|
|
3804
3804
|
@MaxLength(40)
|
|
3805
3805
|
PromptPosition: string;
|
|
3806
3806
|
|
|
3807
|
+
@Field(() => Float, {nullable: true, description: `Default temperature setting for this prompt. Controls randomness in the output. 0 = more focused and deterministic, 2 = more random and creative. Can be overridden at runtime.`})
|
|
3808
|
+
Temperature?: number;
|
|
3809
|
+
|
|
3810
|
+
@Field(() => Float, {nullable: true, description: `Default TopP (nucleus sampling) for this prompt. Only consider tokens with cumulative probability up to this value. 1 = consider all tokens. Can be overridden at runtime.`})
|
|
3811
|
+
TopP?: number;
|
|
3812
|
+
|
|
3813
|
+
@Field(() => Int, {nullable: true, description: `Default TopK sampling for this prompt. Only sample from the top K tokens. Lower values reduce randomness. Can be overridden at runtime.`})
|
|
3814
|
+
TopK?: number;
|
|
3815
|
+
|
|
3816
|
+
@Field(() => Float, {nullable: true, description: `Default MinP (minimum probability) for this prompt. Tokens with probability below this threshold are filtered out. Can be overridden at runtime.`})
|
|
3817
|
+
MinP?: number;
|
|
3818
|
+
|
|
3819
|
+
@Field(() => Float, {nullable: true, description: `Default frequency penalty for this prompt. Penalizes tokens based on their frequency in the text. Positive values decrease likelihood of repetition. Can be overridden at runtime.`})
|
|
3820
|
+
FrequencyPenalty?: number;
|
|
3821
|
+
|
|
3822
|
+
@Field(() => Float, {nullable: true, description: `Default presence penalty for this prompt. Penalizes tokens that have appeared in the text. Positive values increase topic diversity. Can be overridden at runtime.`})
|
|
3823
|
+
PresencePenalty?: number;
|
|
3824
|
+
|
|
3825
|
+
@Field(() => Int, {nullable: true, description: `Default random seed for this prompt. Used for deterministic generation. Same seed produces same output. Can be overridden at runtime.`})
|
|
3826
|
+
Seed?: number;
|
|
3827
|
+
|
|
3828
|
+
@Field({nullable: true, description: `Default stop sequences for this prompt. Comma-delimited list of sequences that will stop generation when encountered. Can be overridden at runtime.`})
|
|
3829
|
+
@MaxLength(2000)
|
|
3830
|
+
StopSequences?: string;
|
|
3831
|
+
|
|
3832
|
+
@Field(() => Boolean, {nullable: true, description: `Default setting for including log probabilities in the response. Can be overridden at runtime.`})
|
|
3833
|
+
IncludeLogProbs?: boolean;
|
|
3834
|
+
|
|
3835
|
+
@Field(() => Int, {nullable: true, description: `Default number of top log probabilities to include when IncludeLogProbs is true. Can be overridden at runtime.`})
|
|
3836
|
+
TopLogProbs?: number;
|
|
3837
|
+
|
|
3807
3838
|
@Field()
|
|
3808
3839
|
@MaxLength(510)
|
|
3809
3840
|
Template: string;
|
|
@@ -3956,6 +3987,36 @@ export class CreateAIPromptInput {
|
|
|
3956
3987
|
|
|
3957
3988
|
@Field({ nullable: true })
|
|
3958
3989
|
PromptPosition?: string;
|
|
3990
|
+
|
|
3991
|
+
@Field(() => Float, { nullable: true })
|
|
3992
|
+
Temperature: number | null;
|
|
3993
|
+
|
|
3994
|
+
@Field(() => Float, { nullable: true })
|
|
3995
|
+
TopP: number | null;
|
|
3996
|
+
|
|
3997
|
+
@Field(() => Int, { nullable: true })
|
|
3998
|
+
TopK: number | null;
|
|
3999
|
+
|
|
4000
|
+
@Field(() => Float, { nullable: true })
|
|
4001
|
+
MinP: number | null;
|
|
4002
|
+
|
|
4003
|
+
@Field(() => Float, { nullable: true })
|
|
4004
|
+
FrequencyPenalty: number | null;
|
|
4005
|
+
|
|
4006
|
+
@Field(() => Float, { nullable: true })
|
|
4007
|
+
PresencePenalty: number | null;
|
|
4008
|
+
|
|
4009
|
+
@Field(() => Int, { nullable: true })
|
|
4010
|
+
Seed: number | null;
|
|
4011
|
+
|
|
4012
|
+
@Field({ nullable: true })
|
|
4013
|
+
StopSequences: string | null;
|
|
4014
|
+
|
|
4015
|
+
@Field(() => Boolean, { nullable: true })
|
|
4016
|
+
IncludeLogProbs?: boolean | null;
|
|
4017
|
+
|
|
4018
|
+
@Field(() => Int, { nullable: true })
|
|
4019
|
+
TopLogProbs: number | null;
|
|
3959
4020
|
}
|
|
3960
4021
|
|
|
3961
4022
|
|
|
@@ -4063,6 +4124,36 @@ export class UpdateAIPromptInput {
|
|
|
4063
4124
|
@Field({ nullable: true })
|
|
4064
4125
|
PromptPosition?: string;
|
|
4065
4126
|
|
|
4127
|
+
@Field(() => Float, { nullable: true })
|
|
4128
|
+
Temperature?: number | null;
|
|
4129
|
+
|
|
4130
|
+
@Field(() => Float, { nullable: true })
|
|
4131
|
+
TopP?: number | null;
|
|
4132
|
+
|
|
4133
|
+
@Field(() => Int, { nullable: true })
|
|
4134
|
+
TopK?: number | null;
|
|
4135
|
+
|
|
4136
|
+
@Field(() => Float, { nullable: true })
|
|
4137
|
+
MinP?: number | null;
|
|
4138
|
+
|
|
4139
|
+
@Field(() => Float, { nullable: true })
|
|
4140
|
+
FrequencyPenalty?: number | null;
|
|
4141
|
+
|
|
4142
|
+
@Field(() => Float, { nullable: true })
|
|
4143
|
+
PresencePenalty?: number | null;
|
|
4144
|
+
|
|
4145
|
+
@Field(() => Int, { nullable: true })
|
|
4146
|
+
Seed?: number | null;
|
|
4147
|
+
|
|
4148
|
+
@Field({ nullable: true })
|
|
4149
|
+
StopSequences?: string | null;
|
|
4150
|
+
|
|
4151
|
+
@Field(() => Boolean, { nullable: true })
|
|
4152
|
+
IncludeLogProbs?: boolean | null;
|
|
4153
|
+
|
|
4154
|
+
@Field(() => Int, { nullable: true })
|
|
4155
|
+
TopLogProbs?: number | null;
|
|
4156
|
+
|
|
4066
4157
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
4067
4158
|
OldValues___?: KeyValuePairInput[];
|
|
4068
4159
|
}
|
|
@@ -26363,6 +26454,10 @@ export class Action_ {
|
|
|
26363
26454
|
@MaxLength(510)
|
|
26364
26455
|
DriverClass?: string;
|
|
26365
26456
|
|
|
26457
|
+
@Field({nullable: true, description: `Optional ID of the parent action this action inherits from. Used for hierarchical action composition where child actions can specialize parent actions.`})
|
|
26458
|
+
@MaxLength(16)
|
|
26459
|
+
ParentID?: string;
|
|
26460
|
+
|
|
26366
26461
|
@Field({nullable: true})
|
|
26367
26462
|
@MaxLength(510)
|
|
26368
26463
|
Category?: string;
|
|
@@ -26371,6 +26466,10 @@ export class Action_ {
|
|
|
26371
26466
|
@MaxLength(200)
|
|
26372
26467
|
CodeApprovedByUser?: string;
|
|
26373
26468
|
|
|
26469
|
+
@Field({nullable: true})
|
|
26470
|
+
@MaxLength(850)
|
|
26471
|
+
Parent?: string;
|
|
26472
|
+
|
|
26374
26473
|
@Field(() => [ActionParam_])
|
|
26375
26474
|
ActionParams_ActionIDArray: ActionParam_[]; // Link to ActionParams
|
|
26376
26475
|
|
|
@@ -26398,6 +26497,9 @@ export class Action_ {
|
|
|
26398
26497
|
@Field(() => [ActionAuthorization_])
|
|
26399
26498
|
ActionAuthorizations_ActionIDArray: ActionAuthorization_[]; // Link to ActionAuthorizations
|
|
26400
26499
|
|
|
26500
|
+
@Field(() => [Action_])
|
|
26501
|
+
Actions_ParentIDArray: Action_[]; // Link to Actions
|
|
26502
|
+
|
|
26401
26503
|
}
|
|
26402
26504
|
|
|
26403
26505
|
//****************************************************************************
|
|
@@ -26458,6 +26560,9 @@ export class CreateActionInput {
|
|
|
26458
26560
|
|
|
26459
26561
|
@Field({ nullable: true })
|
|
26460
26562
|
DriverClass: string | null;
|
|
26563
|
+
|
|
26564
|
+
@Field({ nullable: true })
|
|
26565
|
+
ParentID: string | null;
|
|
26461
26566
|
}
|
|
26462
26567
|
|
|
26463
26568
|
|
|
@@ -26520,6 +26625,9 @@ export class UpdateActionInput {
|
|
|
26520
26625
|
@Field({ nullable: true })
|
|
26521
26626
|
DriverClass?: string | null;
|
|
26522
26627
|
|
|
26628
|
+
@Field({ nullable: true })
|
|
26629
|
+
ParentID?: string | null;
|
|
26630
|
+
|
|
26523
26631
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
26524
26632
|
OldValues___?: KeyValuePairInput[];
|
|
26525
26633
|
}
|
|
@@ -26671,6 +26779,16 @@ export class ActionResolver extends ResolverBase {
|
|
|
26671
26779
|
return result;
|
|
26672
26780
|
}
|
|
26673
26781
|
|
|
26782
|
+
@FieldResolver(() => [Action_])
|
|
26783
|
+
async Actions_ParentIDArray(@Root() action_: Action_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26784
|
+
this.CheckUserReadPermissions('Actions', userPayload);
|
|
26785
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
26786
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActions] WHERE [ParentID]='${action_.ID}' ` + this.getRowLevelSecurityWhereClause('Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
26787
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
26788
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Actions', rows);
|
|
26789
|
+
return result;
|
|
26790
|
+
}
|
|
26791
|
+
|
|
26674
26792
|
@Mutation(() => Action_)
|
|
26675
26793
|
async CreateAction(
|
|
26676
26794
|
@Arg('input', () => CreateActionInput) input: CreateActionInput,
|
|
@@ -30084,6 +30202,9 @@ export class TemplateContent_ {
|
|
|
30084
30202
|
@MaxLength(510)
|
|
30085
30203
|
Type: string;
|
|
30086
30204
|
|
|
30205
|
+
@Field(() => [TemplateParam_])
|
|
30206
|
+
TemplateParams_TemplateContentIDArray: TemplateParam_[]; // Link to TemplateParams
|
|
30207
|
+
|
|
30087
30208
|
}
|
|
30088
30209
|
|
|
30089
30210
|
//****************************************************************************
|
|
@@ -30195,6 +30316,16 @@ export class TemplateContentResolver extends ResolverBase {
|
|
|
30195
30316
|
return result;
|
|
30196
30317
|
}
|
|
30197
30318
|
|
|
30319
|
+
@FieldResolver(() => [TemplateParam_])
|
|
30320
|
+
async TemplateParams_TemplateContentIDArray(@Root() templatecontent_: TemplateContent_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30321
|
+
this.CheckUserReadPermissions('Template Params', userPayload);
|
|
30322
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30323
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateParams] WHERE [TemplateContentID]='${templatecontent_.ID}' ` + this.getRowLevelSecurityWhereClause('Template Params', userPayload, EntityPermissionType.Read, 'AND');
|
|
30324
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
30325
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Params', rows);
|
|
30326
|
+
return result;
|
|
30327
|
+
}
|
|
30328
|
+
|
|
30198
30329
|
@Mutation(() => TemplateContent_)
|
|
30199
30330
|
async CreateTemplateContent(
|
|
30200
30331
|
@Arg('input', () => CreateTemplateContentInput) input: CreateTemplateContentInput,
|
|
@@ -30284,6 +30415,10 @@ export class TemplateParam_ {
|
|
|
30284
30415
|
@Field({nullable: true, description: `This field is used only when the Type of the TemplateParam table is "Entity". It is an optional field used to specify the sorting order for the related entity data that is used in the template for the Entity specified.`})
|
|
30285
30416
|
OrderBy?: string;
|
|
30286
30417
|
|
|
30418
|
+
@Field({nullable: true, description: `Optional reference to a specific template content. When NULL, this parameter applies to all content items within the template. When set, this parameter applies only to the specified template content.`})
|
|
30419
|
+
@MaxLength(16)
|
|
30420
|
+
TemplateContentID?: string;
|
|
30421
|
+
|
|
30287
30422
|
@Field()
|
|
30288
30423
|
@MaxLength(510)
|
|
30289
30424
|
Template: string;
|
|
@@ -30337,6 +30472,9 @@ export class CreateTemplateParamInput {
|
|
|
30337
30472
|
|
|
30338
30473
|
@Field({ nullable: true })
|
|
30339
30474
|
OrderBy: string | null;
|
|
30475
|
+
|
|
30476
|
+
@Field({ nullable: true })
|
|
30477
|
+
TemplateContentID: string | null;
|
|
30340
30478
|
}
|
|
30341
30479
|
|
|
30342
30480
|
|
|
@@ -30384,6 +30522,9 @@ export class UpdateTemplateParamInput {
|
|
|
30384
30522
|
@Field({ nullable: true })
|
|
30385
30523
|
OrderBy?: string | null;
|
|
30386
30524
|
|
|
30525
|
+
@Field({ nullable: true })
|
|
30526
|
+
TemplateContentID?: string | null;
|
|
30527
|
+
|
|
30387
30528
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
30388
30529
|
OldValues___?: KeyValuePairInput[];
|
|
30389
30530
|
}
|
|
@@ -37443,6 +37584,40 @@ export class AIPromptRun_ {
|
|
|
37443
37584
|
@Field(() => Int, {nullable: true, description: `Total completion/output tokens including this execution and all child/grandchild executions. For leaf nodes (no children), this equals TokensCompletion. For parent nodes, this includes the sum of all descendant completion tokens.`})
|
|
37444
37585
|
TokensCompletionRollup?: number;
|
|
37445
37586
|
|
|
37587
|
+
@Field(() => Float, {nullable: true, description: `The temperature parameter used for this prompt run, controlling randomness in the output (0.0 = deterministic, 2.0 = very random)`})
|
|
37588
|
+
Temperature?: number;
|
|
37589
|
+
|
|
37590
|
+
@Field(() => Float, {nullable: true, description: `Top-p (nucleus) sampling parameter used for this run. Considers tokens with cumulative probability up to this value (0-1)`})
|
|
37591
|
+
TopP?: number;
|
|
37592
|
+
|
|
37593
|
+
@Field(() => Int, {nullable: true, description: `Top-k sampling parameter used for this run. Limits sampling to the top K most likely tokens`})
|
|
37594
|
+
TopK?: number;
|
|
37595
|
+
|
|
37596
|
+
@Field(() => Float, {nullable: true, description: `Minimum probability threshold used for token sampling (0-1). Tokens below this probability are filtered out`})
|
|
37597
|
+
MinP?: number;
|
|
37598
|
+
|
|
37599
|
+
@Field(() => Float, {nullable: true, description: `Frequency penalty parameter used (-2.0 to 2.0). Positive values reduce repetition of tokens based on their frequency in the output`})
|
|
37600
|
+
FrequencyPenalty?: number;
|
|
37601
|
+
|
|
37602
|
+
@Field(() => Float, {nullable: true, description: `Presence penalty parameter used (-2.0 to 2.0). Positive values encourage the model to talk about new topics`})
|
|
37603
|
+
PresencePenalty?: number;
|
|
37604
|
+
|
|
37605
|
+
@Field(() => Int, {nullable: true, description: `Random seed used for reproducible outputs. When set, the same seed with identical inputs should produce the same output`})
|
|
37606
|
+
Seed?: number;
|
|
37607
|
+
|
|
37608
|
+
@Field({nullable: true, description: `JSON array of stop sequences used. The model stops generating when any of these sequences are encountered`})
|
|
37609
|
+
StopSequences?: string;
|
|
37610
|
+
|
|
37611
|
+
@Field({nullable: true, description: `The response format requested for this run (e.g., 'JSON', 'Text', 'Markdown')`})
|
|
37612
|
+
@MaxLength(100)
|
|
37613
|
+
ResponseFormat?: string;
|
|
37614
|
+
|
|
37615
|
+
@Field(() => Boolean, {nullable: true, description: `Whether log probabilities were requested for this run`})
|
|
37616
|
+
LogProbs?: boolean;
|
|
37617
|
+
|
|
37618
|
+
@Field(() => Int, {nullable: true, description: `Number of top log probabilities requested per token (if LogProbs is true)`})
|
|
37619
|
+
TopLogProbs?: number;
|
|
37620
|
+
|
|
37446
37621
|
@Field()
|
|
37447
37622
|
@MaxLength(510)
|
|
37448
37623
|
Prompt: string;
|
|
@@ -37553,6 +37728,39 @@ export class CreateAIPromptRunInput {
|
|
|
37553
37728
|
|
|
37554
37729
|
@Field(() => Int, { nullable: true })
|
|
37555
37730
|
TokensCompletionRollup: number | null;
|
|
37731
|
+
|
|
37732
|
+
@Field(() => Float, { nullable: true })
|
|
37733
|
+
Temperature: number | null;
|
|
37734
|
+
|
|
37735
|
+
@Field(() => Float, { nullable: true })
|
|
37736
|
+
TopP: number | null;
|
|
37737
|
+
|
|
37738
|
+
@Field(() => Int, { nullable: true })
|
|
37739
|
+
TopK: number | null;
|
|
37740
|
+
|
|
37741
|
+
@Field(() => Float, { nullable: true })
|
|
37742
|
+
MinP: number | null;
|
|
37743
|
+
|
|
37744
|
+
@Field(() => Float, { nullable: true })
|
|
37745
|
+
FrequencyPenalty: number | null;
|
|
37746
|
+
|
|
37747
|
+
@Field(() => Float, { nullable: true })
|
|
37748
|
+
PresencePenalty: number | null;
|
|
37749
|
+
|
|
37750
|
+
@Field(() => Int, { nullable: true })
|
|
37751
|
+
Seed: number | null;
|
|
37752
|
+
|
|
37753
|
+
@Field({ nullable: true })
|
|
37754
|
+
StopSequences: string | null;
|
|
37755
|
+
|
|
37756
|
+
@Field({ nullable: true })
|
|
37757
|
+
ResponseFormat: string | null;
|
|
37758
|
+
|
|
37759
|
+
@Field(() => Boolean, { nullable: true })
|
|
37760
|
+
LogProbs: boolean | null;
|
|
37761
|
+
|
|
37762
|
+
@Field(() => Int, { nullable: true })
|
|
37763
|
+
TopLogProbs: number | null;
|
|
37556
37764
|
}
|
|
37557
37765
|
|
|
37558
37766
|
|
|
@@ -37639,6 +37847,39 @@ export class UpdateAIPromptRunInput {
|
|
|
37639
37847
|
@Field(() => Int, { nullable: true })
|
|
37640
37848
|
TokensCompletionRollup?: number | null;
|
|
37641
37849
|
|
|
37850
|
+
@Field(() => Float, { nullable: true })
|
|
37851
|
+
Temperature?: number | null;
|
|
37852
|
+
|
|
37853
|
+
@Field(() => Float, { nullable: true })
|
|
37854
|
+
TopP?: number | null;
|
|
37855
|
+
|
|
37856
|
+
@Field(() => Int, { nullable: true })
|
|
37857
|
+
TopK?: number | null;
|
|
37858
|
+
|
|
37859
|
+
@Field(() => Float, { nullable: true })
|
|
37860
|
+
MinP?: number | null;
|
|
37861
|
+
|
|
37862
|
+
@Field(() => Float, { nullable: true })
|
|
37863
|
+
FrequencyPenalty?: number | null;
|
|
37864
|
+
|
|
37865
|
+
@Field(() => Float, { nullable: true })
|
|
37866
|
+
PresencePenalty?: number | null;
|
|
37867
|
+
|
|
37868
|
+
@Field(() => Int, { nullable: true })
|
|
37869
|
+
Seed?: number | null;
|
|
37870
|
+
|
|
37871
|
+
@Field({ nullable: true })
|
|
37872
|
+
StopSequences?: string | null;
|
|
37873
|
+
|
|
37874
|
+
@Field({ nullable: true })
|
|
37875
|
+
ResponseFormat?: string | null;
|
|
37876
|
+
|
|
37877
|
+
@Field(() => Boolean, { nullable: true })
|
|
37878
|
+
LogProbs?: boolean | null;
|
|
37879
|
+
|
|
37880
|
+
@Field(() => Int, { nullable: true })
|
|
37881
|
+
TopLogProbs?: number | null;
|
|
37882
|
+
|
|
37642
37883
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
37643
37884
|
OldValues___?: KeyValuePairInput[];
|
|
37644
37885
|
}
|
|
@@ -740,7 +740,7 @@ export class ResolverBase {
|
|
|
740
740
|
input.OldValues___?.forEach((item) => (oldValues[item.Key] = item.Value));
|
|
741
741
|
|
|
742
742
|
// 1) load the old values, this will be the initial state of the object
|
|
743
|
-
entityObject.LoadFromData(oldValues);
|
|
743
|
+
await entityObject.LoadFromData(oldValues);
|
|
744
744
|
|
|
745
745
|
// 2) set the new values from the input, not including the OldValues property
|
|
746
746
|
entityObject.SetMany(clientNewValues);
|