@promptbook/azure-openai
Version:
Promptbook: Run AI apps in plain human language across multiple models and platforms
314 lines (313 loc) • 10.4 kB
TypeScript
import type { CsvSettings } from './formats/csv/CsvSettings';
import type { IntermediateFilesStrategy } from './types/IntermediateFilesStrategy';
import type { string_app_id } from './types/typeAliases';
import type { string_email } from './types/typeAliases';
import type { string_name } from './types/typeAliases';
import type { string_promptbook_server_url } from './types/typeAliases';
/**
* Warning message for the generated sections and files files
*
* @private within the repository
*/
export declare const GENERATOR_WARNING = "\u26A0\uFE0F WARNING: This code has been generated so that any manual changes will be overwritten";
/**
* Name for the Promptbook
*
* TODO: [🗽] Unite branding and make single place for it
*
* @public exported from `@promptbook/core`
*/
export declare const NAME = "Promptbook";
/**
* Email of the responsible person
*
* @public exported from `@promptbook/core`
*/
export declare const ADMIN_EMAIL: string_email;
/**
* Name of the responsible person for the Promptbook on GitHub
*
* @public exported from `@promptbook/core`
*/
export declare const ADMIN_GITHUB_NAME: string_name;
/**
* Claim for the Promptbook
*
* TODO: [🗽] Unite branding and make single place for it
*
* @public exported from `@promptbook/core`
*/
export declare const CLAIM = "It's time for a paradigm shift. The future of software in plain English, French or Latin";
/**
* When the title is not provided, the default title is used
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_BOOK_TITLE = "\u2728 Untitled Book";
/**
* When the title of task is not provided, the default title is used
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_TASK_TITLE = "Task";
/**
* When the title of the prompt task is not provided, the default title is used
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_PROMPT_TASK_TITLE = "Prompt";
/**
* When the pipeline is flat and no name of return parameter is provided, this name is used
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_BOOK_OUTPUT_PARAMETER_NAME = "result";
/**
* Maximum file size limit
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_MAX_FILE_SIZE: number;
/**
* Threshold value that determines when a dataset is considered "big"
* and may require special handling or optimizations
*
* For example, when error occurs in one item of the big dataset, it will not fail the whole pipeline
*
* @public exported from `@promptbook/core`
*/
export declare const BIG_DATASET_TRESHOLD = 50;
/**
* Placeholder text used to represent a placeholder value of failed operation
*
* @public exported from `@promptbook/core`
*/
export declare const FAILED_VALUE_PLACEHOLDER = "!?";
/**
* Placeholder text used to represent operations or values that are still in progress
* or awaiting completion in UI displays and logging
*
* @public exported from `@promptbook/core`
*/
export declare const PENDING_VALUE_PLACEHOLDER = "\u2026";
/**
* Warning message for the generated sections and files files
*
* @private within the repository
*/
export declare const GENERATOR_WARNING_BY_PROMPTBOOK_CLI = "\u26A0\uFE0F WARNING: This code has been generated by `@promptbook/cli` so that any manual changes will be overwritten";
/**
* Warning message for the automatically generated sections of `.env` files
*
* @private within the repository
*/
export declare const GENERATOR_WARNING_IN_ENV = "Note: Added by Promptbook";
/**
* The maximum number of iterations for a loops
*
* @private within the repository - too low-level in comparison with other `MAX_...`
*/
export declare const LOOP_LIMIT = 1000;
/**
* The maximum number of iterations for a loops which adds characters one by one
*
* @private within the repository - too low-level in comparison with other `MAX_...`
*/
export declare const CHARACTER_LOOP_LIMIT = 100000;
/**
* Strings to represent various values in the context of parameter values
*
* @public exported from `@promptbook/utils`
*/
export declare const VALUE_STRINGS: {
readonly empty: "(nothing; empty string)";
readonly null: "(no value; null)";
readonly undefined: "(unknown value; undefined)";
readonly nan: "(not a number; NaN)";
readonly infinity: "(infinity; ∞)";
readonly negativeInfinity: "(negative infinity; -∞)";
readonly unserializable: "(unserializable value)";
readonly circular: "(circular JSON)";
};
/**
* Small number limit
*
* @public exported from `@promptbook/utils`
*/
export declare const SMALL_NUMBER = 0.001;
/**
* Timeout for the connections in milliseconds
*
* @private within the repository - too low-level in comparison with other `MAX_...`
*/
export declare const CONNECTION_TIMEOUT_MS: number;
/**
* How many times to retry the connections
*
* @private within the repository - too low-level in comparison with other `MAX_...`
*/
export declare const CONNECTION_RETRIES_LIMIT = 5;
/**
* Short time interval to prevent race conditions in milliseconds
*
* @private within the repository - too low-level in comparison with other `MAX_...`
*/
export declare const IMMEDIATE_TIME = 10;
/**
* The maximum length of the (generated) filename
*
* @public exported from `@promptbook/core`
*/
export declare const MAX_FILENAME_LENGTH = 30;
/**
* Strategy for caching the intermediate results for knowledge sources
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_INTERMEDIATE_FILES_STRATEGY: IntermediateFilesStrategy;
/**
* The maximum number of (LLM) tasks running in parallel
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_MAX_PARALLEL_COUNT = 5;
/**
* The maximum number of attempts to execute LLM task before giving up
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_MAX_EXECUTION_ATTEMPTS = 7;
/**
* The maximum depth to which knowledge sources will be scraped when building a knowledge base.
* This prevents infinite recursion and limits resource usage.
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3;
/**
* The maximum total number of knowledge sources that will be scraped in a single operation.
* This acts as a global limit to avoid excessive resource consumption.
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = 200;
/**
* Where to store your books
* This is kind of a "src" for your books
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_BOOKS_DIRNAME = "./books";
/**
* Where to store the temporary downloads
*
* Note: When the folder does not exist, it is created recursively
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_DOWNLOAD_CACHE_DIRNAME = "./.promptbook/download-cache";
/**
* Where to store the cache of executions for promptbook CLI
*
* Note: When the folder does not exist, it is created recursively
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_EXECUTION_CACHE_DIRNAME = "./.promptbook/execution-cache";
/**
* Where to store the scrape cache
*
* Note: When the folder does not exist, it is created recursively
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_SCRAPE_CACHE_DIRNAME = "./.promptbook/scrape-cache";
/**
* Id of application for the CLI when using remote server
*
* @public exported from `@promptbook/core`
*/
export declare const CLI_APP_ID: string_app_id;
/**
* Id of application for the playground
*
* @public exported from `@promptbook/core`
*/
export declare const PLAYGROUND_APP_ID: string_app_id;
/**
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME = "index";
/**
* The thresholds for the relative time in the `moment` NPM package.
*
* @see https://momentjscom.readthedocs.io/en/latest/moment/07-customization/13-relative-time-threshold/
* @private within the repository - too low-level in comparison with other constants
*/
export declare const MOMENT_ARG_THRESHOLDS: {
readonly ss: 3;
};
/**
* Default remote server URL for the Promptbook
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_REMOTE_SERVER_URL: string_promptbook_server_url;
/**
* Default settings for parsing and generating CSV files in Promptbook.
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_CSV_SETTINGS: CsvSettings;
/**
* Controls whether verbose logging is enabled by default throughout the application.
*
* @public exported from `@promptbook/core`
*/
export declare let DEFAULT_IS_VERBOSE: boolean;
/**
* Enables or disables verbose logging globally at runtime.
*
* Note: This is an experimental feature.
*
* @public exported from `@promptbook/core`
*/
export declare function SET_IS_VERBOSE(isVerbose: boolean): void;
/**
* Controls whether auto-installation of dependencies is enabled by default.
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_IS_AUTO_INSTALLED = false;
/**
* Function name for generated function via `ptbk make` to get the pipeline collection
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME = "getPipelineCollection";
/**
* Default rate limits (requests per minute)
*
* Note: Adjust based on the provider tier you are have
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_MAX_REQUESTS_PER_MINUTE = 60;
/**
* Indicates whether pipeline logic validation is enabled. When true, the pipeline logic is checked for consistency.
*
* @private within the repository
*/
export declare const IS_PIPELINE_LOGIC_VALIDATED: boolean;
/**
* Indicates whether cost-prevention is enabled. When true, real API keys are prevented from being used in tests.
*
* @private within the repository
*/
export declare const IS_COST_PREVENTED: boolean;
/**
* Note: [💞] Ignore a discrepancy between file name and entity name
* TODO: [🧠][🧜♂️] Maybe join remoteServerUrl and path into single value
*/