We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec3f6a1 commit be0e41eCopy full SHA for be0e41e
backend/configuration.py
@@ -19,13 +19,10 @@ def _update_configurable_for_backwards_compatibility(
19
if "k" in configurable:
20
update["search_kwargs"] = {"k": configurable["k"]}
21
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
- ]
+ if "model_name" in configurable:
+ update["response_model"] = MODEL_NAME_TO_RESPONSE_MODEL.get(
+ configurable["model_name"], configurable["model_name"]
+ )
29
30
if update:
31
return {**configurable, **update}
0 commit comments