Azure-Samples / rag-postgres-openai-python

A RAG app to ask questions about rows in a database table. Deployable on Azure Container Apps with PostgreSQL Flexible Server.
MIT License
106 stars 17 forks source link

Workaround for older model that doesnt specify required param #51

Closed pamelafox closed 1 week ago

pamelafox commented 1 week ago

Purpose

It appears that gpt-3.5-turbo 0613 doesn't specify required parameters as reliably as newer models, especially with other parameters being specified, which was breaking calls that involved filters. So this change means it will always default to the original user_query if no search_query was found in the parameters.

Does this introduce a breaking change?

When developers merge from main and run the server, azd up, or azd deploy, will this produce an error? If you're not sure, try it out on an old environment.

[ ] Yes
[X] No

Type of change

[X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

Code quality checklist

See CONTRIBUTING.md for more details.

:( no tests ye