instructlab / sdg

Python library for Synthetic Data Generation
Apache License 2.0
5 stars 13 forks source link

reduce number of arguments in openai_completion and openai_completion #37

Open makelinux opened 6 days ago

makelinux commented 6 days ago

Several functions passes trough six argument verbatim to OpenAI client creation. It causes to very long argument lists and increases technological debt.

Pass OpenAI client object instead of those six arguments to reduce duplicated code and increase repeatability.

TODO: perform the same optimization with generate_data and cli too.

Signed-off-by: Costa Shulyupin costa.shul@redhat.com