woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
277 stars 135 forks source link

Improve Error Messaging in Product Creation with AI for 'finish_reason' parameter in API Responses #11930

Open pmusolino opened 3 months ago

pmusolino commented 3 months ago

During the development of new prompts (context: pe5sF9-2UY) and experiments with the GPT-4 API, it has come to my attention that the 'finish_reason' parameter can sometimes return the value "length," indicating that the AI had more to say but was cut off due to token limitations. This scenario leads to incomplete responses, which can cause confusion for users due to the generic nature of the error message currently being displayed.

The purpose of this issue is to enhance the user experience by providing clearer, more informative error messages when the 'finish_reason' parameter indicates an incomplete output or other errors. By doing so, we aim to give users a better understanding of why their response was truncated and what actions they can take to remedy the situation.

Delving deeper, the parameter finish_reason can yield these responses:

iOS issue: https://github.com/woocommerce/woocommerce-ios/issues/13259

dangermattic commented 3 months ago

🚫 Please add a type label (e.g. type: enhancement) and a feature label (e.g. feature: stats) to this issue.