You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
msg=f"auth_type of azure_managed_identity is not supported for model type {self.type.value}. Please rerun `graphrag init` and set the auth_type to api_key."
77
+
msg=f"auth_type of azure_managed_identity is not supported for model type {self.type}. Please rerun `graphrag init` and set the auth_type to api_key."
77
78
raiseConflictingSettingsError(msg)
78
79
79
-
type: ModelType=Field(description="The type of LLM model to use.")
80
+
type: ModelType|str=Field(description="The type of LLM model to use.")
81
+
82
+
def_validate_type(self) ->None:
83
+
"""Validate the model type.
84
+
85
+
Raises
86
+
------
87
+
KeyError
88
+
If the model name is not recognized.
89
+
"""
90
+
# Type should be contained by the registered models
91
+
ifnotModelFactory.is_supported_model(self.type):
92
+
msg=f"Model type {self.type} is not recognized, must be one of {ModelFactory.get_chat_models() +ModelFactory.get_embedding_models()}."
93
+
raiseKeyError(msg)
94
+
80
95
model: str=Field(description="The LLM model to use.")
0 commit comments