Spaces:
Runtime error
Runtime error
File size: 338 Bytes
65567a2 2f65818 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import { Configuration, OpenAIApi } from "openai";
import process from "node:process";
export const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
export const openai = new OpenAIApi(configuration);
export const createClient = (apiKey: string) => {
return new OpenAIApi(new Configuration({ apiKey }));
};
|