refactoring

This commit is contained in:
VinciGit00 2024-02-25 10:45:13 +01:00
parent 8f90feff36
commit 9d6fcf7882

View File

@ -66,10 +66,8 @@ class GraphBuilder:
}
# Update defaults with any LLM parameters that were provided
llm_params = {**llm_defaults, **self.llm_config}
# Ensure the api_key is set, raise an error if it's not
if "api_key" not in llm_params:
raise ValueError("LLM configuration must include an 'api_key'.")
# Create the OpenAI instance with the provided and default parameters
return OpenAI(llm_params)
def _generate_nodes_description(self):