{ FetchClient } from "./abstractFetchClient"; export class OpenAI extends FetchClient { public constructor(apiKey: string) { super("https://api.openai.com/v1", apiKey) } public async createChatCompletion(body: CreateChatCompletionRequest): Promise<CreateChatCompletionResponse> { const result = await this._fetch<CreateChatCompletionResponse>(`${this.baseURL}/chat/completions`, { method: "POST", body: JSON.stringify(body) }) return result } }