fork of hey-api/openapi-ts because I need some additional things
1// This file is auto-generated by @hey-api/openapi-ts
2
3import { type ClientOptions, type Config, createClient, createConfig } from './client';
4import type { ClientOptions as ClientOptions2 } from './types.gen';
5
6/**
7 * The `createClientConfig()` function will be called on client initialization
8 * and the returned object will become the client's initial configuration.
9 *
10 * You may want to initialize your client this way instead of calling
11 * `setConfig()`. This is useful for example if you're using Next.js
12 * to ensure your client always has the correct values.
13 */
14export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
15
16export const client = createClient(createConfig<ClientOptions2>({ baseUrl: 'https://api.openai.com/v1' }));