@promptbook/remote-client
Advanced tools
Comparing version 0.41.111-0 to 0.41.111-1
@@ -6,2 +6,4 @@ import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson'; | ||
* | ||
* @throws {PromptbookSyntaxError} if the promptbook string is not valid | ||
* | ||
* Note: This function does not validate logic of the pipeline only the syntax | ||
@@ -8,0 +10,0 @@ */ |
@@ -7,2 +7,3 @@ import { string_javascript, string_javascript_name } from '../../types/typeAliases'; | ||
* @returns the list of variable names | ||
* @throws {PromptbookSyntaxError} if the script is invalid | ||
* | ||
@@ -9,0 +10,0 @@ * @private within the promptbookStringToJson |
@@ -6,4 +6,7 @@ import type { Command } from '../../types/Command'; | ||
* | ||
* @returns parsed command object | ||
* @throws {PromptbookSyntaxError} if the command is invalid | ||
* | ||
* @private within the promptbookStringToJson | ||
*/ | ||
export declare function parseCommand(listItem: string_markdown_text): Command; |
@@ -7,2 +7,5 @@ /** | ||
* | ||
* @returns parsed number | ||
* @throws {PromptbookSyntaxError} if the value is not a number | ||
* | ||
* @private within the parseCommand | ||
@@ -9,0 +12,0 @@ */ |
@@ -13,3 +13,3 @@ import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson'; | ||
* @param promptbook valid or invalid PromptbookJson | ||
* @throws {Error} if invalid | ||
* @throws {PromptbookLogicError} on logical error in the promptbook | ||
*/ | ||
@@ -16,0 +16,0 @@ export declare function validatePromptbookJson(promptbook: PromptbookJson): void; |
@@ -6,3 +6,3 @@ import type { PromptbookExecutor } from './PromptbookExecutor'; | ||
* @param executionResult - The partial result of the promptnook execution | ||
* @throws Error - If the execution is not successful or if multiple errors occurred | ||
* @throws {PromptbookExecutionError} If the execution is not successful or if multiple errors occurred | ||
*/ | ||
@@ -9,0 +9,0 @@ export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PromptbookExecutor>>, 'isSuccessful' | 'errors'>): void; |
@@ -32,3 +32,4 @@ import { PromptbookJson } from '../_packages/types.index'; | ||
* | ||
* Note: Consider using getExecutor method of the library instead of using this function | ||
* @returns The executor function | ||
* @throws {PromptbookLogicError} on logical error in the promptbook | ||
*/ | ||
@@ -35,0 +36,0 @@ export declare function createPromptbookExecutor(options: CreatePromptbookExecutorOptions): PromptbookExecutor; |
import type OpenAI from 'openai'; | ||
import type { PromptResult } from '../../../PromptResult'; | ||
/** | ||
* !!! | ||
* | ||
* @throws {PromptbookExecutionError} If the usage is not defined in the response from OpenAI | ||
*/ | ||
export declare function computeOpenaiUsage(rawResponse: Pick<OpenAI.Chat.Completions.ChatCompletion | OpenAI.Completions.Completion, 'model' | 'usage'>): PromptResult['usage']; |
@@ -9,5 +9,3 @@ import type { Promisable } from 'type-fest'; | ||
* | ||
* It can be done in two ways: | ||
* - From `PromptbookLibrary.getExecutor` method | ||
* - `createPromptbookExecutor` utility function | ||
* It can be created with `createPromptbookExecutor` function. | ||
* | ||
@@ -14,0 +12,0 @@ * @see https://github.com/webgptorg/promptbook#executor |
@@ -0,1 +1,7 @@ | ||
/** | ||
* | ||
* @param message | ||
* @returns | ||
* @throws {PromptbookExecutionError} | ||
*/ | ||
export declare function extractMultiplicatedOccurrence(message: string): string; |
@@ -9,2 +9,3 @@ import { Parameters } from '../../types/Parameters'; | ||
* @returns the template with replaced parameters | ||
* @throws {TemplateError} if parameter is not defined, not closed, or not opened | ||
* | ||
@@ -11,0 +12,0 @@ * @private within the createPromptbookExecutor |
{ | ||
"name": "@promptbook/remote-client", | ||
"version": "0.41.111-0", | ||
"version": "0.41.111-1", | ||
"description": "Library to supercharge your use of large language models", | ||
@@ -40,3 +40,3 @@ "private": false, | ||
"peerDependencies": { | ||
"@promptbook/core": "0.41.111-0" | ||
"@promptbook/core": "0.41.111-1" | ||
}, | ||
@@ -43,0 +43,0 @@ "main": "./umd/index.umd.js", |
@@ -6,2 +6,4 @@ import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson'; | ||
* | ||
* @throws {PromptbookSyntaxError} if the promptbook string is not valid | ||
* | ||
* Note: This function does not validate logic of the pipeline only the syntax | ||
@@ -8,0 +10,0 @@ */ |
@@ -7,2 +7,3 @@ import { string_javascript, string_javascript_name } from '../../types/typeAliases'; | ||
* @returns the list of variable names | ||
* @throws {PromptbookSyntaxError} if the script is invalid | ||
* | ||
@@ -9,0 +10,0 @@ * @private within the promptbookStringToJson |
@@ -6,4 +6,7 @@ import type { Command } from '../../types/Command'; | ||
* | ||
* @returns parsed command object | ||
* @throws {PromptbookSyntaxError} if the command is invalid | ||
* | ||
* @private within the promptbookStringToJson | ||
*/ | ||
export declare function parseCommand(listItem: string_markdown_text): Command; |
@@ -7,2 +7,5 @@ /** | ||
* | ||
* @returns parsed number | ||
* @throws {PromptbookSyntaxError} if the value is not a number | ||
* | ||
* @private within the parseCommand | ||
@@ -9,0 +12,0 @@ */ |
@@ -13,3 +13,3 @@ import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson'; | ||
* @param promptbook valid or invalid PromptbookJson | ||
* @throws {Error} if invalid | ||
* @throws {PromptbookLogicError} on logical error in the promptbook | ||
*/ | ||
@@ -16,0 +16,0 @@ export declare function validatePromptbookJson(promptbook: PromptbookJson): void; |
@@ -6,3 +6,3 @@ import type { PromptbookExecutor } from './PromptbookExecutor'; | ||
* @param executionResult - The partial result of the promptnook execution | ||
* @throws Error - If the execution is not successful or if multiple errors occurred | ||
* @throws {PromptbookExecutionError} If the execution is not successful or if multiple errors occurred | ||
*/ | ||
@@ -9,0 +9,0 @@ export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PromptbookExecutor>>, 'isSuccessful' | 'errors'>): void; |
@@ -32,3 +32,4 @@ import { PromptbookJson } from '../_packages/types.index'; | ||
* | ||
* Note: Consider using getExecutor method of the library instead of using this function | ||
* @returns The executor function | ||
* @throws {PromptbookLogicError} on logical error in the promptbook | ||
*/ | ||
@@ -35,0 +36,0 @@ export declare function createPromptbookExecutor(options: CreatePromptbookExecutorOptions): PromptbookExecutor; |
import type OpenAI from 'openai'; | ||
import type { PromptResult } from '../../../PromptResult'; | ||
/** | ||
* !!! | ||
* | ||
* @throws {PromptbookExecutionError} If the usage is not defined in the response from OpenAI | ||
*/ | ||
export declare function computeOpenaiUsage(rawResponse: Pick<OpenAI.Chat.Completions.ChatCompletion | OpenAI.Completions.Completion, 'model' | 'usage'>): PromptResult['usage']; |
@@ -9,5 +9,3 @@ import type { Promisable } from 'type-fest'; | ||
* | ||
* It can be done in two ways: | ||
* - From `PromptbookLibrary.getExecutor` method | ||
* - `createPromptbookExecutor` utility function | ||
* It can be created with `createPromptbookExecutor` function. | ||
* | ||
@@ -14,0 +12,0 @@ * @see https://github.com/webgptorg/promptbook#executor |
@@ -0,1 +1,7 @@ | ||
/** | ||
* | ||
* @param message | ||
* @returns | ||
* @throws {PromptbookExecutionError} | ||
*/ | ||
export declare function extractMultiplicatedOccurrence(message: string): string; |
@@ -9,2 +9,3 @@ import { Parameters } from '../../types/Parameters'; | ||
* @returns the template with replaced parameters | ||
* @throws {TemplateError} if parameter is not defined, not closed, or not opened | ||
* | ||
@@ -11,0 +12,0 @@ * @private within the createPromptbookExecutor |
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
349605
364
5926