async-openai
async-openai copied to clipboard
Baseten.co: Add reasoning field for reasoning parser + grammar mode
Hey,
we @basetenlabs / @nvidia are using your crate to run validations and output return.
Two things are missing in the Rust crate over e.g. the Python types.
- https://github.com/openai/openai-python/blob/4ada66f8f86473f342aa032ed021b62180422dc1/src/openai/types/shared/response_format_text_grammar.py#L10
grammarfield. - adds the reasoning field for the reasoning content https://openrouter.ai/docs/use-cases/reasoning-tokens
Thanks for the PR, however please see contribution guidelines for the scope of crate.
You can achieve this with combination of byot feature and Serde https://serde.rs/attr-flatten.html#struct-flattening to re-use/expand existing types.
@64bit Do you have guidelines ? looked on crates.io and a contribution.md
Its in the readme: https://github.com/64bit/async-openai?tab=readme-ov-file#contributing