diff --git a/llmflowoptimizer/component/model/sample_qa.py b/llmflowoptimizer/component/model/sample_qa.py index 2df73a3..5b33055 100644 --- a/llmflowoptimizer/component/model/sample_qa.py +++ b/llmflowoptimizer/component/model/sample_qa.py @@ -26,7 +26,6 @@ def __init__( self.text_splitter = text_splitter self.text_loader = TextLoader(data_path) self.llm = llm - # embedding should not be on __init__ for testing, because it call embedding function and it might need api-key. self.index = VectorstoreIndexCreator( embedding=self.embedding, text_splitter=self.text_splitter ).from_loaders([self.text_loader]) diff --git a/notebooks/LLMFlowOptimizer_tutorial_notebook.ipynb b/notebooks/LLMFlowOptimizer_tutorial_notebook.ipynb index 23fce3e..cf0b295 100644 --- a/notebooks/LLMFlowOptimizer_tutorial_notebook.ipynb +++ b/notebooks/LLMFlowOptimizer_tutorial_notebook.ipynb @@ -5,9 +5,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# This is tutorial notebook for LLMFlowOptimizer\n", + "# This is colab tutorial notebook for LLMFlowOptimizer\n", + "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Yongtae723/LLMFlowOptimizer/blob/main/notebooks/LLMFlowOptimizer_tutorial_notebook.ipynb)\n", + "\n", "LLMFlowOptimizer is made for treating component of LLMFlow as parameter and optimizing the parameters.\n", "\n", + "\n", "![concept_image](https://github.com/Yongtae723/LLMFlowOptimizer/blob/main/documents/image/concept.png?raw=true)\n", "\n", "We assume LLMFlowOptimizer is used as repository scale, but you can experience flow and concept of LLMFlowOptimizer in this notebook. " @@ -101,7 +104,6 @@ " self.text_splitter = text_splitter\n", " self.text_loader = TextLoader(data_path)\n", " self.llm = llm\n", - " # embedding should not be on __init__ for testing, because it call embedding function and it might need api-key.\n", " self.index = VectorstoreIndexCreator(\n", " embedding=self.embedding, text_splitter=self.text_splitter\n", " ).from_loaders([self.text_loader])\n", @@ -221,7 +223,7 @@ "\n", "\n", "def load_hydra_config():\n", - " with initialize(version_base=\"1.3\", config_path=\"../configs\"):\n", + " with initialize(version_base=\"1.3\", config_path=\"configs\"):\n", " cfg = compose(config_name=\"run.yaml\", return_hydra_config=True, overrides=[])\n", " with open_dict(cfg):\n", " cfg.paths.root = str(rootutils.find_root(indicator=\".project-root\"))\n", @@ -451,8 +453,8 @@ "source": [ "# If you like this projectđź’–\n", "\n", - "if you like this project, you can use this project as a template for your own project.\n", - "Push `Use this template` button on the top of this repo, then you can create your own project based on this project." + "if you like this project, you can use [this project](https://github.com/Yongtae723/LLMFlowOptimizer/blob/main/notebooks/tutorial_notebook.ipynb) as a template for your own project.\n", + "Push `Use this template` button on the top of [this repo](https://github.com/Yongtae723/LLMFlowOptimizer/blob/main/notebooks/tutorial_notebook.ipynb), then you can create your own project based on this project." ] }, {