@promptbook/fake-llm
Advanced tools
Comparing version 0.59.0-0 to 0.59.0-1
@@ -842,5 +842,5 @@ import { spaceTrim } from 'spacetrim'; | ||
*/ | ||
var PROMPTBOOK_VERSION = '0.58.0'; | ||
var PROMPTBOOK_VERSION = '0.59.0-0'; | ||
export { MockedEchoLlmExecutionTools, MockedFackedLlmExecutionTools, PROMPTBOOK_VERSION }; | ||
//# sourceMappingURL=index.es.js.map |
@@ -5,6 +5,15 @@ import type { LlmExecutionTools } from '../execution/LlmExecutionTools'; | ||
/** | ||
* Options for promptbookStringToJson | ||
*/ | ||
type PromptbookStringToJsonOptions = { | ||
/** | ||
* Tools for processing required for knowledge processing *(not for actual execution)* | ||
*/ | ||
llmTools?: LlmExecutionTools; | ||
}; | ||
/** | ||
* Compile promptbook from string (markdown) format to JSON format | ||
* | ||
* @param promptbookString {Promptbook} in string markdown format (.ptbk.md) | ||
* @param llmTools {LlmExecutionTools} - tools for processing required for knowledge processing *(not for actual execution)* | ||
* @param options - Options and tools for the compilation | ||
* @returns {Promptbook} compiled in JSON format (.ptbk.json) | ||
@@ -16,3 +25,4 @@ * @throws {PromptbookSyntaxError} if the promptbook string is not valid | ||
*/ | ||
export declare function promptbookStringToJson(promptbookString: PromptbookString, llmTools?: LlmExecutionTools): Promise<PromptbookJson>; | ||
export declare function promptbookStringToJson(promptbookString: PromptbookString, options?: PromptbookStringToJsonOptions): Promise<PromptbookJson>; | ||
export {}; | ||
/** | ||
@@ -19,0 +29,0 @@ * TODO: Report here line/column of error |
@@ -0,3 +1,3 @@ | ||
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools'; | ||
import type { KnowledgeJson } from '../../../types/PromptbookJson/KnowledgeJson'; | ||
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools'; | ||
import type { string_markdown } from '../../../types/typeAliases'; | ||
@@ -4,0 +4,0 @@ export declare function prepareKnowledgeFromMarkdown(options: { |
@@ -40,2 +40,3 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
/** | ||
* TODO: !!!! [🍆] JSON mode | ||
* TODO: [🧠] Maybe handle errors via transformAnthropicError (like transformAzureError) | ||
@@ -42,0 +43,0 @@ * TODO: Maybe Create some common util for gptChat and gptComplete |
@@ -196,6 +196,12 @@ /** | ||
*/ | ||
export type string_data_url = string; | ||
export type string_data_url = `data:${string_mime_type};base64,${string_base64}`; | ||
/** | ||
* Semantic helper | ||
* | ||
* For example `"SGVsbG8sIFdvcmxkIQ=="` | ||
*/ | ||
export type string_base64 = string; | ||
/** | ||
* Semantic helper | ||
* | ||
* For example `"https://collboard.com/9SeSQTupmQHwuSrLi"` OR `/9SeSQTupmQHwuSrLi` | ||
@@ -202,0 +208,0 @@ */ |
{ | ||
"name": "@promptbook/fake-llm", | ||
"version": "0.59.0-0", | ||
"version": "0.59.0-1", | ||
"description": "Library to supercharge your use of large language models", | ||
@@ -51,3 +51,3 @@ "private": false, | ||
"peerDependencies": { | ||
"@promptbook/core": "0.59.0-0" | ||
"@promptbook/core": "0.59.0-1" | ||
}, | ||
@@ -54,0 +54,0 @@ "main": "./umd/index.umd.js", |
@@ -536,3 +536,3 @@ # ![Promptbook logo - cube with letters P and B](./other/design/logo-h1.png) Promptbook | ||
Additionally there are some usefull string-manipulation build-in functions, which are [listed here](src/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.ts). | ||
Additionally there are some usefull string-manipulation build-in functions, which are [listed here](src/scripting/javascript/JavascriptEvalExecutionTools.ts). | ||
@@ -539,0 +539,0 @@ ### Expectations |
@@ -845,3 +845,3 @@ (function (global, factory) { | ||
*/ | ||
var PROMPTBOOK_VERSION = '0.58.0'; | ||
var PROMPTBOOK_VERSION = '0.59.0-0'; | ||
@@ -848,0 +848,0 @@ exports.MockedEchoLlmExecutionTools = MockedEchoLlmExecutionTools; |
@@ -5,6 +5,15 @@ import type { LlmExecutionTools } from '../execution/LlmExecutionTools'; | ||
/** | ||
* Options for promptbookStringToJson | ||
*/ | ||
type PromptbookStringToJsonOptions = { | ||
/** | ||
* Tools for processing required for knowledge processing *(not for actual execution)* | ||
*/ | ||
llmTools?: LlmExecutionTools; | ||
}; | ||
/** | ||
* Compile promptbook from string (markdown) format to JSON format | ||
* | ||
* @param promptbookString {Promptbook} in string markdown format (.ptbk.md) | ||
* @param llmTools {LlmExecutionTools} - tools for processing required for knowledge processing *(not for actual execution)* | ||
* @param options - Options and tools for the compilation | ||
* @returns {Promptbook} compiled in JSON format (.ptbk.json) | ||
@@ -16,3 +25,4 @@ * @throws {PromptbookSyntaxError} if the promptbook string is not valid | ||
*/ | ||
export declare function promptbookStringToJson(promptbookString: PromptbookString, llmTools?: LlmExecutionTools): Promise<PromptbookJson>; | ||
export declare function promptbookStringToJson(promptbookString: PromptbookString, options?: PromptbookStringToJsonOptions): Promise<PromptbookJson>; | ||
export {}; | ||
/** | ||
@@ -19,0 +29,0 @@ * TODO: Report here line/column of error |
@@ -0,3 +1,3 @@ | ||
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools'; | ||
import type { KnowledgeJson } from '../../../types/PromptbookJson/KnowledgeJson'; | ||
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools'; | ||
import type { string_markdown } from '../../../types/typeAliases'; | ||
@@ -4,0 +4,0 @@ export declare function prepareKnowledgeFromMarkdown(options: { |
@@ -40,2 +40,3 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
/** | ||
* TODO: !!!! [🍆] JSON mode | ||
* TODO: [🧠] Maybe handle errors via transformAnthropicError (like transformAzureError) | ||
@@ -42,0 +43,0 @@ * TODO: Maybe Create some common util for gptChat and gptComplete |
@@ -196,6 +196,12 @@ /** | ||
*/ | ||
export type string_data_url = string; | ||
export type string_data_url = `data:${string_mime_type};base64,${string_base64}`; | ||
/** | ||
* Semantic helper | ||
* | ||
* For example `"SGVsbG8sIFdvcmxkIQ=="` | ||
*/ | ||
export type string_base64 = string; | ||
/** | ||
* Semantic helper | ||
* | ||
* For example `"https://collboard.com/9SeSQTupmQHwuSrLi"` OR `/9SeSQTupmQHwuSrLi` | ||
@@ -202,0 +208,0 @@ */ |
568309
564
9807