@promptbook/azure-openai
Version:
Promptbook: Run AI apps in plain human language across multiple models and platforms
79 lines (78 loc) • 2.97 kB
TypeScript
import type { ExecutionTools } from '../execution/ExecutionTools';
import type { PipelineExecutorResult } from '../execution/PipelineExecutorResult';
import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';
import type { PipelineString } from '../pipeline/PipelineString';
import type { InputParameters } from '../types/typeAliases';
import type { string_filename } from '../types/typeAliases';
import type { string_parameter_value } from '../types/typeAliases';
import type { string_pipeline_url } from '../types/typeAliases';
/**
* Options for wizard methods
*/
interface WizardOptions {
/**
* Whether to enable verbose logging
*/
isVerbose?: boolean;
}
/**
* Wizard for simple usage of the Promptbook
* Look at `wizard` for more details
*
* Note: This works only in Node.js environment and looks for the configuration, environment, tools and cache in the Node.js environment
*
* @private just for single instance
*/
declare class Wizard {
/**
* Run the book
*
* It can be loaded from:
* 1) As a file ./books/write-cv.book
* 2) As a URL https://promptbook.studio/hejny/write-cv.book found in ./books folder recursively
* 2) As a URL https://promptbook.studio/hejny/write-cv.book fetched from the internet
* 3) As a string
*
* Note: This works similar to the `ptbk run` command
*/
execute(book: string_pipeline_url | string_filename | PipelineString, inputParameters: InputParameters, options?: WizardOptions): Promise<{
/**
* Simple result of the execution
*/
result: string_parameter_value;
} & PipelineExecutorResult>;
private executionTools;
/**
* Provides the tools automatically for the Node.js environment
*
* @param options
*/
getExecutionTools(options?: WizardOptions): Promise<Required<Pick<ExecutionTools, 'fs' | 'fetch'>>>;
/**
* Load book from the source
*
* Pipelines can be loaded from:
* 1) As a file ./books/write-cv.book
* 2) As a URL https://promptbook.studio/hejny/write-cv.book found in ./books folder recursively
* 2) As a URL https://promptbook.studio/hejny/write-cv.book fetched from the internet
* 3) As a string
*
* @param pipelineSource
* @param options
*/
getCompiledBook(pipelineSource: string_filename | string_pipeline_url | PipelineString, options?: WizardOptions): Promise<PipelineJson>;
}
/**
* Wizard for simple usage of the Promptbook
*
* Note: This works only in Node.js environment and looks for the configuration, environment, tools and cache in the Node.js environment
*
* @singleton
* @public exported from `@promptbook/wizard`
*/
export declare const wizard: Wizard;
export {};
/**
* TODO: [🧠] Maybe some way how to handle the progress and streaming?
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
*/