tjardoo / openai-client

OpenAI Dive is an unofficial async Rust library that allows you to interact with the OpenAI API.
https://crates.io/crates/openai_dive
MIT License
47 stars 19 forks source link

shouldn't this be pub ? #95

Closed Marlinski closed 3 weeks ago

Marlinski commented 4 weeks ago

https://github.com/tjardoo/openai-client/blob/cefc5819b2264e6b77992be330299bf3b1bd68a7/openai_dive/src/v1/resources/shared.rs#L22

because this field is not public I cannot instantiate Usage manually like so:

        usage: Some(Usage {
            prompt_tokens,
            completion_tokens: Some(0),
            total_tokens: prompt_tokens,
            prompt_tokens_details: None,
            completion_tokens_details: None
        }),