Socket
Socket
Sign inDemoInstall

@promptbook/remote-client

Package Overview
Dependencies
Maintainers
1
Versions
401
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@promptbook/remote-client - npm Package Compare versions

Comparing version 0.41.111-0 to 0.41.111-1

esm/typings/errors/TemplateError.d.ts

2

esm/typings/conversion/promptbookStringToJson.d.ts

@@ -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 @@ */

2

esm/typings/conversion/validation/validatePromptbookJson.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc