@vertesia/common 0.60.0 → 0.62.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/lib/cjs/index.js +1 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interaction.js +2 -1
- package/lib/cjs/interaction.js.map +1 -1
- package/lib/cjs/json.js +3 -0
- package/lib/cjs/json.js.map +1 -0
- package/lib/cjs/store/workflow.js.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interaction.js +1 -0
- package/lib/esm/interaction.js.map +1 -1
- package/lib/esm/json.js +2 -0
- package/lib/esm/json.js.map +1 -0
- package/lib/esm/store/workflow.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/Progress.d.ts +0 -1
- package/lib/types/access-control.d.ts +0 -1
- package/lib/types/analytics.d.ts +0 -1
- package/lib/types/apikey.d.ts +0 -1
- package/lib/types/common.d.ts +0 -1
- package/lib/types/environment.d.ts +0 -1
- package/lib/types/facets.d.ts +0 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/integrations.d.ts +0 -1
- package/lib/types/interaction.d.ts +39 -1
- package/lib/types/interaction.d.ts.map +1 -1
- package/lib/types/json-schema.d.ts +0 -1
- package/lib/types/json.d.ts +1 -0
- package/lib/types/json.d.ts.map +1 -0
- package/lib/types/meters.d.ts +0 -1
- package/lib/types/payload.d.ts +0 -1
- package/lib/types/plugin.d.ts +29 -2
- package/lib/types/plugin.d.ts.map +1 -1
- package/lib/types/project.d.ts +0 -1
- package/lib/types/prompt.d.ts +0 -1
- package/lib/types/query.d.ts +1 -2
- package/lib/types/refs.d.ts +0 -1
- package/lib/types/runs.d.ts +0 -1
- package/lib/types/store/activity-catalog.d.ts +0 -1
- package/lib/types/store/agent.d.ts +0 -1
- package/lib/types/store/collections.d.ts +1 -1
- package/lib/types/store/collections.d.ts.map +1 -1
- package/lib/types/store/common.d.ts +0 -1
- package/lib/types/store/doc-analyzer.d.ts +0 -1
- package/lib/types/store/dsl-workflow.d.ts +0 -1
- package/lib/types/store/index.d.ts +0 -1
- package/lib/types/store/object-types.d.ts +0 -1
- package/lib/types/store/signals.d.ts +0 -1
- package/lib/types/store/store.d.ts +0 -1
- package/lib/types/store/temporalio.d.ts +0 -1
- package/lib/types/store/workflow.d.ts +20 -7
- package/lib/types/store/workflow.d.ts.map +1 -1
- package/lib/types/tenant.d.ts +0 -1
- package/lib/types/training.d.ts +0 -1
- package/lib/types/transient-tokens.d.ts +0 -1
- package/lib/types/user.d.ts +0 -1
- package/lib/types/utils/auth.d.ts +0 -1
- package/lib/types/utils/schemas.d.ts +0 -1
- package/lib/vertesia-common.js +1 -1
- package/lib/vertesia-common.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/interaction.ts +44 -0
- package/src/json.ts +4 -0
- package/src/plugin.ts +33 -1
- package/src/query.ts +1 -1
- package/src/store/collections.ts +1 -0
- package/src/store/workflow.ts +20 -6
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/store/collections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEhE,oBAAY,gBAAgB;IACxB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACxB;AAED,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC,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WAAW,iBAAkB,SAAQ,UAAU;IACjD,OAAO,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
@@ -142,23 +142,30 @@ interface WorkflowRunEvent {
|
|
142
142
|
event_id: number;
|
143
143
|
event_time: number;
|
144
144
|
event_type: string;
|
145
|
-
task_id
|
145
|
+
task_id?: string;
|
146
146
|
attempt: number;
|
147
147
|
activity?: {
|
148
|
-
name
|
149
|
-
id
|
148
|
+
name?: string;
|
149
|
+
id?: string;
|
150
150
|
input?: any;
|
151
|
+
scheduledEventId?: string;
|
152
|
+
startedEventId?: string;
|
151
153
|
};
|
152
154
|
error?: {
|
153
|
-
message
|
154
|
-
source
|
155
|
-
stacktrace
|
155
|
+
message?: string;
|
156
|
+
source?: string;
|
157
|
+
stacktrace?: string;
|
156
158
|
type?: string;
|
157
159
|
};
|
158
160
|
result?: any;
|
159
161
|
}
|
160
162
|
export interface WorkflowRun {
|
161
163
|
status?: WorkflowExecutionStatus | string;
|
164
|
+
/**
|
165
|
+
* The Temporal Workflow Type of this Workflow Run.
|
166
|
+
*
|
167
|
+
* @see https://docs.temporal.io/workflows
|
168
|
+
*/
|
162
169
|
type?: string;
|
163
170
|
started_at?: number;
|
164
171
|
closed_at?: number;
|
@@ -168,6 +175,13 @@ export interface WorkflowRun {
|
|
168
175
|
initiated_by?: string;
|
169
176
|
result?: any;
|
170
177
|
raw?: any;
|
178
|
+
/**
|
179
|
+
* The Vertesia Workflow Type of this Workflow Run.
|
180
|
+
* - For DSL workflows (`type:dslWorkflow`), the vertesia_type refers to the "Workflow Rule Name" specified in the
|
181
|
+
* DSL. For example, "Standard Document Intake" or "Standard Image Intake".
|
182
|
+
* - For non-DSL workflows, the vertesia_type is the name of the Temporal Workflow Type.
|
183
|
+
*/
|
184
|
+
vertesia_workflow_type?: string;
|
171
185
|
}
|
172
186
|
export interface WorkflowRunWithDetails extends WorkflowRun {
|
173
187
|
history?: WorkflowRunEvent[];
|
@@ -248,4 +262,3 @@ export interface Plan {
|
|
248
262
|
comment?: string;
|
249
263
|
}
|
250
264
|
export {};
|
251
|
-
//# sourceMappingURL=workflow.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../../src/store/workflow.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IACxB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,gBAAgB,qBAAqB;IACrC,MAAM,WAAW;IACjB,iBAAiB,sBAAsB;IACvC,0BAA0B,+BAA+B;IACzD,WAAW,gBAAgB;CAC9B;AAED,MAAM,WAAW,2BAA2B,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAChE;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACH,IAAI,EAAE,CAAC,CAAC;IAER;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE;QACL,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;KACnC,CAAC;IAEF;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B,iEAAiE;IACjE,MAAM,CAAC,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;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AW;IACjB,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,IAAI,SAAS;CAChB;AAED,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,CAAC;CAChE;AAED,MAAM,WAAW,IAAI;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
package/lib/types/tenant.d.ts
CHANGED
package/lib/types/training.d.ts
CHANGED
package/lib/types/user.d.ts
CHANGED
@@ -5,4 +5,3 @@ import { PopulatedPromptSegmentDef, PromptSegmentDef, PromptTemplateRefWithSchem
|
|
5
5
|
export declare function mergeJSONSchemas(schemas: JSONSchema[]): JSONSchema | null;
|
6
6
|
export declare function _mergePromptsSchema(prompts: PromptSegmentDef<PromptTemplateRefWithSchema>[] | PopulatedPromptSegmentDef[]): JSONSchema4 | null;
|
7
7
|
export declare function mergePromptsSchema(interaction: InteractionRefWithSchema | PopulatedInteraction): JSONSchema4 | null;
|
8
|
-
//# sourceMappingURL=schemas.d.ts.map
|
package/lib/vertesia-common.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
var e,t,n,i,r;!function(e){e.int_read="interaction:read",e.int_write="interaction:write",e.int_delete="interaction:delete",e.int_execute="interaction:execute",e.run_read="run:read",e.run_write="run:write",e.env_manage="environment:manage",e.project_manage="project:manage",e.api_key_create="api_key:create",e.api_key_read="api_key:read",e.account_read="account:read",e.account_manage="account:manage",e.manage_billing="account:billing",e.account_member="account:member",e.content_read="content:read",e.content_create="content:create",e.content_update="content:update",e.content_delete="content:delete",e.content_admin="content:admin",e.workflow_run="workflow:run"}(e||(e={})),function(e){e.project="project",e.environment="environment",e.account="account",e.interaction="interaction"}(t||(t={})),function(e){e.public="pk",e.secret="sk"}(n||(n={})),function(e){e.User="user",e.ApiKey="apikey",e.ServiceAccount="service_account"}(i||(i={})),function(e){e.openai="openai",e.azure_openai="azure_openai",e.huggingface_ie="huggingface_ie",e.replicate="replicate",e.bedrock="bedrock",e.vertexai="vertexai",e.togetherai="togetherai",e.mistralai="mistralai",e.groq="groq",e.watsonx="watsonx",e.virtual_lb="virtual_lb",e.virtual_mediator="virtual_mediator",e.test="test"}(r||(r={}));const a={openai:{id:r.openai,name:"OpenAI",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},azure_openai:{id:r.azure_openai,name:"Azure OpenAI",requiresApiKey:!1,requiresEndpointUrl:!0,supportSearch:!1},huggingface_ie:{id:r.huggingface_ie,name:"HuggingFace Inference Endpoint",requiresApiKey:!0,requiresEndpointUrl:!0},replicate:{id:r.replicate,name:"Repicate",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!0},bedrock:{id:r.bedrock,name:"AWS Bedrock",requiresApiKey:!1,requiresEndpointUrl:!1,endpointPlaceholder:"region name (eg. us-east-1)",supportSearch:!1},vertexai:{id:r.vertexai,name:"Google Vertex AI",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},togetherai:{id:r.togetherai,name:"Together AI",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},mistralai:{id:r.mistralai,name:"Mistral AI",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},groq:{id:r.groq,name:"Groq Cloud",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},watsonx:{id:r.watsonx,name:"IBM WatsonX",requiresApiKey:!0,requiresEndpointUrl:!0,supportSearch:!1},virtual_lb:{id:r.virtual_lb,name:"Virtual - Load Balancer",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},virtual_mediator:{id:r.virtual_mediator,name:"Virtual - Mediator",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},test:{id:r.test,name:"Test LLM",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1}},o="id name provider enabled_models default_model endpoint_url allowed_projects account created_at updated_at";var s;!function(e){e.gladia="gladia",e.github="github",e.aws="aws",e.magic_pdf="magic_pdf",e.serper="serper"}(s||(s={}));const c="id name endpoint parent description status version visibility tags updated_at prompts";var u,p,d,l;!function(e){e.draft="draft",e.published="published",e.archived="archived"}(u||(u={})),function(e){e.created="created",e.processing="processing",e.completed="completed",e.failed="failed"}(p||(p={})),function(e){e.STANDARD="STANDARD",e.RESTRICTED="RESTRICTED",e.DEBUG="DEBUG"}(d||(d={})),function(e){e.STANDARD="Run data is stored for both the model inputs and output.",e.RESTRICTED="No run data is stored for the model inputs — only the model output.",e.DEBUG="Run data is stored for the model inputs and output, schema, and final prompt."}(l||(l={}));const _={[d.STANDARD]:l.STANDARD,[d.RESTRICTED]:l.RESTRICTED,[d.DEBUG]:l.DEBUG};var h;!function(e){e.api="api",e.cli="cli",e.ui="ui",e.webhook="webhook",e.test="test-data",e.system="system"}(h||(h={}));const m="-result -parameters -result_schema -prompt";var E,N;!function(e){e.RUN_AND_INTERACTION_CONFIG="RUN_AND_INTERACTION_CONFIG",e.RUN_CONFIG_ONLY="RUN_CONFIG_ONLY",e.INTERACTION_CONFIG_ONLY="INTERACTION_CONFIG_ONLY"}(E||(E={})),function(e){e.RUN_AND_INTERACTION_CONFIG="This run configuration is used. Undefined options are filled with interaction configuration.",e.RUN_CONFIG_ONLY="Only this run configuration is used. Undefined options remain undefined.",e.INTERACTION_CONFIG_ONLY="Only interaction configuration is used."}(N||(N={}));const g={[E.RUN_AND_INTERACTION_CONFIG]:N.RUN_AND_INTERACTION_CONFIG,[E.RUN_CONFIG_ONLY]:N.RUN_CONFIG_ONLY,[E.INTERACTION_CONFIG_ONLY]:N.INTERACTION_CONFIG_ONLY};var T,f,I,O;!function(e){e.analyzed_pages="analyzed_pages",e.extracted_tables="extracted_tables",e.analyzed_images="analyzed_images",e.input_token_used="input_token_used",e.output_token_used="output_token_used",e.task_run="task_run"}(T||(T={}));class A{constructor(e,t,n){this.parent=e,this.parentUnits=t,this.spanUnits=n,this.unitsDone=0}done(e){const t=this.spanUnits-this.unitsDone;t&&((!e||e>t)&&(e=t),this.unitsDone+=e,this.parent.done(e*this.parentUnits/this.spanUnits))}get parentUnitsDone(){return Math.round(this.unitsDone*this.parentUnits/this.spanUnits)}get isDone(){return this.unitsDone>=this.spanUnits}}class D{constructor(e){this.total=e,this.unitsDone=0}get fraction(){return this.unitsDone/this.total}get percent(){return Math.round(100*this.fraction)}get isDone(){return this.unitsDone>=this.total}done(e){const t=this.total-this.unitsDone;t&&((!e||e>t)&&(e=t),this.unitsDone+=e)}span(e,t){return new A(this,e,t||e)}}function b(e,t){switch(t){case f.owner:return!0;case f.admin:return e!==f.billing&&e!==f.owner;case f.developer:return e===f.developer;case f.billing:return e===f.billing;default:return!1}}!function(e){e.owner="owner",e.admin="admin",e.project_admin="project_admin",e.developer="developer",e.application="application",e.executor="executor",e.reader="reader",e.billing="billing",e.member="member"}(f||(f={})),function(e){e.public="public",e.account="account",e.project="project"}(I||(I={})),function(e){e.text="text",e.image="image",e.properties="properties"}(O||(O={}));const U="id name account";var y,R,C,S,v;!function(e){e.draft="draft",e.published="published",e.archived="archived"}(y||(y={})),function(e){e.chat="chat",e.template="template"}(R||(R={})),function(e){e.text="text",e.js="js",e.jst="jst"}(C||(C={})),function(e){e.project="Project",e.environment="Environment",e.user="User",e.account="Account",e.interaction="Interaction"}(S||(S={})),function(e){e.active="active",e.archived="archived"}(v||(v={}));const M="id name description tags created_at updated_at",q={type:"object",description:"Represent a rendition of a file stored in an object. It will be stored as a separate object in the database.",properties:{mime_type:{type:"string",description:"The format of the rendition. This is a MIME type."},source_etag:{type:"string",description:"The ETag of the file used for the rendition.",nullable:!0},height:{type:"integer",description:"The height of the rendition",nullable:!0},width:{type:"integer",description:"The width of the rendition",nullable:!0},multipart:{type:"boolean",description:"If the rendition is a multi-part rendition",nullable:!0,default:!1},total_parts:{type:"integer",description:"The total number of parts in the rendition",nullable:!0}},required:["mime_type"]},w={type:"object",description:"Represent a semantic chunk of a document",properties:{source_etag:{type:"string",description:"The ETag of the file used for the rendition.",nullable:!0},part_number:{type:"integer",description:"The part number of the chunk"},title:{type:"string",description:"The title of the chunk",nullable:!0},source_line_start:{type:"integer",description:"The line number where the chunk starts",nullable:!0},source_line_end:{type:"integer",description:"The line number where the chunk ends",nullable:!0},type:{type:"string",description:"The type of the chunk",enum:["text","image","table","chart","diagram","code","other"],nullable:!0},page_number:{type:"integer",description:"The page number of the document part",nullable:!0},description:{type:"string",description:"The description of the document part, if it's an image, the exhaustive description of the image",nullable:!0},height:{type:"integer",description:"The height of the rendition",nullable:!0},width:{type:"integer",description:"The width of the rendition",nullable:!0}},required:["part_number"]};var k,L,G,x;!function(e){e.created="created",e.processing="processing",e.completed="completed",e.failed="failed",e.archived="archived"}(k||(k={})),function(e){e.single="single",e.multiple="multiple",e.none="none"}(L||(L={})),function(e){e.jpeg="jpeg",e.png="png",e.webp="webp"}(G||(G={})),function(e){e.docx="docx",e.pdf="pdf"}(x||(x={}));const j={TERMINATE:"TERMINATE",ABANDON:"ABANDON",REQUEST_CANCEL:"REQUEST_CANCEL",PARENT_CLOSE_POLICY_UNSPECIFIED:void 0,PARENT_CLOSE_POLICY_TERMINATE:"TERMINATE",PARENT_CLOSE_POLICY_ABANDON:"ABANDON",PARENT_CLOSE_POLICY_REQUEST_CANCEL:"REQUEST_CANCEL"};var P,K,F,B,Y;function z(e){return"objectIds"in e?e.objectIds:[]}!function(e){e.create="create",e.change_type="change_type",e.update="update",e.revision_created="revision_created",e.delete="delete",e.workflow_finished="workflow_finished",e.workflow_execution_request="workflow_execution_request",e.api_request="api_request"}(P||(P={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.RUNNING=1]="RUNNING",e[e.COMPLETED=2]="COMPLETED",e[e.FAILED=3]="FAILED",e[e.CANCELED=4]="CANCELED",e[e.TERMINATED=5]="TERMINATED",e[e.CONTINUED_AS_NEW=6]="CONTINUED_AS_NEW",e[e.TIMED_OUT=7]="TIMED_OUT"}(K||(K={})),function(e){e.SYSTEM="system",e.THOUGHT="thought",e.PLAN="plan",e.UPDATE="update",e.COMPLETE="complete",e.WARNING="warning",e.ERROR="error",e.ANSWER="answer",e.QUESTION="question",e.REQUEST_INPUT="request_input",e.IDLE="idle"}(F||(F={})),function(e){e.created="created",e.building="building",e.prepared="prepared",e.processing="processing",e.completed="completed",e.cancelled="cancelled",e.failed="failed"}(B||(B={})),function(e){e.userInvite="user-invite",e.migration="migration"}(Y||(Y={}));const W="id name email picture";var V,Z;!function(e){e.aws="aws",e.gcp="gcp",e.azure="azure"}(V||(V={})),function(e){e.stripe="stripe",e.invoice="invoice"}(Z||(Z={}));const Q="id name";function H(e,t){return e.slice(-6)+"_"+t.slice(-6)}function X(e){return H(e.account,e.id)}var J,$,ee,te,ne,ie,re,ae,oe;function se(e){const t={};let n=[];for(const i of e)if(i.properties){if(i.required)for(const e of i.required)n.includes(e)||n.push(e);Object.assign(t,i.properties)}return Object.keys(t).length>0?{properties:t,required:n,type:"object"}:null}function ce(e){const t={};let n=[];for(const i of e)if(i.template?.inputSchema?.properties){const e=i.template?.inputSchema;if(e.required)for(const t of e.required)n.includes(t)||n.push(t);Object.assign(t,e.properties)}else i.type===R.chat&&(Object.assign(t,{chat:{type:"array",items:{type:"object",properties:{role:{type:"string",enum:[ee.assistant,ee.user]},content:{type:"string"}},required:["role","content"]}}}),n.push("chat"));return Object.keys(t).length>0?{properties:t,required:n}:null}function ue(e){return e.prompts?ce(e.prompts):null}!function(e){e.max_tokens="max_tokens",e.temperature="temperature",e.top_p="top_p",e.top_k="top_k",e.presence_penalty="presence_penalty",e.frequency_penalty="frequency_penalty",e.stop_sequence="stop_sequence",e.seed="seed",e.number_of_images="number_of_images"}(J||(J={})),function(e){e.numeric="numeric",e.enum="enum",e.boolean="boolean",e.string_list="string_list"}($||($={})),function(e){e.safety="safety",e.system="system",e.user="user",e.assistant="assistant",e.negative="negative",e.mask="mask",e.tool="tool"}(ee||(ee={})),function(e){e.text="text",e.image="image"}(te||(te={})),function(e){e.Available="available",e.Pending="pending",e.Stopped="stopped",e.Unavailable="unavailable",e.Unknown="unknown",e.Legacy="legacy"}(ne||(ne={})),function(e){e.Classifier="classifier",e.Regressor="regressor",e.Clustering="clustering",e.AnomalyDetection="anomaly-detection",e.TimeSeries="time-series",e.Text="text",e.Image="image",e.Audio="audio",e.Video="video",e.Embedding="embedding",e.Chat="chat",e.Code="code",e.NLP="nlp",e.MultiModal="multi-modal",e.Test="test",e.Other="other",e.Unknown="unknown"}(ie||(ie={})),function(e){e.running="running",e.succeeded="succeeded",e.failed="failed",e.cancelled="cancelled"}(re||(re={})),J.max_tokens,$.numeric,J.temperature,$.numeric,J.top_p,$.numeric,J.top_k,$.numeric,J.presence_penalty,$.numeric,J.frequency_penalty,$.numeric,J.stop_sequence,$.string_list,function(e){e.TEXT_IMAGE="TEXT_IMAGE",e.EDIT_MODE_INPAINT_REMOVAL="EDIT_MODE_INPAINT_REMOVAL",e.EDIT_MODE_INPAINT_INSERTION="EDIT_MODE_INPAINT_INSERTION",e.EDIT_MODE_BGSWAP="EDIT_MODE_BGSWAP",e.EDIT_MODE_OUTPAINT="EDIT_MODE_OUTPAINT",e.CUSTOMIZATION_SUBJECT="CUSTOMIZATION_SUBJECT",e.CUSTOMIZATION_STYLE="CUSTOMIZATION_STYLE",e.CUSTOMIZATION_CONTROLLED="CUSTOMIZATION_CONTROLLED",e.CUSTOMIZATION_INSTRUCT="CUSTOMIZATION_INSTRUCT"}(ae||(ae={})),function(e){e.MASK_MODE_USER_PROVIDED="MASK_MODE_USER_PROVIDED",e.MASK_MODE_BACKGROUND="MASK_MODE_BACKGROUND",e.MASK_MODE_FOREGROUND="MASK_MODE_FOREGROUND",e.MASK_MODE_SEMANTIC="MASK_MODE_SEMANTIC"}(oe||(oe={}));export{t as AccessControlledResource,Q as AccountRefPopulate,F as AgentMessageType,n as ApiKeyTypes,Z as BillingMethod,v as CollectionStatus,E as ConfigModes,N as ConfigModesDescription,g as ConfigModesOptions,P as ContentEventName,k as ContentObjectStatus,V as Datacenters,w as DocumentPartSchema,o as ExecutionEnvironmentRefPopulate,m as ExecutionRunRefSelect,p as ExecutionRunStatus,G as ImageRenditionFormat,c as InteractionRefPopulate,u as InteractionStatus,x as MarkdownRenditionFormat,T as MeterNames,j as ParentClosePolicy,e as Permission,i as PrincipalType,D as Progress,U as ProjectRefPopulate,f as ProjectRoles,R as PromptSegmentDefType,y as PromptStatus,q as RenditionSchema,S as ResolvableRefType,I as ResourceVisibility,l as RunDataStorageDescription,d as RunDataStorageLevel,_ as RunDataStorageOptions,h as RunSourceTypes,O as SupportedEmbeddingTypes,s as SupportedIntegrations,r as SupportedProviders,a as SupportedProvidersList,C as TemplateType,B as TrainingSessionStatus,Y as TransientTokenType,W as UserRefPopulate,M as WorkflowDefinitionRefPopulate,K as WorkflowExecutionStatus,L as WorkflowRuleInputType,ce as _mergePromptsSchema,z as getDocumentIds,H as getTenantId,X as getTenantIdFromProject,b as isRoleIncludedIn,se as mergeJSONSchemas,ue as mergePromptsSchema};
|
1
|
+
var e,t,n,i,r;!function(e){e.int_read="interaction:read",e.int_write="interaction:write",e.int_delete="interaction:delete",e.int_execute="interaction:execute",e.run_read="run:read",e.run_write="run:write",e.env_manage="environment:manage",e.project_manage="project:manage",e.api_key_create="api_key:create",e.api_key_read="api_key:read",e.account_read="account:read",e.account_manage="account:manage",e.manage_billing="account:billing",e.account_member="account:member",e.content_read="content:read",e.content_create="content:create",e.content_update="content:update",e.content_delete="content:delete",e.content_admin="content:admin",e.workflow_run="workflow:run"}(e||(e={})),function(e){e.project="project",e.environment="environment",e.account="account",e.interaction="interaction"}(t||(t={})),function(e){e.public="pk",e.secret="sk"}(n||(n={})),function(e){e.User="user",e.ApiKey="apikey",e.ServiceAccount="service_account"}(i||(i={})),function(e){e.openai="openai",e.azure_openai="azure_openai",e.huggingface_ie="huggingface_ie",e.replicate="replicate",e.bedrock="bedrock",e.vertexai="vertexai",e.togetherai="togetherai",e.mistralai="mistralai",e.groq="groq",e.watsonx="watsonx",e.virtual_lb="virtual_lb",e.virtual_mediator="virtual_mediator",e.test="test"}(r||(r={}));const a={openai:{id:r.openai,name:"OpenAI",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},azure_openai:{id:r.azure_openai,name:"Azure OpenAI",requiresApiKey:!1,requiresEndpointUrl:!0,supportSearch:!1},huggingface_ie:{id:r.huggingface_ie,name:"HuggingFace Inference Endpoint",requiresApiKey:!0,requiresEndpointUrl:!0},replicate:{id:r.replicate,name:"Repicate",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!0},bedrock:{id:r.bedrock,name:"AWS Bedrock",requiresApiKey:!1,requiresEndpointUrl:!1,endpointPlaceholder:"region name (eg. us-east-1)",supportSearch:!1},vertexai:{id:r.vertexai,name:"Google Vertex AI",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},togetherai:{id:r.togetherai,name:"Together AI",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},mistralai:{id:r.mistralai,name:"Mistral AI",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},groq:{id:r.groq,name:"Groq Cloud",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},watsonx:{id:r.watsonx,name:"IBM WatsonX",requiresApiKey:!0,requiresEndpointUrl:!0,supportSearch:!1},virtual_lb:{id:r.virtual_lb,name:"Virtual - Load Balancer",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},virtual_mediator:{id:r.virtual_mediator,name:"Virtual - Mediator",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},test:{id:r.test,name:"Test LLM",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1}},o="id name provider enabled_models default_model endpoint_url allowed_projects account created_at updated_at";var s;!function(e){e.gladia="gladia",e.github="github",e.aws="aws",e.magic_pdf="magic_pdf",e.serper="serper"}(s||(s={}));const c="id name endpoint parent description status version visibility tags updated_at prompts",u=`${c} result_schema`;var p,d,l,_;!function(e){e.draft="draft",e.published="published",e.archived="archived"}(p||(p={})),function(e){e.created="created",e.processing="processing",e.completed="completed",e.failed="failed"}(d||(d={})),function(e){e.STANDARD="STANDARD",e.RESTRICTED="RESTRICTED",e.DEBUG="DEBUG"}(l||(l={})),function(e){e.STANDARD="Run data is stored for both the model inputs and output.",e.RESTRICTED="No run data is stored for the model inputs — only the model output.",e.DEBUG="Run data is stored for the model inputs and output, schema, and final prompt."}(_||(_={}));const h={[l.STANDARD]:_.STANDARD,[l.RESTRICTED]:_.RESTRICTED,[l.DEBUG]:_.DEBUG};var m;!function(e){e.api="api",e.cli="cli",e.ui="ui",e.webhook="webhook",e.test="test-data",e.system="system"}(m||(m={}));const E="-result -parameters -result_schema -prompt";var N,g;!function(e){e.RUN_AND_INTERACTION_CONFIG="RUN_AND_INTERACTION_CONFIG",e.RUN_CONFIG_ONLY="RUN_CONFIG_ONLY",e.INTERACTION_CONFIG_ONLY="INTERACTION_CONFIG_ONLY"}(N||(N={})),function(e){e.RUN_AND_INTERACTION_CONFIG="This run configuration is used. Undefined options are filled with interaction configuration.",e.RUN_CONFIG_ONLY="Only this run configuration is used. Undefined options remain undefined.",e.INTERACTION_CONFIG_ONLY="Only interaction configuration is used."}(g||(g={}));const T={[N.RUN_AND_INTERACTION_CONFIG]:g.RUN_AND_INTERACTION_CONFIG,[N.RUN_CONFIG_ONLY]:g.RUN_CONFIG_ONLY,[N.INTERACTION_CONFIG_ONLY]:g.INTERACTION_CONFIG_ONLY};var f,I,O,A;!function(e){e.analyzed_pages="analyzed_pages",e.extracted_tables="extracted_tables",e.analyzed_images="analyzed_images",e.input_token_used="input_token_used",e.output_token_used="output_token_used",e.task_run="task_run"}(f||(f={}));class D{constructor(e,t,n){this.parent=e,this.parentUnits=t,this.spanUnits=n,this.unitsDone=0}done(e){const t=this.spanUnits-this.unitsDone;t&&((!e||e>t)&&(e=t),this.unitsDone+=e,this.parent.done(e*this.parentUnits/this.spanUnits))}get parentUnitsDone(){return Math.round(this.unitsDone*this.parentUnits/this.spanUnits)}get isDone(){return this.unitsDone>=this.spanUnits}}class b{constructor(e){this.total=e,this.unitsDone=0}get fraction(){return this.unitsDone/this.total}get percent(){return Math.round(100*this.fraction)}get isDone(){return this.unitsDone>=this.total}done(e){const t=this.total-this.unitsDone;t&&((!e||e>t)&&(e=t),this.unitsDone+=e)}span(e,t){return new D(this,e,t||e)}}function U(e,t){switch(t){case I.owner:return!0;case I.admin:return e!==I.billing&&e!==I.owner;case I.developer:return e===I.developer;case I.billing:return e===I.billing;default:return!1}}!function(e){e.owner="owner",e.admin="admin",e.project_admin="project_admin",e.developer="developer",e.application="application",e.executor="executor",e.reader="reader",e.billing="billing",e.member="member"}(I||(I={})),function(e){e.public="public",e.account="account",e.project="project"}(O||(O={})),function(e){e.text="text",e.image="image",e.properties="properties"}(A||(A={}));const y="id name account";var R,C,S,v,M;!function(e){e.draft="draft",e.published="published",e.archived="archived"}(R||(R={})),function(e){e.chat="chat",e.template="template"}(C||(C={})),function(e){e.text="text",e.js="js",e.jst="jst"}(S||(S={})),function(e){e.project="Project",e.environment="Environment",e.user="User",e.account="Account",e.interaction="Interaction"}(v||(v={})),function(e){e.active="active",e.archived="archived"}(M||(M={}));const q="id name description tags created_at updated_at",w={type:"object",description:"Represent a rendition of a file stored in an object. It will be stored as a separate object in the database.",properties:{mime_type:{type:"string",description:"The format of the rendition. This is a MIME type."},source_etag:{type:"string",description:"The ETag of the file used for the rendition.",nullable:!0},height:{type:"integer",description:"The height of the rendition",nullable:!0},width:{type:"integer",description:"The width of the rendition",nullable:!0},multipart:{type:"boolean",description:"If the rendition is a multi-part rendition",nullable:!0,default:!1},total_parts:{type:"integer",description:"The total number of parts in the rendition",nullable:!0}},required:["mime_type"]},k={type:"object",description:"Represent a semantic chunk of a document",properties:{source_etag:{type:"string",description:"The ETag of the file used for the rendition.",nullable:!0},part_number:{type:"integer",description:"The part number of the chunk"},title:{type:"string",description:"The title of the chunk",nullable:!0},source_line_start:{type:"integer",description:"The line number where the chunk starts",nullable:!0},source_line_end:{type:"integer",description:"The line number where the chunk ends",nullable:!0},type:{type:"string",description:"The type of the chunk",enum:["text","image","table","chart","diagram","code","other"],nullable:!0},page_number:{type:"integer",description:"The page number of the document part",nullable:!0},description:{type:"string",description:"The description of the document part, if it's an image, the exhaustive description of the image",nullable:!0},height:{type:"integer",description:"The height of the rendition",nullable:!0},width:{type:"integer",description:"The width of the rendition",nullable:!0}},required:["part_number"]};var L,G,x,j;!function(e){e.created="created",e.processing="processing",e.completed="completed",e.failed="failed",e.archived="archived"}(L||(L={})),function(e){e.single="single",e.multiple="multiple",e.none="none"}(G||(G={})),function(e){e.jpeg="jpeg",e.png="png",e.webp="webp"}(x||(x={})),function(e){e.docx="docx",e.pdf="pdf"}(j||(j={}));const P={TERMINATE:"TERMINATE",ABANDON:"ABANDON",REQUEST_CANCEL:"REQUEST_CANCEL",PARENT_CLOSE_POLICY_UNSPECIFIED:void 0,PARENT_CLOSE_POLICY_TERMINATE:"TERMINATE",PARENT_CLOSE_POLICY_ABANDON:"ABANDON",PARENT_CLOSE_POLICY_REQUEST_CANCEL:"REQUEST_CANCEL"};var K,F,B,Y,z;function W(e){return"objectIds"in e?e.objectIds:[]}!function(e){e.create="create",e.change_type="change_type",e.update="update",e.revision_created="revision_created",e.delete="delete",e.workflow_finished="workflow_finished",e.workflow_execution_request="workflow_execution_request",e.api_request="api_request"}(K||(K={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.RUNNING=1]="RUNNING",e[e.COMPLETED=2]="COMPLETED",e[e.FAILED=3]="FAILED",e[e.CANCELED=4]="CANCELED",e[e.TERMINATED=5]="TERMINATED",e[e.CONTINUED_AS_NEW=6]="CONTINUED_AS_NEW",e[e.TIMED_OUT=7]="TIMED_OUT"}(F||(F={})),function(e){e.SYSTEM="system",e.THOUGHT="thought",e.PLAN="plan",e.UPDATE="update",e.COMPLETE="complete",e.WARNING="warning",e.ERROR="error",e.ANSWER="answer",e.QUESTION="question",e.REQUEST_INPUT="request_input",e.IDLE="idle"}(B||(B={})),function(e){e.created="created",e.building="building",e.prepared="prepared",e.processing="processing",e.completed="completed",e.cancelled="cancelled",e.failed="failed"}(Y||(Y={})),function(e){e.userInvite="user-invite",e.migration="migration"}(z||(z={}));const V="id name email picture";var Z,Q;!function(e){e.aws="aws",e.gcp="gcp",e.azure="azure"}(Z||(Z={})),function(e){e.stripe="stripe",e.invoice="invoice"}(Q||(Q={}));const H="id name";function X(e,t){return e.slice(-6)+"_"+t.slice(-6)}function J(e){return X(e.account,e.id)}var $,ee,te,ne,ie,re,ae,oe,se;function ce(e){const t={};let n=[];for(const i of e)if(i.properties){if(i.required)for(const e of i.required)n.includes(e)||n.push(e);Object.assign(t,i.properties)}return Object.keys(t).length>0?{properties:t,required:n,type:"object"}:null}function ue(e){const t={};let n=[];for(const i of e)if(i.template?.inputSchema?.properties){const e=i.template?.inputSchema;if(e.required)for(const t of e.required)n.includes(t)||n.push(t);Object.assign(t,e.properties)}else i.type===C.chat&&(Object.assign(t,{chat:{type:"array",items:{type:"object",properties:{role:{type:"string",enum:[te.assistant,te.user]},content:{type:"string"}},required:["role","content"]}}}),n.push("chat"));return Object.keys(t).length>0?{properties:t,required:n}:null}function pe(e){return e.prompts?ue(e.prompts):null}!function(e){e.max_tokens="max_tokens",e.temperature="temperature",e.top_p="top_p",e.top_k="top_k",e.presence_penalty="presence_penalty",e.frequency_penalty="frequency_penalty",e.stop_sequence="stop_sequence",e.seed="seed",e.number_of_images="number_of_images"}($||($={})),function(e){e.numeric="numeric",e.enum="enum",e.boolean="boolean",e.string_list="string_list"}(ee||(ee={})),function(e){e.safety="safety",e.system="system",e.user="user",e.assistant="assistant",e.negative="negative",e.mask="mask",e.tool="tool"}(te||(te={})),function(e){e.text="text",e.image="image"}(ne||(ne={})),function(e){e.Available="available",e.Pending="pending",e.Stopped="stopped",e.Unavailable="unavailable",e.Unknown="unknown",e.Legacy="legacy"}(ie||(ie={})),function(e){e.Classifier="classifier",e.Regressor="regressor",e.Clustering="clustering",e.AnomalyDetection="anomaly-detection",e.TimeSeries="time-series",e.Text="text",e.Image="image",e.Audio="audio",e.Video="video",e.Embedding="embedding",e.Chat="chat",e.Code="code",e.NLP="nlp",e.MultiModal="multi-modal",e.Test="test",e.Other="other",e.Unknown="unknown"}(re||(re={})),function(e){e.running="running",e.succeeded="succeeded",e.failed="failed",e.cancelled="cancelled"}(ae||(ae={})),$.max_tokens,ee.numeric,$.temperature,ee.numeric,$.top_p,ee.numeric,$.top_k,ee.numeric,$.presence_penalty,ee.numeric,$.frequency_penalty,ee.numeric,$.stop_sequence,ee.string_list,function(e){e.TEXT_IMAGE="TEXT_IMAGE",e.EDIT_MODE_INPAINT_REMOVAL="EDIT_MODE_INPAINT_REMOVAL",e.EDIT_MODE_INPAINT_INSERTION="EDIT_MODE_INPAINT_INSERTION",e.EDIT_MODE_BGSWAP="EDIT_MODE_BGSWAP",e.EDIT_MODE_OUTPAINT="EDIT_MODE_OUTPAINT",e.CUSTOMIZATION_SUBJECT="CUSTOMIZATION_SUBJECT",e.CUSTOMIZATION_STYLE="CUSTOMIZATION_STYLE",e.CUSTOMIZATION_CONTROLLED="CUSTOMIZATION_CONTROLLED",e.CUSTOMIZATION_INSTRUCT="CUSTOMIZATION_INSTRUCT"}(oe||(oe={})),function(e){e.MASK_MODE_USER_PROVIDED="MASK_MODE_USER_PROVIDED",e.MASK_MODE_BACKGROUND="MASK_MODE_BACKGROUND",e.MASK_MODE_FOREGROUND="MASK_MODE_FOREGROUND",e.MASK_MODE_SEMANTIC="MASK_MODE_SEMANTIC"}(se||(se={}));export{t as AccessControlledResource,H as AccountRefPopulate,B as AgentMessageType,n as ApiKeyTypes,Q as BillingMethod,M as CollectionStatus,N as ConfigModes,g as ConfigModesDescription,T as ConfigModesOptions,K as ContentEventName,L as ContentObjectStatus,Z as Datacenters,k as DocumentPartSchema,o as ExecutionEnvironmentRefPopulate,E as ExecutionRunRefSelect,d as ExecutionRunStatus,x as ImageRenditionFormat,c as InteractionRefPopulate,u as InteractionRefWithSchemaPopulate,p as InteractionStatus,j as MarkdownRenditionFormat,f as MeterNames,P as ParentClosePolicy,e as Permission,i as PrincipalType,b as Progress,y as ProjectRefPopulate,I as ProjectRoles,C as PromptSegmentDefType,R as PromptStatus,w as RenditionSchema,v as ResolvableRefType,O as ResourceVisibility,_ as RunDataStorageDescription,l as RunDataStorageLevel,h as RunDataStorageOptions,m as RunSourceTypes,A as SupportedEmbeddingTypes,s as SupportedIntegrations,r as SupportedProviders,a as SupportedProvidersList,S as TemplateType,Y as TrainingSessionStatus,z as TransientTokenType,V as UserRefPopulate,q as WorkflowDefinitionRefPopulate,F as WorkflowExecutionStatus,G as WorkflowRuleInputType,ue as _mergePromptsSchema,W as getDocumentIds,X as getTenantId,J as getTenantIdFromProject,U as isRoleIncludedIn,ce as mergeJSONSchemas,pe as mergePromptsSchema};
|
2
2
|
//# sourceMappingURL=vertesia-common.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vertesia-common.js","sources":["../src/access-control.ts","../src/apikey.ts","../src/environment.ts","../src/integrations.ts","../src/interaction.ts","../src/meters.ts","../src/project.ts","../src/Progress.ts","../src/prompt.ts","../src/refs.ts","../src/store/collections.ts","../src/store/dsl-workflow.ts","../src/store/object-types.ts","../src/store/store.ts","../src/store/temporalio.ts","../src/store/workflow.ts","../src/training.ts","../src/transient-tokens.ts","../src/user.ts","../src/utils/auth.ts","../../../llumiverse/common/lib/esm/types.js","../../../llumiverse/common/lib/esm/options/vertexai.js","../src/utils/schemas.ts","../../../llumiverse/common/lib/esm/options/fallback.js"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"//Common names to share between different models\nexport var SharedOptions;\n(function (SharedOptions) {\n //Text\n SharedOptions[\"max_tokens\"] = \"max_tokens\";\n SharedOptions[\"temperature\"] = \"temperature\";\n SharedOptions[\"top_p\"] = \"top_p\";\n SharedOptions[\"top_k\"] = \"top_k\";\n SharedOptions[\"presence_penalty\"] = \"presence_penalty\";\n SharedOptions[\"frequency_penalty\"] = \"frequency_penalty\";\n SharedOptions[\"stop_sequence\"] = \"stop_sequence\";\n //Image\n SharedOptions[\"seed\"] = \"seed\";\n SharedOptions[\"number_of_images\"] = \"number_of_images\";\n})(SharedOptions || (SharedOptions = {}));\nexport var OptionType;\n(function (OptionType) {\n OptionType[\"numeric\"] = \"numeric\";\n OptionType[\"enum\"] = \"enum\";\n OptionType[\"boolean\"] = \"boolean\";\n OptionType[\"string_list\"] = \"string_list\";\n})(OptionType || (OptionType = {}));\n// ============== Prompts ===============\nexport var PromptRole;\n(function (PromptRole) {\n PromptRole[\"safety\"] = \"safety\";\n PromptRole[\"system\"] = \"system\";\n PromptRole[\"user\"] = \"user\";\n PromptRole[\"assistant\"] = \"assistant\";\n PromptRole[\"negative\"] = \"negative\";\n PromptRole[\"mask\"] = \"mask\";\n /**\n * Used to send the response of a tool\n */\n PromptRole[\"tool\"] = \"tool\";\n})(PromptRole || (PromptRole = {}));\nexport var Modalities;\n(function (Modalities) {\n Modalities[\"text\"] = \"text\";\n Modalities[\"image\"] = \"image\";\n})(Modalities || (Modalities = {}));\nexport var AIModelStatus;\n(function (AIModelStatus) {\n AIModelStatus[\"Available\"] = \"available\";\n AIModelStatus[\"Pending\"] = \"pending\";\n AIModelStatus[\"Stopped\"] = \"stopped\";\n AIModelStatus[\"Unavailable\"] = \"unavailable\";\n AIModelStatus[\"Unknown\"] = \"unknown\";\n AIModelStatus[\"Legacy\"] = \"legacy\";\n})(AIModelStatus || (AIModelStatus = {}));\nexport var ModelType;\n(function (ModelType) {\n ModelType[\"Classifier\"] = \"classifier\";\n ModelType[\"Regressor\"] = \"regressor\";\n ModelType[\"Clustering\"] = \"clustering\";\n ModelType[\"AnomalyDetection\"] = \"anomaly-detection\";\n ModelType[\"TimeSeries\"] = \"time-series\";\n ModelType[\"Text\"] = \"text\";\n ModelType[\"Image\"] = \"image\";\n ModelType[\"Audio\"] = \"audio\";\n ModelType[\"Video\"] = \"video\";\n ModelType[\"Embedding\"] = \"embedding\";\n ModelType[\"Chat\"] = \"chat\";\n ModelType[\"Code\"] = \"code\";\n ModelType[\"NLP\"] = \"nlp\";\n ModelType[\"MultiModal\"] = \"multi-modal\";\n ModelType[\"Test\"] = \"test\";\n ModelType[\"Other\"] = \"other\";\n ModelType[\"Unknown\"] = \"unknown\";\n})(ModelType || (ModelType = {}));\nexport var TrainingJobStatus;\n(function (TrainingJobStatus) {\n TrainingJobStatus[\"running\"] = \"running\";\n TrainingJobStatus[\"succeeded\"] = \"succeeded\";\n TrainingJobStatus[\"failed\"] = \"failed\";\n TrainingJobStatus[\"cancelled\"] = \"cancelled\";\n})(TrainingJobStatus || (TrainingJobStatus = {}));\n//# sourceMappingURL=types.js.map","import { OptionType, SharedOptions } from \"../types.js\";\nimport { textOptionsFallback } from \"./fallback.js\";\nexport var ImagenTaskType;\n(function (ImagenTaskType) {\n ImagenTaskType[\"TEXT_IMAGE\"] = \"TEXT_IMAGE\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_REMOVAL\"] = \"EDIT_MODE_INPAINT_REMOVAL\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_INSERTION\"] = \"EDIT_MODE_INPAINT_INSERTION\";\n ImagenTaskType[\"EDIT_MODE_BGSWAP\"] = \"EDIT_MODE_BGSWAP\";\n ImagenTaskType[\"EDIT_MODE_OUTPAINT\"] = \"EDIT_MODE_OUTPAINT\";\n ImagenTaskType[\"CUSTOMIZATION_SUBJECT\"] = \"CUSTOMIZATION_SUBJECT\";\n ImagenTaskType[\"CUSTOMIZATION_STYLE\"] = \"CUSTOMIZATION_STYLE\";\n ImagenTaskType[\"CUSTOMIZATION_CONTROLLED\"] = \"CUSTOMIZATION_CONTROLLED\";\n ImagenTaskType[\"CUSTOMIZATION_INSTRUCT\"] = \"CUSTOMIZATION_INSTRUCT\";\n})(ImagenTaskType || (ImagenTaskType = {}));\nexport var ImagenMaskMode;\n(function (ImagenMaskMode) {\n ImagenMaskMode[\"MASK_MODE_USER_PROVIDED\"] = \"MASK_MODE_USER_PROVIDED\";\n ImagenMaskMode[\"MASK_MODE_BACKGROUND\"] = \"MASK_MODE_BACKGROUND\";\n ImagenMaskMode[\"MASK_MODE_FOREGROUND\"] = \"MASK_MODE_FOREGROUND\";\n ImagenMaskMode[\"MASK_MODE_SEMANTIC\"] = \"MASK_MODE_SEMANTIC\";\n})(ImagenMaskMode || (ImagenMaskMode = {}));\nexport function getVertexAiOptions(model, option) {\n if (model.includes(\"imagen-3.0\")) {\n const commonOptions = [\n {\n name: SharedOptions.number_of_images, type: OptionType.numeric, min: 1, max: 4, default: 1,\n integer: true, description: \"Number of Images to generate\",\n },\n {\n name: SharedOptions.seed, type: OptionType.numeric, min: 0, max: 4294967295, default: 12,\n integer: true, description: \"The seed of the generated image\"\n },\n {\n name: \"person_generation\", type: OptionType.enum, enum: { \"Disallow the inclusion of people or faces in images\": \"dont_allow\", \"Allow generation of adults only\": \"allow_adult\", \"Allow generation of people of all ages\": \"allow_all\" },\n default: \"allow_adult\", description: \"The safety setting for allowing the generation of people in the image\"\n },\n {\n name: \"safety_setting\", type: OptionType.enum, enum: { \"Block very few problematic prompts and responses\": \"block_none\", \"Block only few problematic prompts and responses\": \"block_only_high\", \"Block some problematic prompts and responses\": \"block_medium_and_above\", \"Strictest filtering\": \"block_low_and_above\" },\n default: \"block_medium_and_above\", description: \"The overall safety setting\"\n },\n ];\n const outputOptions = [\n {\n name: \"image_file_type\", type: OptionType.enum, enum: { \"JPEG\": \"image/jpeg\", \"PNG\": \"image/png\" },\n default: \"image/png\", description: \"The file type of the generated image\",\n refresh: true,\n },\n ];\n const jpegQuality = {\n name: \"jpeg_compression_quality\", type: OptionType.numeric, min: 0, max: 100, default: 75,\n integer: true, description: \"The compression quality of the JPEG image\",\n };\n if (option?.image_file_type === \"image/jpeg\") {\n outputOptions.push(jpegQuality);\n }\n if (model.includes(\"generate\")) {\n //Generate models\n const modeOptions = [\n {\n name: \"aspect_ratio\", type: OptionType.enum, enum: { \"1:1\": \"1:1\", \"4:3\": \"4:3\", \"3:4\": \"3:4\", \"16:9\": \"16:9\", \"9:16\": \"9:16\" },\n default: \"1:1\", description: \"The aspect ratio of the generated image\"\n },\n {\n name: \"add_watermark\", type: OptionType.boolean, default: false, description: \"Add an invisible watermark to the generated image, useful for detection of AI images\"\n },\n ];\n const enhanceOptions = !model.includes(\"generate-001\") ? [\n {\n name: \"enhance_prompt\", type: OptionType.boolean, default: true, description: \"VertexAI automatically rewrites the prompt to better reflect the prompt's intent.\"\n },\n ] : [];\n return {\n _option_id: \"vertexai-imagen\",\n options: [\n ...commonOptions,\n ...modeOptions,\n ...outputOptions,\n ...enhanceOptions,\n ]\n };\n }\n if (model.includes(\"capability\")) {\n //Edit models\n let guidanceScaleDefault = 75;\n if (option?.edit_mode === ImagenTaskType.EDIT_MODE_INPAINT_INSERTION) {\n guidanceScaleDefault = 60;\n }\n const modeOptions = [\n {\n name: \"edit_mode\", type: OptionType.enum,\n enum: {\n \"EDIT_MODE_INPAINT_REMOVAL\": \"EDIT_MODE_INPAINT_REMOVAL\",\n \"EDIT_MODE_INPAINT_INSERTION\": \"EDIT_MODE_INPAINT_INSERTION\",\n \"EDIT_MODE_BGSWAP\": \"EDIT_MODE_BGSWAP\",\n \"EDIT_MODE_OUTPAINT\": \"EDIT_MODE_OUTPAINT\",\n \"CUSTOMIZATION_SUBJECT\": \"CUSTOMIZATION_SUBJECT\",\n \"CUSTOMIZATION_STYLE\": \"CUSTOMIZATION_STYLE\",\n \"CUSTOMIZATION_CONTROLLED\": \"CUSTOMIZATION_CONTROLLED\",\n \"CUSTOMIZATION_INSTRUCT\": \"CUSTOMIZATION_INSTRUCT\",\n },\n description: \"The editing mode. CUSTOMIZATION options use few-shot learning to generate images based on a few examples.\"\n },\n {\n name: \"guidance_scale\", type: OptionType.numeric, min: 0, max: 500, default: guidanceScaleDefault,\n integer: true, description: \"How closely the generation follows the prompt\"\n }\n ];\n const maskOptions = (option?.edit_mode?.includes(\"EDIT\")) ? [\n {\n name: \"mask_mode\", type: OptionType.enum,\n enum: {\n \"MASK_MODE_USER_PROVIDED\": \"MASK_MODE_USER_PROVIDED\",\n \"MASK_MODE_BACKGROUND\": \"MASK_MODE_BACKGROUND\",\n \"MASK_MODE_FOREGROUND\": \"MASK_MODE_FOREGROUND\",\n \"MASK_MODE_SEMANTIC\": \"MASK_MODE_SEMANTIC\",\n },\n default: \"MASK_MODE_USER_PROVIDED\",\n description: \"How should the mask for the generation be provided\"\n },\n {\n name: \"mask_dilation\", type: OptionType.numeric, min: 0, max: 1,\n integer: true, description: \"The mask dilation, grows the mask by a percentage of image width to compensate for imprecise masks.\"\n },\n ] : [];\n const maskClassOptions = (option?.mask_mode === ImagenMaskMode.MASK_MODE_SEMANTIC) ? [\n {\n name: \"mask_class\", type: OptionType.string_list, default: [],\n description: \"Input Class IDs. Create a mask based on image class, based on https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api-customization#segment-ids\"\n }\n ] : [];\n const editOptions = option?.edit_mode?.includes(\"EDIT\") ? [\n {\n name: \"edit_steps\", type: OptionType.numeric, default: 75,\n integer: true, description: \"The number of steps for the base image generation, more steps means more time and better quality\"\n },\n ] : [];\n const customizationOptions = option?.edit_mode === ImagenTaskType.CUSTOMIZATION_CONTROLLED\n || option?.edit_mode === ImagenTaskType.CUSTOMIZATION_SUBJECT ? [\n {\n name: \"controlType\", type: OptionType.enum, enum: { \"Face Mesh\": \"CONTROL_TYPE_FACE_MESH\", \"Canny\": \"CONTROL_TYPE_CANNY\", \"Scribble\": \"CONTROL_TYPE_SCRIBBLE\" },\n default: \"CONTROL_TYPE_CANNY\", description: \"Method used to generate the control image\"\n },\n {\n name: \"controlImageComputation\", type: OptionType.boolean, default: true, description: \"Should the control image be computed from the input image, or is it provided\"\n }\n ] : [];\n return {\n _option_id: \"vertexai-imagen\",\n options: [\n ...modeOptions,\n ...commonOptions,\n ...maskOptions,\n ...maskClassOptions,\n ...editOptions,\n ...customizationOptions,\n ...outputOptions,\n ]\n };\n }\n }\n else if (model.includes(\"gemini\")) {\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = [\"max_tokens\", \"presence_penalty\"];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n if (model.includes(\"1.5\")) {\n commonOptions = commonOptions.filter((option) => option.name !== \"frequency_penalty\");\n }\n const max_tokens = [{\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1, max: max_tokens_limit,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n }];\n return {\n _option_id: \"text-fallback\",\n options: [\n ...max_tokens,\n ...commonOptions,\n ]\n };\n }\n else if (model.includes(\"claude\")) {\n const max_tokens_limit = getClaudeMaxTokensLimit(model, option);\n const excludeOptions = [\"max_tokens\", \"presence_penalty\", \"frequency_penalty\"];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [{\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1, max: max_tokens_limit,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n }];\n if (model.includes(\"-3-7\") || model.includes(\"-4\")) {\n const claudeModeOptions = [\n {\n name: \"thinking_mode\",\n type: OptionType.boolean,\n default: false,\n description: \"If true, use the extended reasoning mode\"\n },\n ];\n const claudeThinkingOptions = option?.thinking_mode ? [\n {\n name: \"thinking_budget_tokens\",\n type: OptionType.numeric,\n min: 1024,\n default: 4000,\n integer: true,\n step: 100,\n description: \"The target number of tokens to use for reasoning, not a hard limit.\"\n },\n ] : [];\n return {\n _option_id: \"vertexai-claude\",\n options: [\n ...max_tokens,\n ...commonOptions,\n ...claudeModeOptions,\n ...claudeThinkingOptions,\n ]\n };\n }\n return {\n _option_id: \"vertexai-claude\",\n options: [\n ...max_tokens,\n ...commonOptions,\n ]\n };\n }\n return textOptionsFallback;\n}\nfunction getGeminiMaxTokensLimit(model) {\n if (model.includes(\"thinking\") || model.includes(\"-2.5-\")) {\n return 65536;\n }\n if (model.includes(\"ultra\") || model.includes(\"vision\")) {\n return 2048;\n }\n return 8192;\n}\nfunction getClaudeMaxTokensLimit(model, option) {\n if (model.includes(\"-4-\")) {\n if (model.includes(\"opus-\")) {\n return 32768;\n }\n return 65536;\n }\n else if (model.includes(\"-3-7-\")) {\n if (option && option?.thinking_mode) {\n return 131072;\n }\n else {\n return 8192;\n }\n }\n else if (model.includes(\"-3-5-\")) {\n return 8192;\n }\n else {\n return 4096;\n }\n}\n//# sourceMappingURL=vertexai.js.map",null,"import { OptionType, SharedOptions } from \"../types.js\";\nexport const textOptionsFallback = {\n _option_id: \"text-fallback\",\n options: [\n {\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n },\n {\n name: SharedOptions.temperature, type: OptionType.numeric, min: 0.0, default: 0.7,\n integer: false, step: 0.1, description: \"A higher temperature biases toward less likely tokens, making the model more creative\"\n },\n {\n name: SharedOptions.top_p, type: OptionType.numeric, min: 0, max: 1,\n integer: false, step: 0.1, description: \"Limits token sampling to the cumulative probability of the top p tokens\"\n },\n {\n name: SharedOptions.top_k, type: OptionType.numeric, min: 1,\n integer: true, step: 1, description: \"Limits token sampling to the top k tokens\"\n },\n {\n name: SharedOptions.presence_penalty, type: OptionType.numeric, min: -2.0, max: 2.0,\n integer: false, step: 0.1, description: \"Penalise tokens if they appear at least once in the text\"\n },\n {\n name: SharedOptions.frequency_penalty, type: OptionType.numeric, min: -2.0, max: 2.0,\n integer: false, step: 0.1, description: \"Penalise tokens based on their frequency in the text\"\n },\n { name: SharedOptions.stop_sequence, type: OptionType.string_list, value: [], description: \"The generation will halt if one of the stop sequences is output\" },\n ]\n};\n//# sourceMappingURL=fallback.js.map"],"names":["Permission","AccessControlledResource","ApiKeyTypes","PrincipalType","SupportedProviders","SupportedProvidersList","openai","id","name","requiresApiKey","requiresEndpointUrl","supportSearch","azure_openai","huggingface_ie","replicate","bedrock","endpointPlaceholder","vertexai","togetherai","mistralai","groq","watsonx","virtual_lb","virtual_mediator","test","ExecutionEnvironmentRefPopulate","SupportedIntegrations","InteractionRefPopulate","InteractionStatus","ExecutionRunStatus","RunDataStorageLevel","RunDataStorageDescription","RunDataStorageOptions","STANDARD","RESTRICTED","DEBUG","RunSourceTypes","ExecutionRunRefSelect","ConfigModes","ConfigModesDescription","ConfigModesOptions","RUN_AND_INTERACTION_CONFIG","RUN_CONFIG_ONLY","INTERACTION_CONFIG_ONLY","MeterNames","ProjectRoles","ResourceVisibility","SupportedEmbeddingTypes","ProgressSpan","constructor","parent","parentUnits","spanUnits","this","unitsDone","done","units","remaining","parentUnitsDone","Math","round","isDone","Progress","total","fraction","percent","span","isRoleIncludedIn","role","includingRole","owner","admin","billing","developer","ProjectRefPopulate","PromptStatus","PromptSegmentDefType","TemplateType","ResolvableRefType","CollectionStatus","WorkflowDefinitionRefPopulate","RenditionSchema","type","description","properties","mime_type","source_etag","nullable","height","width","multipart","default","total_parts","required","DocumentPartSchema","part_number","title","source_line_start","source_line_end","enum","page_number","ContentObjectStatus","WorkflowRuleInputType","ImageRenditionFormat","MarkdownRenditionFormat","ParentClosePolicy","TERMINATE","ABANDON","REQUEST_CANCEL","PARENT_CLOSE_POLICY_UNSPECIFIED","undefined","PARENT_CLOSE_POLICY_TERMINATE","PARENT_CLOSE_POLICY_ABANDON","PARENT_CLOSE_POLICY_REQUEST_CANCEL","ContentEventName","WorkflowExecutionStatus","AgentMessageType","TrainingSessionStatus","TransientTokenType","getDocumentIds","payload","objectIds","UserRefPopulate","Datacenters","BillingMethod","AccountRefPopulate","getTenantId","accountId","projectId","slice","getTenantIdFromProject","project","account","SharedOptions","OptionType","PromptRole","Modalities","AIModelStatus","ModelType","TrainingJobStatus","ImagenTaskType","ImagenMaskMode","mergeJSONSchemas","schemas","props","schema","prop","includes","push","Object","assign","keys","length","_mergePromptsSchema","prompts","prompt","template","inputSchema","chat","items","assistant","user","content","mergePromptsSchema","interaction","max_tokens","numeric","temperature","top_p","top_k","presence_penalty","frequency_penalty","stop_sequence","string_list"],"mappings":"IAQYA,EAgCAC,ECpCAC,EA2DAC,EC5DAC,GFKZ,SAAYJ,GACRA,EAAA,SAAA,mBACAA,EAAA,UAAA,oBACAA,EAAA,WAAA,qBAEAA,EAAA,YAAA,sBACAA,EAAA,SAAA,WACAA,EAAA,UAAA,YAEAA,EAAA,WAAA,qBAEAA,EAAA,eAAA,iBAEAA,EAAA,eAAA,iBACAA,EAAA,aAAA,eAEAA,EAAA,aAAA,eACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,kBACAA,EAAA,eAAA,iBAGAA,EAAA,aAAA,eACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBAEAA,EAAA,cAAA,gBAEAA,EAAA,aAAA,cACH,CA9BD,CAAYA,IAAAA,EA8BX,CAAA,IAED,SAAYC,GACRA,EAAA,QAAA,UACAA,EAAA,YAAA,cACAA,EAAA,QAAA,UACAA,EAAA,YAAA,aACH,CALD,CAAYA,IAAAA,EAKX,CAAA,ICzCD,SAAYC,GACRA,EAAA,OAAA,KACAA,EAAA,OAAA,IACH,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAwDD,SAAYC,GACRA,EAAA,KAAA,OACAA,EAAA,OAAA,SACAA,EAAA,eAAA,iBACH,CAJD,CAAYA,IAAAA,EAIX,CAAA,IChED,SAAYC,GAERA,EAAA,OAAA,SACAA,EAAA,aAAA,eACAA,EAAA,eAAA,iBACAA,EAAA,UAAA,YACAA,EAAA,QAAA,UACAA,EAAA,SAAA,WACAA,EAAA,WAAA,aACAA,EAAA,UAAA,YACAA,EAAA,KAAA,OACAA,EAAA,QAAA,UAEAA,EAAA,WAAA,aACAA,EAAA,iBAAA,mBACAA,EAAA,KAAA,MACH,CAh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,EAA0C,0BAAI,4BAC9CA,EAA4C,4BAAI,8BAChDA,EAAiC,iBAAI,mBACrCA,EAAmC,mBAAI,qBACvCA,EAAsC,sBAAI,wBAC1CA,EAAoC,oBAAI,sBACxCA,EAAyC,yBAAI,2BAC7CA,EAAuC,uBAAI,wBAC9C,CAVD,CAUGA,KAAmBA,GAAiB,CAAA,IAEvC,SAAWC,GACPA,EAAwC,wBAAI,0BAC5CA,EAAqC,qBAAI,uBACzCA,EAAqC,qBAAI,uBACzCA,EAAmC,mBAAI,oBAC1C,CALD,CAKGA,KAAmBA,GAAiB,CAAA"}
|
1
|
+
{"version":3,"file":"vertesia-common.js","sources":["../src/access-control.ts","../src/apikey.ts","../src/environment.ts","../src/integrations.ts","../src/interaction.ts","../src/meters.ts","../src/project.ts","../src/Progress.ts","../src/prompt.ts","../src/refs.ts","../src/store/collections.ts","../src/store/dsl-workflow.ts","../src/store/object-types.ts","../src/store/store.ts","../src/store/temporalio.ts","../src/store/workflow.ts","../src/training.ts","../src/transient-tokens.ts","../src/user.ts","../src/utils/auth.ts","../../../llumiverse/common/lib/esm/types.js","../../../llumiverse/common/lib/esm/options/vertexai.js","../src/utils/schemas.ts","../../../llumiverse/common/lib/esm/options/fallback.js"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"//Common names to share between different models\nexport var SharedOptions;\n(function (SharedOptions) {\n //Text\n SharedOptions[\"max_tokens\"] = \"max_tokens\";\n SharedOptions[\"temperature\"] = \"temperature\";\n SharedOptions[\"top_p\"] = \"top_p\";\n SharedOptions[\"top_k\"] = \"top_k\";\n SharedOptions[\"presence_penalty\"] = \"presence_penalty\";\n SharedOptions[\"frequency_penalty\"] = \"frequency_penalty\";\n SharedOptions[\"stop_sequence\"] = \"stop_sequence\";\n //Image\n SharedOptions[\"seed\"] = \"seed\";\n SharedOptions[\"number_of_images\"] = \"number_of_images\";\n})(SharedOptions || (SharedOptions = {}));\nexport var OptionType;\n(function (OptionType) {\n OptionType[\"numeric\"] = \"numeric\";\n OptionType[\"enum\"] = \"enum\";\n OptionType[\"boolean\"] = \"boolean\";\n OptionType[\"string_list\"] = \"string_list\";\n})(OptionType || (OptionType = {}));\n// ============== Prompts ===============\nexport var PromptRole;\n(function (PromptRole) {\n PromptRole[\"safety\"] = \"safety\";\n PromptRole[\"system\"] = \"system\";\n PromptRole[\"user\"] = \"user\";\n PromptRole[\"assistant\"] = \"assistant\";\n PromptRole[\"negative\"] = \"negative\";\n PromptRole[\"mask\"] = \"mask\";\n /**\n * Used to send the response of a tool\n */\n PromptRole[\"tool\"] = \"tool\";\n})(PromptRole || (PromptRole = {}));\nexport var Modalities;\n(function (Modalities) {\n Modalities[\"text\"] = \"text\";\n Modalities[\"image\"] = \"image\";\n})(Modalities || (Modalities = {}));\nexport var AIModelStatus;\n(function (AIModelStatus) {\n AIModelStatus[\"Available\"] = \"available\";\n AIModelStatus[\"Pending\"] = \"pending\";\n AIModelStatus[\"Stopped\"] = \"stopped\";\n AIModelStatus[\"Unavailable\"] = \"unavailable\";\n AIModelStatus[\"Unknown\"] = \"unknown\";\n AIModelStatus[\"Legacy\"] = \"legacy\";\n})(AIModelStatus || (AIModelStatus = {}));\nexport var ModelType;\n(function (ModelType) {\n ModelType[\"Classifier\"] = \"classifier\";\n ModelType[\"Regressor\"] = \"regressor\";\n ModelType[\"Clustering\"] = \"clustering\";\n ModelType[\"AnomalyDetection\"] = \"anomaly-detection\";\n ModelType[\"TimeSeries\"] = \"time-series\";\n ModelType[\"Text\"] = \"text\";\n ModelType[\"Image\"] = \"image\";\n ModelType[\"Audio\"] = \"audio\";\n ModelType[\"Video\"] = \"video\";\n ModelType[\"Embedding\"] = \"embedding\";\n ModelType[\"Chat\"] = \"chat\";\n ModelType[\"Code\"] = \"code\";\n ModelType[\"NLP\"] = \"nlp\";\n ModelType[\"MultiModal\"] = \"multi-modal\";\n ModelType[\"Test\"] = \"test\";\n ModelType[\"Other\"] = \"other\";\n ModelType[\"Unknown\"] = \"unknown\";\n})(ModelType || (ModelType = {}));\nexport var TrainingJobStatus;\n(function (TrainingJobStatus) {\n TrainingJobStatus[\"running\"] = \"running\";\n TrainingJobStatus[\"succeeded\"] = \"succeeded\";\n TrainingJobStatus[\"failed\"] = \"failed\";\n TrainingJobStatus[\"cancelled\"] = \"cancelled\";\n})(TrainingJobStatus || (TrainingJobStatus = {}));\n//# sourceMappingURL=types.js.map","import { OptionType, SharedOptions } from \"../types.js\";\nimport { textOptionsFallback } from \"./fallback.js\";\nexport var ImagenTaskType;\n(function (ImagenTaskType) {\n ImagenTaskType[\"TEXT_IMAGE\"] = \"TEXT_IMAGE\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_REMOVAL\"] = \"EDIT_MODE_INPAINT_REMOVAL\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_INSERTION\"] = \"EDIT_MODE_INPAINT_INSERTION\";\n ImagenTaskType[\"EDIT_MODE_BGSWAP\"] = \"EDIT_MODE_BGSWAP\";\n ImagenTaskType[\"EDIT_MODE_OUTPAINT\"] = \"EDIT_MODE_OUTPAINT\";\n ImagenTaskType[\"CUSTOMIZATION_SUBJECT\"] = \"CUSTOMIZATION_SUBJECT\";\n ImagenTaskType[\"CUSTOMIZATION_STYLE\"] = \"CUSTOMIZATION_STYLE\";\n ImagenTaskType[\"CUSTOMIZATION_CONTROLLED\"] = \"CUSTOMIZATION_CONTROLLED\";\n ImagenTaskType[\"CUSTOMIZATION_INSTRUCT\"] = \"CUSTOMIZATION_INSTRUCT\";\n})(ImagenTaskType || (ImagenTaskType = {}));\nexport var ImagenMaskMode;\n(function (ImagenMaskMode) {\n ImagenMaskMode[\"MASK_MODE_USER_PROVIDED\"] = \"MASK_MODE_USER_PROVIDED\";\n ImagenMaskMode[\"MASK_MODE_BACKGROUND\"] = \"MASK_MODE_BACKGROUND\";\n ImagenMaskMode[\"MASK_MODE_FOREGROUND\"] = \"MASK_MODE_FOREGROUND\";\n ImagenMaskMode[\"MASK_MODE_SEMANTIC\"] = \"MASK_MODE_SEMANTIC\";\n})(ImagenMaskMode || (ImagenMaskMode = {}));\nexport function getVertexAiOptions(model, option) {\n if (model.includes(\"imagen-3.0\")) {\n const commonOptions = [\n {\n name: SharedOptions.number_of_images, type: OptionType.numeric, min: 1, max: 4, default: 1,\n integer: true, description: \"Number of Images to generate\",\n },\n {\n name: SharedOptions.seed, type: OptionType.numeric, min: 0, max: 4294967295, default: 12,\n integer: true, description: \"The seed of the generated image\"\n },\n {\n name: \"person_generation\", type: OptionType.enum, enum: { \"Disallow the inclusion of people or faces in images\": \"dont_allow\", \"Allow generation of adults only\": \"allow_adult\", \"Allow generation of people of all ages\": \"allow_all\" },\n default: \"allow_adult\", description: \"The safety setting for allowing the generation of people in the image\"\n },\n {\n name: \"safety_setting\", type: OptionType.enum, enum: { \"Block very few problematic prompts and responses\": \"block_none\", \"Block only few problematic prompts and responses\": \"block_only_high\", \"Block some problematic prompts and responses\": \"block_medium_and_above\", \"Strictest filtering\": \"block_low_and_above\" },\n default: \"block_medium_and_above\", description: \"The overall safety setting\"\n },\n ];\n const outputOptions = [\n {\n name: \"image_file_type\", type: OptionType.enum, enum: { \"JPEG\": \"image/jpeg\", \"PNG\": \"image/png\" },\n default: \"image/png\", description: \"The file type of the generated image\",\n refresh: true,\n },\n ];\n const jpegQuality = {\n name: \"jpeg_compression_quality\", type: OptionType.numeric, min: 0, max: 100, default: 75,\n integer: true, description: \"The compression quality of the JPEG image\",\n };\n if (option?.image_file_type === \"image/jpeg\") {\n outputOptions.push(jpegQuality);\n }\n if (model.includes(\"generate\")) {\n //Generate models\n const modeOptions = [\n {\n name: \"aspect_ratio\", type: OptionType.enum, enum: { \"1:1\": \"1:1\", \"4:3\": \"4:3\", \"3:4\": \"3:4\", \"16:9\": \"16:9\", \"9:16\": \"9:16\" },\n default: \"1:1\", description: \"The aspect ratio of the generated image\"\n },\n {\n name: \"add_watermark\", type: OptionType.boolean, default: false, description: \"Add an invisible watermark to the generated image, useful for detection of AI images\"\n },\n ];\n const enhanceOptions = !model.includes(\"generate-001\") ? [\n {\n name: \"enhance_prompt\", type: OptionType.boolean, default: true, description: \"VertexAI automatically rewrites the prompt to better reflect the prompt's intent.\"\n },\n ] : [];\n return {\n _option_id: \"vertexai-imagen\",\n options: [\n ...commonOptions,\n ...modeOptions,\n ...outputOptions,\n ...enhanceOptions,\n ]\n };\n }\n if (model.includes(\"capability\")) {\n //Edit models\n let guidanceScaleDefault = 75;\n if (option?.edit_mode === ImagenTaskType.EDIT_MODE_INPAINT_INSERTION) {\n guidanceScaleDefault = 60;\n }\n const modeOptions = [\n {\n name: \"edit_mode\", type: OptionType.enum,\n enum: {\n \"EDIT_MODE_INPAINT_REMOVAL\": \"EDIT_MODE_INPAINT_REMOVAL\",\n \"EDIT_MODE_INPAINT_INSERTION\": \"EDIT_MODE_INPAINT_INSERTION\",\n \"EDIT_MODE_BGSWAP\": \"EDIT_MODE_BGSWAP\",\n \"EDIT_MODE_OUTPAINT\": \"EDIT_MODE_OUTPAINT\",\n \"CUSTOMIZATION_SUBJECT\": \"CUSTOMIZATION_SUBJECT\",\n \"CUSTOMIZATION_STYLE\": \"CUSTOMIZATION_STYLE\",\n \"CUSTOMIZATION_CONTROLLED\": \"CUSTOMIZATION_CONTROLLED\",\n \"CUSTOMIZATION_INSTRUCT\": \"CUSTOMIZATION_INSTRUCT\",\n },\n description: \"The editing mode. CUSTOMIZATION options use few-shot learning to generate images based on a few examples.\"\n },\n {\n name: \"guidance_scale\", type: OptionType.numeric, min: 0, max: 500, default: guidanceScaleDefault,\n integer: true, description: \"How closely the generation follows the prompt\"\n }\n ];\n const maskOptions = (option?.edit_mode?.includes(\"EDIT\")) ? [\n {\n name: \"mask_mode\", type: OptionType.enum,\n enum: {\n \"MASK_MODE_USER_PROVIDED\": \"MASK_MODE_USER_PROVIDED\",\n \"MASK_MODE_BACKGROUND\": \"MASK_MODE_BACKGROUND\",\n \"MASK_MODE_FOREGROUND\": \"MASK_MODE_FOREGROUND\",\n \"MASK_MODE_SEMANTIC\": \"MASK_MODE_SEMANTIC\",\n },\n default: \"MASK_MODE_USER_PROVIDED\",\n description: \"How should the mask for the generation be provided\"\n },\n {\n name: \"mask_dilation\", type: OptionType.numeric, min: 0, max: 1,\n integer: true, description: \"The mask dilation, grows the mask by a percentage of image width to compensate for imprecise masks.\"\n },\n ] : [];\n const maskClassOptions = (option?.mask_mode === ImagenMaskMode.MASK_MODE_SEMANTIC) ? [\n {\n name: \"mask_class\", type: OptionType.string_list, default: [],\n description: \"Input Class IDs. Create a mask based on image class, based on https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api-customization#segment-ids\"\n }\n ] : [];\n const editOptions = option?.edit_mode?.includes(\"EDIT\") ? [\n {\n name: \"edit_steps\", type: OptionType.numeric, default: 75,\n integer: true, description: \"The number of steps for the base image generation, more steps means more time and better quality\"\n },\n ] : [];\n const customizationOptions = option?.edit_mode === ImagenTaskType.CUSTOMIZATION_CONTROLLED\n || option?.edit_mode === ImagenTaskType.CUSTOMIZATION_SUBJECT ? [\n {\n name: \"controlType\", type: OptionType.enum, enum: { \"Face Mesh\": \"CONTROL_TYPE_FACE_MESH\", \"Canny\": \"CONTROL_TYPE_CANNY\", \"Scribble\": \"CONTROL_TYPE_SCRIBBLE\" },\n default: \"CONTROL_TYPE_CANNY\", description: \"Method used to generate the control image\"\n },\n {\n name: \"controlImageComputation\", type: OptionType.boolean, default: true, description: \"Should the control image be computed from the input image, or is it provided\"\n }\n ] : [];\n return {\n _option_id: \"vertexai-imagen\",\n options: [\n ...modeOptions,\n ...commonOptions,\n ...maskOptions,\n ...maskClassOptions,\n ...editOptions,\n ...customizationOptions,\n ...outputOptions,\n ]\n };\n }\n }\n else if (model.includes(\"gemini\")) {\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = [\"max_tokens\", \"presence_penalty\"];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n if (model.includes(\"1.5\")) {\n commonOptions = commonOptions.filter((option) => option.name !== \"frequency_penalty\");\n }\n const max_tokens = [{\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1, max: max_tokens_limit,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n }];\n return {\n _option_id: \"text-fallback\",\n options: [\n ...max_tokens,\n ...commonOptions,\n ]\n };\n }\n else if (model.includes(\"claude\")) {\n const max_tokens_limit = getClaudeMaxTokensLimit(model, option);\n const excludeOptions = [\"max_tokens\", \"presence_penalty\", \"frequency_penalty\"];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [{\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1, max: max_tokens_limit,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n }];\n if (model.includes(\"-3-7\") || model.includes(\"-4\")) {\n const claudeModeOptions = [\n {\n name: \"thinking_mode\",\n type: OptionType.boolean,\n default: false,\n description: \"If true, use the extended reasoning mode\"\n },\n ];\n const claudeThinkingOptions = option?.thinking_mode ? [\n {\n name: \"thinking_budget_tokens\",\n type: OptionType.numeric,\n min: 1024,\n default: 4000,\n integer: true,\n step: 100,\n description: \"The target number of tokens to use for reasoning, not a hard limit.\"\n },\n ] : [];\n return {\n _option_id: \"vertexai-claude\",\n options: [\n ...max_tokens,\n ...commonOptions,\n ...claudeModeOptions,\n ...claudeThinkingOptions,\n ]\n };\n }\n return {\n _option_id: \"vertexai-claude\",\n options: [\n ...max_tokens,\n ...commonOptions,\n ]\n };\n }\n else if (model.includes(\"llama\")) {\n const max_tokens_limit = getLlamaMaxTokensLimit(model);\n const excludeOptions = [\"max_tokens\", \"presence_penalty\", \"frequency_penalty\", \"stop_sequence\"];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [{\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1, max: max_tokens_limit,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n }];\n //Set max temperature to 1.0 for Llama models\n commonOptions = commonOptions.map((option) => {\n if (option.name === SharedOptions.temperature &&\n option.type === OptionType.numeric) {\n return {\n ...option,\n max: 1.0,\n };\n }\n return option;\n });\n return {\n _option_id: \"text-fallback\",\n options: [\n ...max_tokens,\n ...commonOptions,\n ]\n };\n }\n return textOptionsFallback;\n}\nfunction getGeminiMaxTokensLimit(model) {\n if (model.includes(\"thinking\") || model.includes(\"-2.5-\")) {\n return 65536;\n }\n if (model.includes(\"ultra\") || model.includes(\"vision\")) {\n return 2048;\n }\n return 8192;\n}\nfunction getClaudeMaxTokensLimit(model, option) {\n if (model.includes(\"-4-\")) {\n if (model.includes(\"opus-\")) {\n return 32768;\n }\n return 65536;\n }\n else if (model.includes(\"-3-7-\")) {\n if (option && option?.thinking_mode) {\n return 131072;\n }\n else {\n return 8192;\n }\n }\n else if (model.includes(\"-3-5-\")) {\n return 8192;\n }\n else {\n return 4096;\n }\n}\nfunction getLlamaMaxTokensLimit(_model) {\n return 8192;\n}\n//# sourceMappingURL=vertexai.js.map",null,"import { OptionType, SharedOptions } from \"../types.js\";\nexport const textOptionsFallback = {\n _option_id: \"text-fallback\",\n options: [\n {\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n },\n {\n name: SharedOptions.temperature, type: OptionType.numeric, min: 0.0, default: 0.7,\n integer: false, step: 0.1, description: \"A higher temperature biases toward less likely tokens, making the model more creative\"\n },\n {\n name: SharedOptions.top_p, type: OptionType.numeric, min: 0, max: 1,\n integer: false, step: 0.1, description: \"Limits token sampling to the cumulative probability of the top p tokens\"\n },\n {\n name: SharedOptions.top_k, type: OptionType.numeric, min: 1,\n integer: true, step: 1, description: \"Limits token sampling to the top k tokens\"\n },\n {\n name: SharedOptions.presence_penalty, type: OptionType.numeric, min: -2.0, max: 2.0,\n integer: false, step: 0.1, description: \"Penalise tokens if they appear at least once in the text\"\n },\n {\n name: SharedOptions.frequency_penalty, type: OptionType.numeric, min: -2.0, max: 2.0,\n integer: false, step: 0.1, description: \"Penalise tokens based on their frequency in the text\"\n },\n { name: SharedOptions.stop_sequence, type: OptionType.string_list, value: [], description: \"The generation will halt if one of the stop sequences is output\" },\n ]\n};\n//# sourceMappingURL=fallback.js.map"],"names":["Permission","AccessControlledResource","ApiKeyTypes","PrincipalType","SupportedProviders","SupportedProvidersList","openai","id","name","requiresApiKey","requiresEndpointUrl","supportSearch","azure_openai","huggingface_ie","replicate","bedrock","endpointPlaceholder","vertexai","togetherai","mistralai","groq","watsonx","virtual_lb","virtual_mediator","test","ExecutionEnvironmentRefPopulate","SupportedIntegrations","InteractionRefPopulate","InteractionRefWithSchemaPopulate","InteractionStatus","ExecutionRunStatus","RunDataStorageLevel","RunDataStorageDescription","RunDataStorageOptions","STANDARD","RESTRICTED","DEBUG","RunSourceTypes","ExecutionRunRefSelect","ConfigModes","ConfigModesDescription","ConfigModesOptions","RUN_AND_INTERACTION_CONFIG","RUN_CONFIG_ONLY","INTERACTION_CONFIG_ONLY","MeterNames","ProjectRoles","ResourceVisibility","SupportedEmbeddingTypes","ProgressSpan","constructor","parent","parentUnits","spanUnits","this","unitsDone","done","units","remaining","parentUnitsDone","Math","round","isDone","Progress","total","fraction","percent","span","isRoleIncludedIn","role","includingRole","owner","admin","billing","developer","ProjectRefPopulate","PromptStatus","PromptSegmentDefType","TemplateType","ResolvableRefType","CollectionStatus","WorkflowDefinitionRefPopulate","RenditionSchema","type","description","properties","mime_type","source_etag","nullable","height","width","multipart","default","total_parts","required","DocumentPartSchema","part_number","title","source_line_start","source_line_end","enum","page_number","ContentObjectStatus","WorkflowRuleInputType","ImageRenditionFormat","MarkdownRenditionFormat","ParentClosePolicy","TERMINATE","ABANDON","REQUEST_CANCEL","PARENT_CLOSE_POLICY_UNSPECIFIED","undefined","PARENT_CLOSE_POLICY_TERMINATE","PARENT_CLOSE_POLICY_ABANDON","PARENT_CLOSE_POLICY_REQUEST_CANCEL","ContentEventName","WorkflowExecutionStatus","AgentMessageType","TrainingSessionStatus","TransientTokenType","getDocumentIds","payload","objectIds","UserRefPopulate","Datacenters","BillingMethod","AccountRefPopulate","getTenantId","accountId","projectId","slice","getTenantIdFromProject","project","account","SharedOptions","OptionType","PromptRole","Modalities","AIModelStatus","ModelType","TrainingJobStatus","ImagenTaskType","ImagenMaskMode","mergeJSONSchemas","schemas","props","schema","prop","includes","push","Object","assign","keys","length","_mergePromptsSchema","prompts","prompt","template","inputSchema","chat","items","assistant","user","content","mergePromptsSchema","interaction","max_tokens","numeric","temperature","top_p","top_k","presence_penalty","frequency_penalty","stop_sequence","string_list"],"mappings":"IAQYA,EAgCAC,ECpCAC,EA2DAC,EC5DAC,GFKZ,SAAYJ,GACRA,EAAA,SAAA,mBACAA,EAAA,UAAA,oBACAA,EAAA,WAAA,qBAEAA,EAAA,YAAA,sBACAA,EAAA,SAAA,WACAA,EAAA,UAAA,YAEAA,EAAA,WAAA,qBAEAA,EAAA,eAAA,iBAEAA,EAAA,eAAA,iBACAA,EAAA,aAAA,eAEAA,EAAA,aAAA,eACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,kBACAA,EAAA,eAAA,iBAGAA,EAAA,aAAA,eACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBAEAA,EAAA,cAAA,gBAEAA,EAAA,aAAA,cACH,CA9BD,CAAYA,IAAAA,EA8BX,CAAA,IAED,SAAYC,GACRA,EAAA,QAAA,UACAA,EAAA,YAAA,cACAA,EAAA,QAAA,UACAA,EAAA,YAAA,aACH,CALD,CAAYA,IAAAA,EAKX,CAAA,ICzCD,SAAYC,GACRA,EAAA,OAAA,KACAA,EAAA,OAAA,IACH,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAwDD,SAAYC,GACRA,EAAA,KAAA,OACAA,EAAA,OAAA,SACAA,EAAA,eAAA,iBACH,CAJD,CAAYA,IAAAA,EAIX,CAAA,IChED,SAAYC,GAERA,EAAA,OAAA,SACAA,EAAA,aAAA,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BjC,GAAWgC,QAI5CjC,EAAcmC,MAAalC,GAAWgC,QAItCjC,EAAcoC,MAAanC,GAAWgC,QAItCjC,EAAcqC,iBAAwBpC,GAAWgC,QAIjDjC,EAAcsC,kBAAyBrC,GAAWgC,QAGpDjC,EAAcuC,cAAqBtC,GAAWuC,YFzB9D,SAAWjC,GACPA,EAA2B,WAAI,aAC/BA,EAA0C,0BAAI,4BAC9CA,EAA4C,4BAAI,8BAChDA,EAAiC,iBAAI,mBACrCA,EAAmC,mBAAI,qBACvCA,EAAsC,sBAAI,wBAC1CA,EAAoC,oBAAI,sBACxCA,EAAyC,yBAAI,2BAC7CA,EAAuC,uBAAI,wBAC9C,CAVD,CAUGA,KAAmBA,GAAiB,CAAA,IAEvC,SAAWC,GACPA,EAAwC,wBAAI,0BAC5CA,EAAqC,qBAAI,uBACzCA,EAAqC,qBAAI,uBACzCA,EAAmC,mBAAI,oBAC1C,CALD,CAKGA,KAAmBA,GAAiB,CAAA"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/interaction.ts
CHANGED
@@ -97,6 +97,9 @@ export interface InteractionRef {
|
|
97
97
|
export const InteractionRefPopulate =
|
98
98
|
"id name endpoint parent description status version visibility tags updated_at prompts";
|
99
99
|
|
100
|
+
export const InteractionRefWithSchemaPopulate =
|
101
|
+
`${InteractionRefPopulate} result_schema`;
|
102
|
+
|
100
103
|
export interface InteractionRefWithSchema extends Omit<InteractionRef, "prompts"> {
|
101
104
|
result_schema?: JSONSchema4;
|
102
105
|
prompts?: PromptSegmentDef<PromptTemplateRefWithSchema>[];
|
@@ -261,6 +264,11 @@ export interface InteractionExecutionPayload {
|
|
261
264
|
* The tools to be used in the execution
|
262
265
|
*/
|
263
266
|
tools?: ToolDefinition[];
|
267
|
+
|
268
|
+
/**
|
269
|
+
* The workflow related to this Interaction Run.
|
270
|
+
*/
|
271
|
+
workflow?: ExecutionRunWorkflow;
|
264
272
|
}
|
265
273
|
|
266
274
|
export interface NamedInteractionExecutionPayload extends InteractionExecutionPayload {
|
@@ -392,6 +400,7 @@ export interface ToolResultsPayload extends ResumeConversationPayload {
|
|
392
400
|
results: {
|
393
401
|
tool_use_id: string;
|
394
402
|
content: string;
|
403
|
+
files?: string[];
|
395
404
|
}[];
|
396
405
|
}
|
397
406
|
|
@@ -462,6 +471,41 @@ export interface ExecutionRun<P = any, R = any> {
|
|
462
471
|
output_modality: Modalities;
|
463
472
|
created_by: string;
|
464
473
|
updated_by: string;
|
474
|
+
|
475
|
+
/**
|
476
|
+
* The Vertesia Workflow related to this Interaction Run.
|
477
|
+
*
|
478
|
+
* This is only set when the interaction is executed as part of a workflow.
|
479
|
+
*
|
480
|
+
* @since 0.60.0
|
481
|
+
*/
|
482
|
+
workflow?: ExecutionRunWorkflow;
|
483
|
+
}
|
484
|
+
|
485
|
+
export interface ExecutionRunWorkflow {
|
486
|
+
/**
|
487
|
+
* The Temporal Workflow Run ID related to this Interaction Run.
|
488
|
+
*
|
489
|
+
* A Run ID is a globally unique, platform-level identifier for a Workflow Execution.
|
490
|
+
*
|
491
|
+
* @example 01970d37-a890-70c0-9f44-1256d063e69a
|
492
|
+
* @see https://docs.temporal.io/workflow-execution/workflowid-runid
|
493
|
+
*/
|
494
|
+
run_id: string;
|
495
|
+
/**
|
496
|
+
* The Temporal Workflow ID related to this Interaction Run.
|
497
|
+
*
|
498
|
+
* @example Standard Document Intake:6834841e4f828d4e36192796
|
499
|
+
* @see https://docs.temporal.io/workflow-execution/workflowid-runid
|
500
|
+
*/
|
501
|
+
workflow_id: string;
|
502
|
+
/**
|
503
|
+
* The Temporal Activity Type used for executing this Interaction. Undefined if the interaction
|
504
|
+
* was not executed as part of a workflow (such as Agent Runner).
|
505
|
+
*
|
506
|
+
* @example generateDocumentProperties
|
507
|
+
*/
|
508
|
+
activity_type?: string;
|
465
509
|
}
|
466
510
|
|
467
511
|
export interface InteractionExecutionResult<P = any, R = any> extends ExecutionRun<P, R> {
|
package/src/json.ts
ADDED
package/src/plugin.ts
CHANGED
@@ -1,8 +1,20 @@
|
|
1
|
+
import { JSONObject, ToolDefinition, ToolUse } from "@llumiverse/common";
|
2
|
+
import { AsyncConversationExecutionPayload } from "./interaction.js";
|
3
|
+
import { WorkflowExecutionBaseParams } from "./store/index.js";
|
4
|
+
|
1
5
|
/**
|
2
6
|
* A vertesia plugin manifest
|
3
7
|
*/
|
4
|
-
export interface PluginManifest {
|
8
|
+
export interface PluginManifest<MetaT = any> {
|
5
9
|
id: string;
|
10
|
+
/**
|
11
|
+
* The kind of the plugin.
|
12
|
+
*/
|
13
|
+
kind: "ui" | "tool";
|
14
|
+
/**
|
15
|
+
* A metadata field which can be used for each kind of plugin to store additional data
|
16
|
+
*/
|
17
|
+
metadata?: MetaT;
|
6
18
|
src: string;
|
7
19
|
name: string;
|
8
20
|
version: string;
|
@@ -17,6 +29,7 @@ export interface PluginManifest {
|
|
17
29
|
* It will be loaded in a new tab.
|
18
30
|
* If external is false the plugin will be loaded as a page of the host application and it will share the same layout.
|
19
31
|
* Default is false.
|
32
|
+
* This is only usefull for UI plugins.
|
20
33
|
*/
|
21
34
|
external?: boolean;
|
22
35
|
/**
|
@@ -24,3 +37,22 @@ export interface PluginManifest {
|
|
24
37
|
*/
|
25
38
|
status?: "beta" | "stable" | "deprecated" | "hidden";
|
26
39
|
}
|
40
|
+
|
41
|
+
export interface UIPluginManifest extends PluginManifest {
|
42
|
+
kind: "ui";
|
43
|
+
metadata: never;
|
44
|
+
}
|
45
|
+
|
46
|
+
export interface ToolPluginManifest extends PluginManifest {
|
47
|
+
kind: "tool";
|
48
|
+
/**
|
49
|
+
* The definitions of the exported tools
|
50
|
+
*/
|
51
|
+
metadata: ToolDefinition[];
|
52
|
+
}
|
53
|
+
|
54
|
+
export interface PluginToolContext<ParamsT = JSONObject> {
|
55
|
+
payload: WorkflowExecutionBaseParams<AsyncConversationExecutionPayload>;
|
56
|
+
tool_use: ToolUse<ParamsT>; //params?
|
57
|
+
plugin: string; // plugin id
|
58
|
+
}
|
package/src/query.ts
CHANGED
@@ -54,7 +54,7 @@ export interface PromptSearchQuery extends SimpleSearchQuery {
|
|
54
54
|
export interface InteractionSearchQuery extends SimpleSearchQuery {
|
55
55
|
prompt?: string;
|
56
56
|
tags?: string[];
|
57
|
-
version?:
|
57
|
+
version?: string;
|
58
58
|
}
|
59
59
|
|
60
60
|
export interface RunSearchQuery extends SimpleSearchQuery {
|