diff --git a/python/src/gpt/agents/retrieval_agent/retrieval_agent.py b/python/src/gpt/agents/retrieval_agent/retrieval_agent.py index cb33728..3909f58 100644 --- a/python/src/gpt/agents/retrieval_agent/retrieval_agent.py +++ b/python/src/gpt/agents/retrieval_agent/retrieval_agent.py @@ -190,7 +190,7 @@ def create_retrieval_qa( verbose=True ) else: - if isinstance(vector_store, AzureSearch): + if filter and isinstance(vector_store, AzureSearch): filter_dict = {'filters': f"{list(filter.keys())[0]} eq '{list(filter.values())[0]}'"} else: filter_dict = {'filter': filter} diff --git a/python/tests/manual_integration/test.py b/python/tests/manual_integration/test.py index 6af5bed..4833708 100644 --- a/python/tests/manual_integration/test.py +++ b/python/tests/manual_integration/test.py @@ -386,8 +386,7 @@ def test_retrieve(): ) print(qa( inputs={ - "input": "I can't decide between the Electra Townie Go! and the Sun Bicycles Electrolite. Could you tell me how they compare in terms of their weight?", - #"input": "What is the weight limit of the Electra Townie Go?", + "input": "What is the weight limit of the Electra Townie Go?", "context": "" })["output"]["answer"])