Skip to content

Commit

Permalink
change llm_to_use to llm
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna-Xiong committed Feb 13, 2024
1 parent 1778be8 commit 0e5a5d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vizro-ai/src/vizro_ai/_vizro_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, model_name: str = "gpt-3.5-turbo-0613", temperature: int = 0)
temperature: Temperature parameter for LLM.
"""
self.llm_to_use = self.model_constructor.get_llm_model(model_name, temperature)
self.llm = self.model_constructor.get_llm_model(model_name, temperature)
self.components_instances = {}
logger.info(
f"You have selected {model_name},"
Expand All @@ -38,13 +38,13 @@ def __init__(self, model_name: str = "gpt-3.5-turbo-0613", temperature: int = 0)
self._set_task_pipeline_llm()

def _set_task_pipeline_llm(self) -> None:
self.pipeline_manager.llm = self.llm_to_use
self.pipeline_manager.llm = self.llm

# TODO delete after adding debug in pipeline
def _lazy_get_component(self, component_class: Any) -> Any: # TODO configure component_class type
"""Lazy initialization of components."""
if component_class not in self.components_instances:
self.components_instances[component_class] = component_class(llm=self.llm_to_use)
self.components_instances[component_class] = component_class(llm=self.llm)
return self.components_instances[component_class]

def _run_plot_tasks(
Expand Down

0 comments on commit 0e5a5d7

Please sign in to comment.