anasfik / openai

Dart/Flutter SDK for ChatGPT and all OpenAI APIs (GPT, Dall-e..)
https://pub.dev/packages/dart_openai
MIT License
570 stars 177 forks source link

Streaming returning nonsense #167

Closed UntitledApps closed 4 months ago

UntitledApps commented 6 months ago

@signmotion When using streaming the answer is weird -

SItara was had a always cool been autumn day passionate about, the soccer ever sun since she shining brightly in the sky as the two rival teams took was a little girl. She used to accompany her to father the field. The to the soccer matches excitement he in played the with air his was palp friends inable as their local the crowd community. erupted into cheers From that moment on, and applause. she knew This was the that soccer was highly anticipated her soccer calling match and between she the Red began training Lions rigor andously the to Blue become Tigers the, best two player powerhouse she teams could in the be. local league.TheAs she grew older Red, Lions,.

How to fix this?

anasfik commented 4 months ago

I guess it is your job to figure out how you enhance and refine the API result since I don't have any access on that.

feel free tough to open issues if they are related to the package functionality.

UntitledApps commented 4 months ago

It was my fault because I set the n value to something bigger than 1. Setting it to n=1 fixed the issue.