github-actions[bot]
Sync to HuggingFace Spaces
f152ae2
raw
history blame contribute delete
338 Bytes
import OpenAI, { type 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 },
});
}