Spaces:
Running
Running
File size: 333 Bytes
6b3405c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import OpenAI, { ClientOptions } from "openai";
export function getOpenAiClient({
baseURL,
apiKey,
}: {
baseURL: ClientOptions["baseURL"];
apiKey: ClientOptions["apiKey"];
}) {
return new OpenAI({
baseURL,
apiKey,
dangerouslyAllowBrowser: true,
defaultHeaders: { "X-Stainless-Retry-Count": null },
});
}
|