instructlab / sdg

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

fix: use all prompts in a batch to generate data #31

Open chudegao opened 1 week ago

chudegao commented 1 week ago

The original code in openai_completion() only use the first prompt and missed last 4 of a batch(default is 5) prompts. The fix is adding an extra loop to use all prompts of the batch to call openai chat completion api to generate data.