Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tutorials/30_File_Type_Preprocessing_Index_Pipeline.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"id": "I06qdWsZibSz"
},
"source": [
"Now, let's build a RAG pipeline that answers queries based on the documents you just created in the section above. For this step, we will be using the [`HuggingFaceAPIChatGenerator`](https://docs.haystack.deepset.ai/docs/huggingfaceapichatgenerator) so must have a [Hugging Face API Key](https://huggingface.co/settings/tokens) for this section. We will be using the `Qwen/Qwen3-4B-Instruct-2507` model."
"Now, let's build a RAG pipeline that answers queries based on the documents you just created in the section above. For this step, we will be using the [`HuggingFaceAPIChatGenerator`](https://docs.haystack.deepset.ai/docs/huggingfaceapichatgenerator) so must have a [Hugging Face API Key](https://huggingface.co/settings/tokens) for this section. We will be using the `google/gemma-4-26B-A4B-it` model with the `deepinfra` provider."
]
},
{
Expand Down Expand Up @@ -409,7 +409,7 @@
" \"llm\",\n",
" HuggingFaceAPIChatGenerator(\n",
" api_type=\"serverless_inference_api\",\n",
" api_params={\"model\": \"Qwen/Qwen3-4B-Instruct-2507\", \"provider\": \"nscale\"},\n",
" api_params={\"model\": \"google/gemma-4-26B-A4B-it\", \"provider\": \"deepinfra\"},\n",
" generation_kwargs={\"max_tokens\": 1024},\n",
" ),\n",
")\n",
Expand Down Expand Up @@ -449,7 +449,7 @@
"id": "ZJueu_V4KP6w"
},
"source": [
"{'llm': {'replies': [ChatMessage(_role=<ChatRole.ASSISTANT: 'assistant'>, _content=[TextContent(text='To make **vegan keto eggplant lasagna**, **vegan persimmon flan**, and **vegan hemp cheese**, based on the provided context, here are the required ingredients for each dish:\\n\\n---\\n\\n### 🥘 **Vegan Keto Eggplant Lasagna**\\n\\n**Ingredients:**\\n- 2 large eggplants \\n- A lot of salt (to draw out water; rub both sides) \\n- 1/3 cup pesto (made with: 4 oz basil, 1/4 cup almonds, 1/4 cup nutritional yeast, 1/4 cup olive oil) \\n- 1/2 cup store-bought vegan mozzarella (or optional layer of Violife shredded mozz or Miyoko’s) \\n- 1 recipe spinach tofu ricotta (made with: 14 oz firm/extra firm tofu, 10 oz spinach, 1 tsp garlic powder, juice of 1/2 lemon, salt to taste) \\n- Optional: 1 layer of store-bought vegan cheese on top \\n\\n**Notes:** \\n- Eggplant is roasted, salted, and then layered with pesto, cheese, and spinach tofu ricotta. \\n- The dish is keto-friendly due to the use of minimal carbohydrates (spinach and tofu are low-carb, and pesto/nutritional yeast are low in net carbs). \\n- Do not freeze eggplant; store in fridge for up to a few days.\\n\\n---\\n\\n### 🥣 **Vegan Persimmon Flan**\\n\\n**Ingredients:**\\n- ½ cup persimmon pulp (strained from 2 average-sized fuyu persimmons; seeds removed) \\n- 1 tbsp cornstarch \\n- ½ tsp agar agar \\n- 1 tbsp agave nectar (or to taste) \\n- 2 tbsp granulated sugar \\n- ¼ cup coconut cream \\n- ½ cup almond milk \\n- ½ tsp vanilla \\n\\n**Notes:** \\n- Cook the mixture in a saucepan, bring to a boil, and simmer. \\n- Cool slightly, stir in vanilla, then refrigerate for at least 4 hours or overnight. \\n- Serves 2 (written during pandemic, so small batch). \\n- This is a low-carb, keto-friendly dessert option.\\n\\n---\\n\\n### 🥛 **Vegan Hemp Cheese** (Note: This is a *hemp-based* cheese, not from the macadamia nut cheese)\\n\\n**Ingredients:**\\n- ½ cup sunflower seeds (soaked overnight or boiled for 15 minutes) \\n- ½ cup hemp hearts \\n- 1.5 teaspoons miso paste \\n- 1 tsp nutritional yeast \\n- ¼ cup rejuvelac \\n- 1/4 tsp salt (or to taste) \\n\\n**Instructions (from context):** \\n- Blend all ingredients in a blender or food processor. \\n- Transfer to a clean glass bowl, cover with a dish towel and rubber band. \\n- Culture at room temperature (not in direct sunlight) for 24–48 hours. \\n- The cheese will become tangy, like sourdough bread. \\n\\n**Note:** This is a fermented, low-carb, plant-based cheese. It’s not keto-friendly in large amounts due to carbs from seeds and miso, but it can be consumed in small portions. \\n\\n---\\n\\n### ✅ Final Answer:\\n\\n**Ingredients needed:**\\n\\n#### For **Vegan Keto Eggplant Lasagna**:\\n- 2 large eggplants \\n- Salt (a lot) \\n- 1/3 cup pesto (basil, almonds, nutritional yeast, olive oil) \\n- 1/2 cup store-bought vegan mozzarella (e.g., Violife or Miyoko’s) \\n- 14 oz firm tofu \\n- 10 oz spinach \\n- 1 tsp garlic powder \\n- Juice of 1/2 lemon \\n- Salt to taste \\n\\n#### For **Vegan Persimmon Flan**:\\n- ½ cup persimmon pulp (from 2 fuyu persimmons) \\n- 1 tbsp cornstarch \\n- ½ tsp agar agar \\n- 1 tbsp agave nectar \\n- 2 tbsp granulated sugar \\n- ¼ cup coconut cream \\n- ½ cup almond milk \\n- ½ tsp vanilla \\n\\n#### For **Vegan Hemp Cheese**:\\n- ½ cup sunflower seeds (soaked or boiled) \\n- ½ cup hemp hearts \\n- 1.5 tsp miso paste \\n- 1 tsp nutritional yeast \\n- ¼ cup rejuvelac \\n- 1/4 tsp salt \\n\\n> ✅ All dishes are vegan. The eggplant lasagna is keto-friendly due to low-carb ingredients. The flan and hemp cheese are also low-carb, though the hemp cheese has some carbs from seeds and miso. \\n\\nThis combination gives a balanced, plant-based, and keto-friendly meal and dessert pairing.')], _name=None, _meta={'model': 'Qwen/Qwen3-4B-Instruct-2507', 'finish_reason': 'stop', 'index': 0, 'usage': {'prompt_tokens': 2010, 'completion_tokens': 1023}})]}}"
"{'llm': {'replies': [ChatMessage(_role=<ChatRole.ASSISTANT: 'assistant'>, _content=[TextContent(text=\"Based on the context provided, here are the ingredients needed for each recipe:\\n\\n**Vegan Keto Eggplant Lasagna**\\n* **For the eggplant:** 2 large eggplants, a lot of salt, and olive oil.\\n* **For the Pesto:** 4 oz basil, 1/4 cup almonds, 1/4 cup nutritional yeast, and 1/4 cup olive oil.\\n* **For the Spinach Tofu Ricotta/Cheese:** 14 oz firm or extra firm tofu, 10 oz spinach, juice of 1 lemon, 1 tsp garlic powder, and salt to taste.\\n* **For Macadamia Nut Cheese:** 1 cup macadamia nuts (unsalted unroasted recommended).\\n* **Optional topping:** Store-bought vegan mozzarella (such as Violife shredded mozz or Miyoko's).\\n\\n**Vegan Persimmon Flan**\\n* ½ cup persimmon pulp (strained from approximately 2 average sized fuyu persimmons)\\n* 1 tbsp cornstarch\\n* ½ tsp agar agar\\n* 1 tbsp agave nectar (or to taste)\\n* 2 tbsp granulated sugar\\n* ¼ cup coconut creme\\n* ½ cup almond milk\\n* ½ tsp vanilla\\n\\n**Vegan Hemp Cheese**\\n* ½ cup sunflower seeds\\n* ½ cup hemp hearts\\n* 1.5 teaspoons miso paste\\n* 1 tsp nutritional yeast\\n* ¼ cup rejuvelac\\n* 1/4 teaspoon salt (or to taste)\")], _name=None, _meta={'model': 'google/gemma-4-26B-A4B-it', 'finish_reason': 'stop', 'index': 0, 'usage': {'prompt_tokens': 1957, 'completion_tokens': 322}})]}}"
]
},
{
Expand Down
Loading