@promptbook/remote-client
Advanced tools
Comparing version 0.25.0 to 0.26.0
@@ -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 |
{ | ||
"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 |
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
330212
5162