From f1e2041f077c7078b51da2e12fe3724fd2978976 Mon Sep 17 00:00:00 2001 From: Alonso Guevara Date: Fri, 23 May 2025 08:07:09 -0600 Subject: [PATCH] Fix/drift search reduce (#1948) * Fix Reduce Response for non streaming calls * Semver --- .semversioner/next-release/patch-20250522234310308717.json | 4 ++++ graphrag/query/structured_search/drift_search/search.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .semversioner/next-release/patch-20250522234310308717.json diff --git a/.semversioner/next-release/patch-20250522234310308717.json b/.semversioner/next-release/patch-20250522234310308717.json new file mode 100644 index 00000000..2c36e56f --- /dev/null +++ b/.semversioner/next-release/patch-20250522234310308717.json @@ -0,0 +1,4 @@ +{ + "type": "patch", + "description": "Fix Drift Reduce Response for non streaming calls" +} diff --git a/graphrag/query/structured_search/drift_search/search.py b/graphrag/query/structured_search/drift_search/search.py index 10d62343..a452cf1d 100644 --- a/graphrag/query/structured_search/drift_search/search.py +++ b/graphrag/query/structured_search/drift_search/search.py @@ -386,7 +386,7 @@ class DRIFTSearch(BaseSearch[DRIFTSearchContextBuilder]): model_response = await self.model.achat( prompt=query, history=search_messages, - model_parameters=llm_kwargs, + model_parameters=llm_kwargs.get("model_params", {}), ) reduced_response = model_response.output.content