@microsoft/botbuilder-m365
Version:
M365 extensions for Microsoft BotBuilder, Alpha release.
39 lines • 1.59 kB
TypeScript
/**
* @module botbuilder-m365
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Planner, Plan } from './Planner';
import { TurnState } from './TurnState';
import { DefaultTurnState } from './DefaultTurnStateManager';
import { TurnContext } from 'botbuilder';
import { OpenAIClient } from './OpenAIClients';
import { ConfiguredAIOptions } from './AI';
import { PromptTemplate } from './Prompts';
export interface OpenAIPlannerOptions {
apiKey: string;
organization?: string;
endpoint?: string;
defaultModel: string;
oneSayPerTurn?: boolean;
useSystemMessage?: boolean;
logRequests?: boolean;
}
export declare class OpenAIPlanner<TState extends TurnState = DefaultTurnState, TOptions extends OpenAIPlannerOptions = OpenAIPlannerOptions> implements Planner<TState> {
private readonly _options;
private readonly _client;
constructor(options: TOptions);
get options(): TOptions;
completePrompt(context: TurnContext, state: TState, prompt: PromptTemplate, options: ConfiguredAIOptions<TState>): Promise<string>;
generatePlan(context: TurnContext, state: TState, prompt: PromptTemplate, options: ConfiguredAIOptions<TState>): Promise<Plan>;
protected createClient(options: TOptions): OpenAIClient;
private getModel;
private createChatCompletionRequest;
private createCompletionRequest;
private patchStopSequences;
private createChatCompletion;
private createCompletion;
}
//# sourceMappingURL=OpenAIPlanner.d.ts.map