Skip to content

Commit be0e41e

Browse files
committed
update configuration
1 parent ec3f6a1 commit be0e41e

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

backend/configuration.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,10 @@ def _update_configurable_for_backwards_compatibility(
1919
if "k" in configurable:
2020
update["search_kwargs"] = {"k": configurable["k"]}
2121

22-
if (
23-
"model_name" in configurable
24-
and configurable["model_name"] in MODEL_NAME_TO_RESPONSE_MODEL
25-
):
26-
update["response_model"] = MODEL_NAME_TO_RESPONSE_MODEL[
27-
configurable["model_name"]
28-
]
22+
if "model_name" in configurable:
23+
update["response_model"] = MODEL_NAME_TO_RESPONSE_MODEL.get(
24+
configurable["model_name"], configurable["model_name"]
25+
)
2926

3027
if update:
3128
return {**configurable, **update}

0 commit comments

Comments
 (0)