Skip to content

[Feature Request: More Customized HttpClient] Custom Logger Provided by User #409

@Stream29

Description

@Stream29

Feature Description

Make a constructor of OpenAI that can allow user providing custom httpClient config, including logging, etc.

Problem it Solves

Now I cannot apply my special logging logic to the httpClient.

Proposed Solution

Provide a constructor:

public fun OpenAI(httpClient: HttpClient): OpenAI {
val transport = HttpTransport(httpClient)
return OpenAIApi(transport)
}

And mark it with @DelicateOpenAiApi so that it won't be accidentially used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions