@promptbook/azure-openai
Version:
Promptbook: Run AI apps in plain human language across multiple models and platforms
37 lines (36 loc) • 1.69 kB
TypeScript
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
import type { ChatPromptResult } from '../../execution/PromptResult';
import type { Prompt } from '../../types/Prompt';
import type { string_markdown } from '../../types/typeAliases';
import type { string_markdown_text } from '../../types/typeAliases';
import type { string_title } from '../../types/typeAliases';
import type { OpenAiAssistantExecutionToolsOptions } from './OpenAiAssistantExecutionToolsOptions';
import { OpenAiExecutionTools } from './OpenAiExecutionTools';
/**
* Execution Tools for calling OpenAI API Assistants
*
* This is useful for calling OpenAI API with a single assistant, for more wide usage use `OpenAiExecutionTools`.
*
* @public exported from `@promptbook/openai`
*/
export declare class OpenAiAssistantExecutionTools extends OpenAiExecutionTools implements LlmExecutionTools {
private readonly assistantId;
/**
* Creates OpenAI Execution Tools.
*
* @param options which are relevant are directly passed to the OpenAI client
*/
constructor(options: OpenAiAssistantExecutionToolsOptions);
get title(): string_title & string_markdown_text;
get description(): string_markdown;
/**
* Calls OpenAI API to use a chat model.
*/
callChatModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements' | 'format'>): Promise<ChatPromptResult>;
}
/**
* TODO: [🧠][🧙♂️] Maybe there can be some wizard for those who want to use just OpenAI
* TODO: Maybe make custom OpenAiError
* TODO: [🧠][🈁] Maybe use `isDeterministic` from options
* TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
*/