@promptbook/execute-javascript
Advanced tools
Comparing version 0.24.0 to 0.25.0
@@ -9,5 +9,14 @@ import { string_name } from '.././types/typeAliases'; | ||
import { PromptTemplatePipeline } from './PromptTemplatePipeline'; | ||
/** | ||
* Options for PromptTemplatePipelineLibrary | ||
*/ | ||
type PromptTemplatePipelineLibraryOptions = { | ||
/** | ||
* The library of prompt template pipelines | ||
*/ | ||
readonly library: Record<string_name, PromptTemplatePipeline>; | ||
readonly settings: CreatePtpExecutorSettings; | ||
/** | ||
* Optional settings for creating a PromptTemplatePipelineExecutor | ||
*/ | ||
readonly settings?: Partial<CreatePtpExecutorSettings>; | ||
}; | ||
@@ -32,5 +41,6 @@ /** | ||
* @param ptbkSources contents of .ptbk.md or .ptbk.json files | ||
* @param settings settings for creating executor functions | ||
* @returns PromptTemplatePipelineLibrary | ||
*/ | ||
static fromSources(ptbkSources: Record<string_name, PromptTemplatePipelineJson | PromptTemplatePipelineString>, settings: CreatePtpExecutorSettings): PromptTemplatePipelineLibrary; | ||
static fromSources(ptbkSources: Record<string_name, PromptTemplatePipelineJson | PromptTemplatePipelineString>, settings?: Partial<CreatePtpExecutorSettings>): PromptTemplatePipelineLibrary; | ||
private constructor(); | ||
@@ -37,0 +47,0 @@ /** |
@@ -8,10 +8,22 @@ import { PromptTemplatePipeline } from '../classes/PromptTemplatePipeline'; | ||
* | ||
* !!!!!!! Make default in version 24.1.0 | ||
* @default 3 | ||
*/ | ||
readonly maxNaturalExecutionAttempts: number; | ||
} | ||
/** | ||
* Options for creating a PTP (Prompt Template Pipeline) executor | ||
*/ | ||
interface CreatePtpExecutorOptions { | ||
/** | ||
* The Prompt Template Pipeline (PTP) to be executed | ||
*/ | ||
readonly ptp: PromptTemplatePipeline; | ||
/** | ||
* The execution tools to be used during the execution of the PTP | ||
*/ | ||
readonly tools: ExecutionTools; | ||
readonly settings: CreatePtpExecutorSettings; | ||
/** | ||
* Optional settings for the PTP executor | ||
*/ | ||
readonly settings?: Partial<CreatePtpExecutorSettings>; | ||
} | ||
@@ -18,0 +30,0 @@ /** |
{ | ||
"name": "@promptbook/execute-javascript", | ||
"version": "0.24.0", | ||
"version": "0.25.0", | ||
"description": "Library to supercharge your use of large language models", | ||
@@ -42,3 +42,3 @@ "private": false, | ||
"peerDependencies": { | ||
"@promptbook/core": "0.24.0" | ||
"@promptbook/core": "0.25.0" | ||
}, | ||
@@ -45,0 +45,0 @@ "main": "./umd/index.umd.js", |
@@ -9,5 +9,14 @@ import { string_name } from '.././types/typeAliases'; | ||
import { PromptTemplatePipeline } from './PromptTemplatePipeline'; | ||
/** | ||
* Options for PromptTemplatePipelineLibrary | ||
*/ | ||
type PromptTemplatePipelineLibraryOptions = { | ||
/** | ||
* The library of prompt template pipelines | ||
*/ | ||
readonly library: Record<string_name, PromptTemplatePipeline>; | ||
readonly settings: CreatePtpExecutorSettings; | ||
/** | ||
* Optional settings for creating a PromptTemplatePipelineExecutor | ||
*/ | ||
readonly settings?: Partial<CreatePtpExecutorSettings>; | ||
}; | ||
@@ -32,5 +41,6 @@ /** | ||
* @param ptbkSources contents of .ptbk.md or .ptbk.json files | ||
* @param settings settings for creating executor functions | ||
* @returns PromptTemplatePipelineLibrary | ||
*/ | ||
static fromSources(ptbkSources: Record<string_name, PromptTemplatePipelineJson | PromptTemplatePipelineString>, settings: CreatePtpExecutorSettings): PromptTemplatePipelineLibrary; | ||
static fromSources(ptbkSources: Record<string_name, PromptTemplatePipelineJson | PromptTemplatePipelineString>, settings?: Partial<CreatePtpExecutorSettings>): PromptTemplatePipelineLibrary; | ||
private constructor(); | ||
@@ -37,0 +47,0 @@ /** |
@@ -8,10 +8,22 @@ import { PromptTemplatePipeline } from '../classes/PromptTemplatePipeline'; | ||
* | ||
* !!!!!!! Make default in version 24.1.0 | ||
* @default 3 | ||
*/ | ||
readonly maxNaturalExecutionAttempts: number; | ||
} | ||
/** | ||
* Options for creating a PTP (Prompt Template Pipeline) executor | ||
*/ | ||
interface CreatePtpExecutorOptions { | ||
/** | ||
* The Prompt Template Pipeline (PTP) to be executed | ||
*/ | ||
readonly ptp: PromptTemplatePipeline; | ||
/** | ||
* The execution tools to be used during the execution of the PTP | ||
*/ | ||
readonly tools: ExecutionTools; | ||
readonly settings: CreatePtpExecutorSettings; | ||
/** | ||
* Optional settings for the PTP executor | ||
*/ | ||
readonly settings?: Partial<CreatePtpExecutorSettings>; | ||
} | ||
@@ -18,0 +30,0 @@ /** |
450785
6007