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.
validate_api_key
1 parent 6666c15 commit fe343d6Copy full SHA for fe343d6
src/ragas/metrics/base.py
@@ -118,7 +118,8 @@ def init_model(self):
118
to load all the models
119
Also check if the api key is valid for OpenAI and AzureOpenAI
120
"""
121
- self.llm.validate_api_key()
+ if hasattr(self.llm, "validate_api_key"):
122
+ self.llm.validate_api_key()
123
if hasattr(self, "embeddings"):
124
# since we are using Langchain Embeddings directly, we need to check this
125
if hasattr(self.embeddings, "validate_api_key"):
0 commit comments