Skip to content

Commit

Permalink
Generate en docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Milvus-doc-bot authored and Milvus-doc-bot committed Jan 13, 2025
1 parent 6234880 commit 3b034c4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"codeList":["C:\\>Invoke-WebRequest https://github.com/milvus-io/milvus/blob/master/scripts/standalone_embed.bat -OutFile standalone.bat​\n\n","C:\\>standalone.bat start​\nWait for Milvus starting...​\nStart successfully.​\nTo change the default Milvus configuration, edit user.yaml and restart the service.​\n\n","# Stop Milvus​\nC:\\>standalone.bat stop​\nStop successfully.​\n​\n# Delete Milvus container​\nC:\\>standalone.bat delete​\nDelete Milvus container successfully. # Container has been removed.​\nDelete successfully. # Data has been removed.​\n\n","C:\\>wsl --install​\nUbuntu already installed.​\nStarting Ubuntu...​\n\n","# Download the installation script​\n$ curl -sfL https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh -o standalone_embed.sh​\n​\n# Start the Docker container​\n$ bash standalone_embed.sh start​\n\n","$ bash standalone_embed.sh start​\nWait for Milvus Starting...​\nStart successfully.​\nTo change the default Milvus configuration, add your settings to the user.yaml file and then restart the service.​\n\n","# Stop Milvus​\n$ bash standalone_embed.sh stop​\nStop successfully.​\n​\n# Delete Milvus data​\n$ bash standalone_embed.sh stop​\nDelete Milvus container successfully.​\nDelete successfully.​\n\n","# Download the configuration file and rename it as docker-compose.yml​\nC:\\>Invoke-WebRequest https://github.com/milvus-io/milvus/releases/download/v2.4.15/milvus-standalone-docker-compose.yml -OutFile docker-compose.yml​\n​\n# Start Milvus​\nC:\\>docker compose up -d​\nCreating milvus-etcd ... done​\nCreating milvus-minio ... done​\nCreating milvus-standalone ... done​\n\n","C:\\>wsl --install​\nUbuntu already installed.​\nStarting Ubuntu...​\n\n","$ wget https://github.com/milvus-io/milvus/releases/download/v2.4.17/milvus-standalone-docker-compose.yml -O docker-compose.yml​\n\n","$ sudo docker compose up -d​\n​\nCreating milvus-etcd ... done​\nCreating milvus-minio ... done​\nCreating milvus-standalone ... done​\n\n","C:\\>net start com.docker.service​\nThe Docker for Windows Service service is starting.​\nThe Docker for Windows Service service was started successfully.​\n\n","C:\\>wsl --update​\nChecking for updates.​\nThe most recent version of Windows Subsystem for Linux is already installed.​\n\n","C:\\>cd \"C:\\Program Files\\Docker\\Docker\"​\nC:\\Program Files\\Docker\\Docker>.\\DockerCli.exe -SwitchDaemon​\nSwitching to windows engine: Post \"http://ipc/engine/switch\": open \\\\.\\pipe\\dockerBackendApiServer: The system cannot find the file specified.​\n\n"],"headingContent":"Run Milvus in Docker (Windows)","anchorList":[{"label":"Run Milvus in Docker (Windows)","href":"Run-Milvus-in-Docker-Windows","type":1,"isActive":false},{"label":"Prerequisites​","href":"Prerequisites​","type":2,"isActive":false},{"label":"Run Milvus in Docker​","href":"Run-Milvus-in-Docker​","type":2,"isActive":false},{"label":"Run Milvus with Docker Compose​","href":"Run-Milvus-with-Docker-Compose​","type":2,"isActive":false},{"label":"FAQs​","href":"FAQs​","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]}
{"codeList":["C:\\>Invoke-WebRequest https://raw.githubusercontent.com/milvus-io/milvus/refs/heads/master/scripts/standalone_embed.bat -OutFile standalone.bat​\n\n","C:\\>standalone.bat start​\nWait for Milvus starting...​\nStart successfully.​\nTo change the default Milvus configuration, edit user.yaml and restart the service.​\n\n","# Stop Milvus​\nC:\\>standalone.bat stop​\nStop successfully.​\n​\n# Delete Milvus container​\nC:\\>standalone.bat delete​\nDelete Milvus container successfully. # Container has been removed.​\nDelete successfully. # Data has been removed.​\n\n","C:\\>wsl --install​\nUbuntu already installed.​\nStarting Ubuntu...​\n\n","# Download the installation script​\n$ curl -sfL https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh -o standalone_embed.sh​\n​\n# Start the Docker container​\n$ bash standalone_embed.sh start​\n\n","$ bash standalone_embed.sh start​\nWait for Milvus Starting...​\nStart successfully.​\nTo change the default Milvus configuration, add your settings to the user.yaml file and then restart the service.​\n\n","# Stop Milvus​\n$ bash standalone_embed.sh stop​\nStop successfully.​\n​\n# Delete Milvus data​\n$ bash standalone_embed.sh stop​\nDelete Milvus container successfully.​\nDelete successfully.​\n\n","# Download the configuration file and rename it as docker-compose.yml​\nC:\\>Invoke-WebRequest https://github.com/milvus-io/milvus/releases/download/v2.4.15/milvus-standalone-docker-compose.yml -OutFile docker-compose.yml​\n​\n# Start Milvus​\nC:\\>docker compose up -d​\nCreating milvus-etcd ... done​\nCreating milvus-minio ... done​\nCreating milvus-standalone ... done​\n\n","C:\\>wsl --install​\nUbuntu already installed.​\nStarting Ubuntu...​\n\n","$ wget https://github.com/milvus-io/milvus/releases/download/v2.4.17/milvus-standalone-docker-compose.yml -O docker-compose.yml​\n\n","$ sudo docker compose up -d​\n​\nCreating milvus-etcd ... done​\nCreating milvus-minio ... done​\nCreating milvus-standalone ... done​\n\n","C:\\>net start com.docker.service​\nThe Docker for Windows Service service is starting.​\nThe Docker for Windows Service service was started successfully.​\n\n","C:\\>wsl --update​\nChecking for updates.​\nThe most recent version of Windows Subsystem for Linux is already installed.​\n\n","C:\\>cd \"C:\\Program Files\\Docker\\Docker\"​\nC:\\Program Files\\Docker\\Docker>.\\DockerCli.exe -SwitchDaemon​\nSwitching to windows engine: Post \"http://ipc/engine/switch\": open \\\\.\\pipe\\dockerBackendApiServer: The system cannot find the file specified.​\n\n"],"headingContent":"Run Milvus in Docker (Windows)","anchorList":[{"label":"Run Milvus in Docker (Windows)","href":"Run-Milvus-in-Docker-Windows","type":1,"isActive":false},{"label":"Prerequisites​","href":"Prerequisites​","type":2,"isActive":false},{"label":"Run Milvus in Docker​","href":"Run-Milvus-in-Docker​","type":2,"isActive":false},{"label":"Run Milvus with Docker Compose​","href":"Run-Milvus-with-Docker-Compose​","type":2,"isActive":false},{"label":"FAQs​","href":"FAQs​","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ title: Run Milvus in Docker (Linux)
<ol>
<li><p>Open Docker Desktop in administrator mode by right-clicking and selecting <strong>Run as administrator</strong>.​</p></li>
<li><p>Download the installation script and save it as <code translate="no">standalone.bat</code>.​</p>
<pre><code translate="no" class="language-powershell"><span class="hljs-attr">C</span>:\&gt;<span class="hljs-title class_">Invoke</span>-<span class="hljs-title class_">WebRequest</span> <span class="hljs-attr">https</span>:<span class="hljs-comment">//github.com/milvus-io/milvus/blob/master/scripts/standalone_embed.bat -OutFile standalone.bat​</span>
<pre><code translate="no" class="language-powershell"><span class="hljs-attr">C</span>:\&gt;<span class="hljs-title class_">Invoke</span>-<span class="hljs-title class_">WebRequest</span> <span class="hljs-attr">https</span>:<span class="hljs-comment">//raw.githubusercontent.com/milvus-io/milvus/refs/heads/master/scripts/standalone_embed.bat -OutFile standalone.bat​</span>

<button class="copy-code-btn"></button></code></pre></li>
<li><p>Run the downloaded script to start Milvus as a Docker container.​</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"codeList":["$ pip install llama-index langfuse llama-index-vector-stores-milvus --upgrade\n","import os\n\n# Get keys for your project from the project settings page\n# https://cloud.langfuse.com\nos.environ[\"LANGFUSE_PUBLIC_KEY\"] = \"\"\nos.environ[\"LANGFUSE_SECRET_KEY\"] = \"\"\nos.environ[\"LANGFUSE_HOST\"] = \"https://cloud.langfuse.com\" # 🇪🇺 EU region\n# os.environ[\"LANGFUSE_HOST\"] = \"https://us.cloud.langfuse.com\" # 🇺🇸 US region\n\n# Your openai key\nos.environ[\"OPENAI_API_KEY\"] = \"\"\n","from llama_index.core import Settings\nfrom llama_index.core.callbacks import CallbackManager\nfrom langfuse.llama_index import LlamaIndexCallbackHandler\n \nlangfuse_callback_handler = LlamaIndexCallbackHandler()\nSettings.callback_manager = CallbackManager([langfuse_callback_handler])\n","from llama_index.core import Document\n\ndoc1 = Document(text=\"\"\"\nMaxwell \"Max\" Silverstein, a lauded movie director, screenwriter, and producer, was born on October 25, 1978, in Boston, Massachusetts. A film enthusiast from a young age, his journey began with home movies shot on a Super 8 camera. His passion led him to the University of Southern California (USC), majoring in Film Production. Eventually, he started his career as an assistant director at Paramount Pictures. Silverstein's directorial debut, “Doors Unseen,” a psychological thriller, earned him recognition at the Sundance Film Festival and marked the beginning of a successful directing career.\n\"\"\")\ndoc2 = Document(text=\"\"\"\nThroughout his career, Silverstein has been celebrated for his diverse range of filmography and unique narrative technique. He masterfully blends suspense, human emotion, and subtle humor in his storylines. Among his notable works are \"Fleeting Echoes,\" \"Halcyon Dusk,\" and the Academy Award-winning sci-fi epic, \"Event Horizon's Brink.\" His contribution to cinema revolves around examining human nature, the complexity of relationships, and probing reality and perception. Off-camera, he is a dedicated philanthropist living in Los Angeles with his wife and two children.\n\"\"\")\n","# Example index construction + LLM query\n\nfrom llama_index.core import VectorStoreIndex\nfrom llama_index.core import StorageContext\nfrom llama_index.vector_stores.milvus import MilvusVectorStore\n\n\nvector_store = MilvusVectorStore(\n uri=\"tmp/milvus_demo.db\", dim=1536, overwrite=False\n)\nstorage_context = StorageContext.from_defaults(vector_store=vector_store)\n\nindex = VectorStoreIndex.from_documents(\n [doc1,doc2], storage_context=storage_context\n)\n","# Query\nresponse = index.as_query_engine().query(\"What did he do growing up?\")\nprint(response)\n","# Chat\nresponse = index.as_chat_engine().chat(\"What did he do growing up?\")\nprint(response)\n","# As we want to immediately see result in Langfuse, we need to flush the callback handler\nlangfuse_callback_handler.flush()\n"],"headingContent":"Cookbook - LlamaIndex & Milvus Integration","anchorList":[{"label":"Cookbook - LlamaIndex & Milvus Integration","href":"Cookbook---LlamaIndex--Milvus-Integration","type":1,"isActive":false},{"label":"Setup","href":"Setup","type":2,"isActive":false},{"label":"Index using Milvus Lite","href":"Index-using-Milvus-Lite","type":2,"isActive":false},{"label":"Query","href":"Query","type":2,"isActive":false},{"label":"Explore traces in Langfuse","href":"Explore-traces-in-Langfuse","type":2,"isActive":false},{"label":"Interested in more advanced features?","href":"Interested-in-more-advanced-features","type":2,"isActive":false}]}
{"codeList":["$ pip install llama-index langfuse llama-index-vector-stores-milvus --upgrade\n","import os\n\n# Get keys for your project from the project settings page\n# https://cloud.langfuse.com\nos.environ[\"LANGFUSE_PUBLIC_KEY\"] = \"\"\nos.environ[\"LANGFUSE_SECRET_KEY\"] = \"\"\nos.environ[\"LANGFUSE_HOST\"] = \"https://cloud.langfuse.com\" # 🇪🇺 EU region\n# os.environ[\"LANGFUSE_HOST\"] = \"https://us.cloud.langfuse.com\" # 🇺🇸 US region\n\n# Your openai key\nos.environ[\"OPENAI_API_KEY\"] = \"\"\n","from llama_index.core import Settings\nfrom llama_index.core.callbacks import CallbackManager\nfrom langfuse.llama_index import LlamaIndexCallbackHandler\n \nlangfuse_callback_handler = LlamaIndexCallbackHandler()\nSettings.callback_manager = CallbackManager([langfuse_callback_handler])\n","from llama_index.core import Document\n\ndoc1 = Document(text=\"\"\"\nMaxwell \"Max\" Silverstein, a lauded movie director, screenwriter, and producer, was born on October 25, 1978, in Boston, Massachusetts. A film enthusiast from a young age, his journey began with home movies shot on a Super 8 camera. His passion led him to the University of Southern California (USC), majoring in Film Production. Eventually, he started his career as an assistant director at Paramount Pictures. Silverstein's directorial debut, “Doors Unseen,” a psychological thriller, earned him recognition at the Sundance Film Festival and marked the beginning of a successful directing career.\n\"\"\")\ndoc2 = Document(text=\"\"\"\nThroughout his career, Silverstein has been celebrated for his diverse range of filmography and unique narrative technique. He masterfully blends suspense, human emotion, and subtle humor in his storylines. Among his notable works are \"Fleeting Echoes,\" \"Halcyon Dusk,\" and the Academy Award-winning sci-fi epic, \"Event Horizon's Brink.\" His contribution to cinema revolves around examining human nature, the complexity of relationships, and probing reality and perception. Off-camera, he is a dedicated philanthropist living in Los Angeles with his wife and two children.\n\"\"\")\n","# Example index construction + LLM query\n\nfrom llama_index.core import VectorStoreIndex\nfrom llama_index.core import StorageContext\nfrom llama_index.vector_stores.milvus import MilvusVectorStore\n\n\nvector_store = MilvusVectorStore(\n uri=\"tmp/milvus_demo.db\", dim=1536, overwrite=False\n)\nstorage_context = StorageContext.from_defaults(vector_store=vector_store)\n\nindex = VectorStoreIndex.from_documents(\n [doc1,doc2], storage_context=storage_context\n)\n","# Query\nresponse = index.as_query_engine().query(\"What did he do growing up?\")\nprint(response)\n","# Chat\nresponse = index.as_chat_engine().chat(\"What did he do growing up?\")\nprint(response)\n","# As we want to immediately see result in Langfuse, we need to flush the callback handler\nlangfuse_callback_handler.flush()\n"],"headingContent":"Using Langfuse to Trace Queries in RAG","anchorList":[{"label":"Using Langfuse to Trace Queries in RAG","href":"Using-Langfuse-to-Trace-Queries-in-RAG","type":1,"isActive":false},{"label":"Setup","href":"Setup","type":2,"isActive":false},{"label":"Index using Milvus Lite","href":"Index-using-Milvus-Lite","type":2,"isActive":false},{"label":"Query","href":"Query","type":2,"isActive":false},{"label":"Explore traces in Langfuse","href":"Explore-traces-in-Langfuse","type":2,"isActive":false},{"label":"Interested in more advanced features?","href":"Interested-in-more-advanced-features","type":2,"isActive":false}]}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ id: integrate_with_langfuse.md
summary: >-
This is a simple cookbook that demonstrates how to use the LlamaIndex Langfuse
integration. It uses Milvus Lite to store the documents and Query.
title: Cookbook LlamaIndex & Milvus Integration
title: Using Langfuse to Evaluate RAG Quality
---
<h1 id="Cookbook---LlamaIndex--Milvus-Integration" class="common-anchor-header">Cookbook - LlamaIndex &amp; Milvus Integration<button data-href="#Cookbook---LlamaIndex--Milvus-Integration" class="anchor-icon" translate="no">
<h1 id="Using-Langfuse-to-Trace-Queries-in-RAG" class="common-anchor-header">Using Langfuse to Trace Queries in RAG<button data-href="#Using-Langfuse-to-Trace-Queries-in-RAG" class="anchor-icon" translate="no">
<svg translate="no"
aria-hidden="true"
focusable="false"
Expand All @@ -23,7 +23,9 @@ title: Cookbook LlamaIndex & Milvus Integration
</button></h1><p><a target="_blank" href="https://colab.research.google.com/github/langfuse/langfuse-docs/blob/main/cookbook/integration_llama-index_milvus-lite.ipynb">
<img translate="no" src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a></p>
<p>This is a simple cookbook that demonstrates how to use the <a href="https://langfuse.com/docs/integrations/llama-index/get-started">LlamaIndex Langfuse integration</a>. It uses Milvus Lite to store the documents and Query.</p>
<p>This is a simple cookbook that demonstrates how to use Langfuse to trace your queries in RAG. The RAG pipeline is implemented with LlamaIndex and Milvus Lite to store and retrieve the documents.</p>
<p>In this quickstart, we’ll show you how to set up a LlamaIndex application using Milvus Lite as the vector store. We’ll also show you how to use the Langfuse LlamaIndex integration to trace your application.</p>
<p><a href="https://github.com/langfuse/langfuse">Langfuse</a> is an open-source LLM engineering platform that helps teams collaboratively debug, analyze, and iterate on their LLM applications. All platform features are natively integrated to accelerate the development workflow.</p>
<p><a href="https://github.com/milvus-io/milvus-lite/">Milvus Lite</a> is the lightweight version of Milvus, an open-source vector database that powers AI applications with vector embeddings and similarity search.</p>
<h2 id="Setup" class="common-anchor-header">Setup<button data-href="#Setup" class="anchor-icon" translate="no">
<svg translate="no"
Expand Down
Loading

0 comments on commit 3b034c4

Please sign in to comment.