We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5031c2f commit 4226309Copy full SHA for 4226309
src/fastapi_app/query_rewriter.py
@@ -68,7 +68,7 @@ def extract_search_arguments(chat_completion: ChatCompletion):
68
if function.name == "search_database":
69
arg = json.loads(function.arguments)
70
search_query = arg.get("search_query")
71
- if "price_filter" in arg:
+ if "price_filter" in arg and arg["price_filter"]:
72
price_filter = arg["price_filter"]
73
filters.append(
74
{
@@ -77,7 +77,7 @@ def extract_search_arguments(chat_completion: ChatCompletion):
77
"value": price_filter["value"],
78
}
79
)
80
- if "brand_filter" in arg:
+ if "brand_filter" in arg and arg["brand_filter"]:
81
brand_filter = arg["brand_filter"]
82
83
0 commit comments