mirror of
https://github.com/sqlchat/sqlchat.git
synced 2026-03-13 07:59:44 +08:00
13 lines
323 B
TypeScript
13 lines
323 B
TypeScript
import { ChatCompletionResponseMessage, Configuration, OpenAIApi } from "openai";
|
|
|
|
export interface ChatCompletionResponse {
|
|
message: ChatCompletionResponseMessage;
|
|
}
|
|
|
|
const configuration = new Configuration({
|
|
apiKey: process.env.OPENAI_API_KEY,
|
|
});
|
|
const openai = new OpenAIApi(configuration);
|
|
|
|
export default openai;
|