From 4de890f258e3904b630859d2116ce04e367aadd4 Mon Sep 17 00:00:00 2001 From: Anton Sokolchenko Date: Mon, 21 Oct 2024 10:11:28 +0200 Subject: [PATCH] Update Multi-step research agent.ipynb with local embeddings example (#87) --- examples/Multi-step research agent.ipynb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/Multi-step research agent.ipynb b/examples/Multi-step research agent.ipynb index 53a71e5b..92aa554e 100644 --- a/examples/Multi-step research agent.ipynb +++ b/examples/Multi-step research agent.ipynb @@ -179,7 +179,12 @@ "MAX_ITER = 3\n", "ANSWER_LENGTH = 200\n", "\n", - "embeddings = OpenAIEmbedding(model=\"text-embedding-ada-002\")\n", + "# for local embeddings use from llama_index.embeddings.ollama import OllamaEmbedding\n", + "#ollama_embedding = OllamaEmbedding(\n", + "# model_name=\"nomic-embed-text\",\n", + "# base_url=\"http://localhost:11434\",\n", + "# ollama_additional_kwargs={\"mirostat\": 0},\n", + "#)\n", "llm = init_llm(LLMFramework.LANGCHAIN, llm_name=\"gpt-4o\")\n", "\n", "query_tool = SimpleRetrieverTool(DATA_DIR, PERSIST_DIR, return_strings_only=True, embeddings=embeddings)\n",