Socket
Socket
Sign inDemoInstall

@promptbook/remote-client

Package Overview
Dependencies
Maintainers
1
Versions
366
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.25.0 to 0.26.0

16

esm/typings/types/Command.d.ts

@@ -69,2 +69,7 @@ import type { string_markdown_text, string_name, string_version } from '.././types/typeAliases';

* Expect command describes the desired output of the prompt template (after post-processing)
* 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.
*/
export type ExpectCommand = ExpectAmountCommand | ExpectFormatCommand;
/**
* Expect amount command describes the desired output of the prompt template (after post-processing)
* It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs,...

@@ -74,4 +79,4 @@ *

*/
export interface ExpectCommand {
readonly type: 'EXPECT';
export interface ExpectAmountCommand {
readonly type: 'EXPECT_AMOUNT';
readonly sign: 'EXACTLY' | 'MINIMUM' | 'MAXIMUM';

@@ -81,1 +86,8 @@ readonly unit: ExpectationUnit;

}
/**
* Represents a command that expects a specific format.
*/
export interface ExpectFormatCommand {
readonly type: 'EXPECT_FORMAT';
readonly format: 'JSON';
}

13

esm/typings/types/PromptTemplatePipelineJson/PromptTemplateJson.d.ts
import { number_integer, number_positive_or_zero, string_javascript, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases';
import { ExpectFormatCommand } from '../Command';
import { ExecutionType } from '../ExecutionTypes';

@@ -15,5 +16,7 @@ import { ModelRequirements } from '../ModelRequirements';

/**
* Expectations for the answer
* Expect this amount of each unit in the answer
*
* For example 5 words, 3 sentences, 2 paragraphs, ...
*/
readonly expectations: Partial<Record<Lowercase<ExpectationUnit>, {
readonly expectAmount?: Partial<Record<Lowercase<ExpectationUnit>, {
min?: ExpectationAmount;

@@ -23,2 +26,6 @@ max?: ExpectationAmount;

/**
* Expect this format of the answer
*/
readonly expectFormat?: ExpectFormatCommand['format'];
/**
* Requirements for the model

@@ -36,3 +43,3 @@ * - This is required only for executionType PROMPT_TEMPLATE

*/
export type ExpectationUnit = (typeof EXPECTATION_UNITS)[number];
export type ExpectationUnit = typeof EXPECTATION_UNITS[number];
/**

@@ -39,0 +46,0 @@ * Amount of text measurement

{
"name": "@promptbook/remote-client",
"version": "0.25.0",
"version": "0.26.0",
"description": "Library to supercharge your use of large language models",

@@ -40,3 +40,3 @@ "private": false,

"peerDependencies": {
"@promptbook/core": "0.25.0"
"@promptbook/core": "0.26.0"
},

@@ -43,0 +43,0 @@ "main": "./umd/index.umd.js",

@@ -69,2 +69,7 @@ import type { string_markdown_text, string_name, string_version } from '.././types/typeAliases';

* Expect command describes the desired output of the prompt template (after post-processing)
* 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.
*/
export type ExpectCommand = ExpectAmountCommand | ExpectFormatCommand;
/**
* Expect amount command describes the desired output of the prompt template (after post-processing)
* It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs,...

@@ -74,4 +79,4 @@ *

*/
export interface ExpectCommand {
readonly type: 'EXPECT';
export interface ExpectAmountCommand {
readonly type: 'EXPECT_AMOUNT';
readonly sign: 'EXACTLY' | 'MINIMUM' | 'MAXIMUM';

@@ -81,1 +86,8 @@ readonly unit: ExpectationUnit;

}
/**
* Represents a command that expects a specific format.
*/
export interface ExpectFormatCommand {
readonly type: 'EXPECT_FORMAT';
readonly format: 'JSON';
}
import { number_integer, number_positive_or_zero, string_javascript, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases';
import { ExpectFormatCommand } from '../Command';
import { ExecutionType } from '../ExecutionTypes';

@@ -15,5 +16,7 @@ import { ModelRequirements } from '../ModelRequirements';

/**
* Expectations for the answer
* Expect this amount of each unit in the answer
*
* For example 5 words, 3 sentences, 2 paragraphs, ...
*/
readonly expectations: Partial<Record<Lowercase<ExpectationUnit>, {
readonly expectAmount?: Partial<Record<Lowercase<ExpectationUnit>, {
min?: ExpectationAmount;

@@ -23,2 +26,6 @@ max?: ExpectationAmount;

/**
* Expect this format of the answer
*/
readonly expectFormat?: ExpectFormatCommand['format'];
/**
* Requirements for the model

@@ -36,3 +43,3 @@ * - This is required only for executionType PROMPT_TEMPLATE

*/
export type ExpectationUnit = (typeof EXPECTATION_UNITS)[number];
export type ExpectationUnit = typeof EXPECTATION_UNITS[number];
/**

@@ -39,0 +46,0 @@ * Amount of text measurement

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc