30 lines
667 B
TypeScript
30 lines
667 B
TypeScript
import { Conversation } from './classes.conversation.js';
|
|
import * as plugins from './plugins.js';
|
|
|
|
|
|
export interface ISmartAiOptions {
|
|
openaiToken: string;
|
|
anthropicToken: string;
|
|
}
|
|
|
|
export class SmartAi {
|
|
public options: ISmartAiOptions;
|
|
|
|
constructor(optionsArg: ISmartAiOptions) {
|
|
this.options = optionsArg;
|
|
}
|
|
|
|
/**
|
|
* creates an OpenAI conversation
|
|
*/
|
|
public async createOpenApiConversation() {
|
|
const conversation = await Conversation.createWithOpenAi(this);
|
|
}
|
|
|
|
/**
|
|
* creates an OpenAI conversation
|
|
*/
|
|
public async createAnthropicConversation() {
|
|
const conversation = await Conversation.createWithAnthropic(this);
|
|
}
|
|
} |