mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-07-28 17:53:21 +08:00
14 lines
324 B
TypeScript
14 lines
324 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;
|