Skip to content

feat: Add the possibility to set log verbosity programatically #558

@philippart-s

Description

@philippart-s

Hi,

If I'm not mistaken, the only way to configure the log detail level today is to set the OPENAI_LOG environment variable before launching the application.

I think it would be practical to add a way in the client to enable logging, for example:

OpenAIClient client = OpenAIOkHttpClient.builder()
            .apiKey(System.getenv("xxx"))
            .baseUrl(System.getenv("xxx"))
            .logRequest(true) // or logLevel(Log.DEBUG) 
            .build();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions