@promptbook/remote-client
Advanced tools
Comparing version 0.33.0-0 to 0.33.0-1
@@ -16,3 +16,3 @@ import type { Promisable } from 'type-fest'; | ||
export interface PtpExecutor { | ||
(inputParameters: Record<string_name, string>, onProgress: (taskProgress: TaskProgress) => Promisable<void>): Promise<{ | ||
(inputParameters: Record<string_name, string | Array<string>>, onProgress: (taskProgress: TaskProgress) => Promisable<void>): Promise<{ | ||
/** | ||
@@ -35,3 +35,3 @@ * Whether the execution was successful | ||
*/ | ||
outputParameters: Record<string_name, string>; | ||
outputParameters: Record<string_name, string | Array<string>>; | ||
}>; | ||
@@ -38,0 +38,0 @@ } |
@@ -9,3 +9,3 @@ import type { string_markdown_text, string_name, string_version } from '.././types/typeAliases'; | ||
*/ | ||
export type Command = PtbkUrlCommand | PtbkVersionCommand | ExecuteCommand | ModelCommand | JokerCommand | ParameterCommand | PostprocessCommand | ExpectCommand; | ||
export type Command = PtbkUrlCommand | PtbkVersionCommand | ExecuteCommand | ModelCommand | JokerCommand | ParameterCommand | PostprocessCommand | SplitCommand | JoinCommand | ExpectCommand; | ||
/** | ||
@@ -69,3 +69,2 @@ * PtpVersion command tells which version is .ptp file using | ||
* Postprocess command describes which function to use for postprocessing | ||
* This will be created as separate EXECUTE SCRIPT block bellow | ||
*/ | ||
@@ -77,2 +76,16 @@ export interface PostprocessCommand { | ||
/** | ||
* Split command describes which function to use for split postprocessing | ||
*/ | ||
export interface SplitCommand { | ||
readonly type: 'SPLIT'; | ||
readonly functionName: string_name; | ||
} | ||
/** | ||
* Join command describes which function to use for join postprocessing | ||
*/ | ||
export interface JoinCommand { | ||
readonly type: 'JOIN'; | ||
readonly functionName: string_name; | ||
} | ||
/** | ||
* Expect command describes the desired output of the prompt template (after post-processing) | ||
@@ -79,0 +92,0 @@ * It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs or some other shape of the output. |
@@ -89,2 +89,9 @@ import { number_integer, number_positive_or_zero, string_javascript, string_javascript_name, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases'; | ||
/** | ||
* Iterate through following array parameters | ||
*/ | ||
readonly iterators?: Array<{ | ||
parameterName: string_name; | ||
indexName: string_name; | ||
}>; | ||
/** | ||
* Type of the execution | ||
@@ -103,2 +110,10 @@ * This determines if the prompt template is send to LLM, user or some scripting evaluation | ||
/** | ||
* Split postprocessing function | ||
*/ | ||
readonly split?: string_javascript_name; | ||
/** | ||
* Join postprocessing function | ||
*/ | ||
readonly join?: string_javascript_name; | ||
/** | ||
* Expect this amount of each unit in the answer | ||
@@ -105,0 +120,0 @@ * |
@@ -13,2 +13,8 @@ import { string_name } from '../.././types/typeAliases'; | ||
/** | ||
* The type of the parameter | ||
* | ||
* - 'LIST' means `Array<string>` | ||
*/ | ||
readonly type: 'string' | 'list'; | ||
/** | ||
* The parameter is input of the pipeline | ||
@@ -15,0 +21,0 @@ * |
@@ -10,2 +10,5 @@ import { string_name, string_template } from '../types/typeAliases'; | ||
*/ | ||
export declare function extractParameters(template: string_template): Array<string_name>; | ||
export declare function extractParameters(template: string_template): Array<{ | ||
parameterName: string_name; | ||
indexName?: string_name; | ||
}>; |
{ | ||
"name": "@promptbook/remote-client", | ||
"version": "0.33.0-0", | ||
"version": "0.33.0-1", | ||
"description": "Library to supercharge your use of large language models", | ||
@@ -40,3 +40,3 @@ "private": false, | ||
"peerDependencies": { | ||
"@promptbook/core": "0.33.0-0" | ||
"@promptbook/core": "0.33.0-1" | ||
}, | ||
@@ -43,0 +43,0 @@ "main": "./umd/index.umd.js", |
@@ -16,3 +16,3 @@ import type { Promisable } from 'type-fest'; | ||
export interface PtpExecutor { | ||
(inputParameters: Record<string_name, string>, onProgress: (taskProgress: TaskProgress) => Promisable<void>): Promise<{ | ||
(inputParameters: Record<string_name, string | Array<string>>, onProgress: (taskProgress: TaskProgress) => Promisable<void>): Promise<{ | ||
/** | ||
@@ -35,3 +35,3 @@ * Whether the execution was successful | ||
*/ | ||
outputParameters: Record<string_name, string>; | ||
outputParameters: Record<string_name, string | Array<string>>; | ||
}>; | ||
@@ -38,0 +38,0 @@ } |
@@ -9,3 +9,3 @@ import type { string_markdown_text, string_name, string_version } from '.././types/typeAliases'; | ||
*/ | ||
export type Command = PtbkUrlCommand | PtbkVersionCommand | ExecuteCommand | ModelCommand | JokerCommand | ParameterCommand | PostprocessCommand | ExpectCommand; | ||
export type Command = PtbkUrlCommand | PtbkVersionCommand | ExecuteCommand | ModelCommand | JokerCommand | ParameterCommand | PostprocessCommand | SplitCommand | JoinCommand | ExpectCommand; | ||
/** | ||
@@ -69,3 +69,2 @@ * PtpVersion command tells which version is .ptp file using | ||
* Postprocess command describes which function to use for postprocessing | ||
* This will be created as separate EXECUTE SCRIPT block bellow | ||
*/ | ||
@@ -77,2 +76,16 @@ export interface PostprocessCommand { | ||
/** | ||
* Split command describes which function to use for split postprocessing | ||
*/ | ||
export interface SplitCommand { | ||
readonly type: 'SPLIT'; | ||
readonly functionName: string_name; | ||
} | ||
/** | ||
* Join command describes which function to use for join postprocessing | ||
*/ | ||
export interface JoinCommand { | ||
readonly type: 'JOIN'; | ||
readonly functionName: string_name; | ||
} | ||
/** | ||
* Expect command describes the desired output of the prompt template (after post-processing) | ||
@@ -79,0 +92,0 @@ * It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs or some other shape of the output. |
@@ -89,2 +89,9 @@ import { number_integer, number_positive_or_zero, string_javascript, string_javascript_name, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases'; | ||
/** | ||
* Iterate through following array parameters | ||
*/ | ||
readonly iterators?: Array<{ | ||
parameterName: string_name; | ||
indexName: string_name; | ||
}>; | ||
/** | ||
* Type of the execution | ||
@@ -103,2 +110,10 @@ * This determines if the prompt template is send to LLM, user or some scripting evaluation | ||
/** | ||
* Split postprocessing function | ||
*/ | ||
readonly split?: string_javascript_name; | ||
/** | ||
* Join postprocessing function | ||
*/ | ||
readonly join?: string_javascript_name; | ||
/** | ||
* Expect this amount of each unit in the answer | ||
@@ -105,0 +120,0 @@ * |
@@ -13,2 +13,8 @@ import { string_name } from '../.././types/typeAliases'; | ||
/** | ||
* The type of the parameter | ||
* | ||
* - 'LIST' means `Array<string>` | ||
*/ | ||
readonly type: 'string' | 'list'; | ||
/** | ||
* The parameter is input of the pipeline | ||
@@ -15,0 +21,0 @@ * |
@@ -10,2 +10,5 @@ import { string_name, string_template } from '../types/typeAliases'; | ||
*/ | ||
export declare function extractParameters(template: string_template): Array<string_name>; | ||
export declare function extractParameters(template: string_template): Array<{ | ||
parameterName: string_name; | ||
indexName?: string_name; | ||
}>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
344256
330
5708