Merge branch 'main' into dev
This commit is contained in:
commit
f97c5be53b
14 changed files with 27 additions and 229 deletions
4
.github/workflows/docker-build.yml
vendored
4
.github/workflows/docker-build.yml
vendored
|
|
@ -67,7 +67,7 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and Push Docker Image
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
|
@ -102,7 +102,7 @@ jobs:
|
|||
- name: Wait for Docker Hub to propagate (for backend)
|
||||
run: sleep 120
|
||||
- name: Build and push ${{ matrix.component }}
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
|
|
|||
2
.github/workflows/pre-release-base.yml
vendored
2
.github/workflows/pre-release-base.yml
vendored
|
|
@ -69,7 +69,7 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
|
|
|||
6
.github/workflows/pre-release-langflow.yml
vendored
6
.github/workflows/pre-release-langflow.yml
vendored
|
|
@ -75,7 +75,7 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
|
@ -86,7 +86,7 @@ jobs:
|
|||
langflowai/langflow:${{ needs.release.outputs.version }}
|
||||
langflowai/langflow:1.0-alpha
|
||||
- name: Build and push (frontend)
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
|
@ -99,7 +99,7 @@ jobs:
|
|||
- name: Wait for Docker Hub to propagate
|
||||
run: sleep 120
|
||||
- name: Build and push (backend)
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
|
|
|||
|
|
@ -64,10 +64,6 @@ You can install Langflow with pip:
|
|||
|
||||
```shell
|
||||
# Make sure you have >=Python 3.10 installed on your system.
|
||||
# Install the pre-release version (recommended for the latest updates)
|
||||
python -m pip install langflow --pre --force-reinstall
|
||||
|
||||
# or stable version
|
||||
python -m pip install langflow -U
|
||||
```
|
||||
|
||||
|
|
@ -107,11 +103,8 @@ Alternatively, click the **"Open in Cloud Shell"** button below to launch Google
|
|||
|
||||
## Deploy on Railway
|
||||
|
||||
Use this template to deploy Langflow 1.0 Preview on Railway:
|
||||
Use this template to deploy Langflow 1.0 on Railway:
|
||||
|
||||
[](https://railway.app/template/UsJ1uB?referralCode=MnPSdg)
|
||||
|
||||
Or this one to deploy Langflow 0.6.x:
|
||||
|
||||
[](https://railway.app/template/JMXEWp?referralCode=MnPSdg)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
import Admonition from "@theme/Admonition";
|
||||
|
||||
# Kubernetes
|
||||
|
||||
<Admonition type="warning" title="warning">
|
||||
This page may contain outdated information. It will be updated as soon as possible.
|
||||
</Admonition>
|
||||
|
||||
This guide will help you get LangFlow up and running in Kubernetes cluster, including the following steps:
|
||||
|
||||
- Install [LangFlow as IDE](#langflow-ide) in a Kubernetes cluster (for development)
|
||||
|
|
@ -5,10 +5,6 @@ import Admonition from "@theme/Admonition";
|
|||
|
||||
# 📦 Install Langflow
|
||||
|
||||
<Admonition type="warning" title="warning">
|
||||
This page may contain outdated information. It will be updated as soon as possible.
|
||||
</Admonition>
|
||||
|
||||
<Admonition type="info">
|
||||
Langflow **requires** Python version 3.10 or greater and
|
||||
[pip](https://pypi.org/project/pip/) or
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@ import Admonition from "@theme/Admonition";
|
|||
|
||||
# ❗️ Common Installation Issues
|
||||
|
||||
<Admonition type="warning" title="warning">
|
||||
This page may contain outdated information. It will be updated as soon as possible.
|
||||
</Admonition>
|
||||
|
||||
This is a list of possible issues that you may encounter when installing Langflow and how to solve them.
|
||||
|
||||
## _`No module named 'langflow.__main__'`_
|
||||
|
|
|
|||
|
|
@ -6,10 +6,6 @@ import Admonition from "@theme/Admonition";
|
|||
|
||||
# ⚡️ Quickstart
|
||||
|
||||
<Admonition type="warning" title="warning">
|
||||
This page may contain outdated information. It will be updated as soon as possible.
|
||||
</Admonition>
|
||||
|
||||
This guide demonstrates how to build a basic flow and modify the prompt for different outcomes.
|
||||
|
||||
## Prerequisites
|
||||
|
|
|
|||
|
|
@ -1,194 +0,0 @@
|
|||
import ThemedImage from "@theme/ThemedImage";
|
||||
import useBaseUrl from "@docusaurus/useBaseUrl";
|
||||
import ZoomableImage from "/src/theme/ZoomableImage.js";
|
||||
import Admonition from "@theme/Admonition";
|
||||
|
||||
# 🌟 RAG with Astra DB
|
||||
|
||||
<Admonition type="warning" title="warning">
|
||||
This page may contain outdated information. It will be updated as soon as possible.
|
||||
</Admonition>
|
||||
|
||||
This guide will walk you through how to build a RAG (Retrieval Augmented Generation) application using **Astra DB** and **Langflow**.
|
||||
|
||||
[Astra DB](https://www.datastax.com/products/datastax-astra?utm_source=langflow-pre-release&utm_medium=referral&utm_campaign=langflow-announcement&utm_content=astradb) is a cloud-native database built on Apache Cassandra that is optimized for the cloud. It is a fully managed database-as-a-service that simplifies operations and reduces costs. Astra DB is built on the same technology that powers the largest Cassandra deployments in the world.
|
||||
|
||||
In this guide, we will use Astra DB as a vector store to store and retrieve the documents that will be used by the RAG application to generate responses.
|
||||
|
||||
<Admonition type="tip">
|
||||
This guide assumes that you have Langflow up and running. If you are new to
|
||||
Langflow, you can check out the [Getting Started](/) guide.
|
||||
</Admonition>
|
||||
|
||||
TLDR;
|
||||
|
||||
- [Create a free Astra DB account](https://astra.datastax.com/signup?utm_source=langflow-pre-release&utm_medium=referral&utm_campaign=langflow-announcement&utm_content=create-a-free-astra-db-account)
|
||||
- Create a new database, get a **Token** and the **API Endpoint**
|
||||
- Start Langflow and click on the **New Project** button and look for Vector Store RAG. This will create a new project with the necessary components
|
||||
- Import the project into Langflow by dropping it on the Workspace or My Collection page
|
||||
- Update the **Token** and **API Endpoint** in the **Astra DB** components
|
||||
- Update the OpenAI API key in the **OpenAI** components
|
||||
- Run the ingestion flow which is the one that uses the **Astra DB** component
|
||||
- Click on the ⚡ _Run_ button and start interacting with your RAG application
|
||||
|
||||
# First things first
|
||||
|
||||
## Create an Astra DB Database
|
||||
|
||||
To get started, you will need to [create an Astra DB database](https://astra.datastax.com/signup?utm_source=langflow-pre-release&utm_medium=referral&utm_campaign=langflow-announcement&utm_content=create-an-astradb-database).
|
||||
|
||||
Once you have created an account, you will be taken to the Astra DB dashboard. Click on the **Create Database** button.
|
||||
|
||||
<ZoomableImage
|
||||
alt="Docusaurus themed image"
|
||||
sources={{
|
||||
light: "img/astra-create-database.png",
|
||||
dark: "img/astra-create-database.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
Now you will need to configure your database. Choose the **Serverless (Vector)** deployment type, and pick a Database name, provider and region.
|
||||
|
||||
After you have configured your database, click on the **Create Database** button.
|
||||
|
||||
<ZoomableImage
|
||||
alt="Docusaurus themed image"
|
||||
sources={{
|
||||
light: "img/astra-configure-deployment.png",
|
||||
dark: "img/astra-configure-deployment.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
Once your database is initialized, to the right of the page, you will see the _Database Details_ section which contains a button for you to copy the **API Endpoint** and another to generate a **Token**.
|
||||
|
||||
<ZoomableImage
|
||||
alt="Docusaurus themed image"
|
||||
sources={{
|
||||
light: "img/astra-generate-token.png",
|
||||
dark: "img/astra-generate-token.png",
|
||||
}}
|
||||
style={{ width: "50%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
Now we are all set to start building our RAG application using Astra DB and Langflow.
|
||||
|
||||
## Open the Vector Store RAG Project
|
||||
|
||||
To get started, click on the **New Project** button and look for the **Vector Store RAG** project. This will open a starter project with the necessary components to run a RAG application using Astra DB.
|
||||
|
||||
<ZoomableImage
|
||||
alt="Drag-and-drop"
|
||||
sources={{
|
||||
light: "img/drag-and-drop-flow.png",
|
||||
dark: "img/drag-and-drop-flow.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
This project consists of two flows. The simpler one is the **Ingestion Flow** which is responsible for ingesting the documents into the Astra DB database.
|
||||
|
||||
Your first step should be to understand what each flow does and how they interact with each other.
|
||||
|
||||
The ingestion flow consists of:
|
||||
|
||||
- **Files** component that uploads a text file to Langflow
|
||||
- **Recursive Character Text Splitter** component that splits the text into smaller chunks
|
||||
- **OpenAIEmbeddings** component that generates embeddings for the text chunks
|
||||
- **Astra DB** component that stores the text chunks in the Astra DB database
|
||||
|
||||
<ZoomableImage
|
||||
alt="Astra Ingestion"
|
||||
sources={{
|
||||
light: "img/astra-ingestion-flow.png",
|
||||
dark: "img/astra-ingestion-flow.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
Now, let's update the **Astra DB** and **Astra DB Search** components with the **Token** and **API Endpoint** that we generated earlier, and the OpenAI Embeddings components with your OpenAI API key.
|
||||
|
||||
<ZoomableImage
|
||||
alt="Docusaurus themed image"
|
||||
sources={{
|
||||
light: "img/astra-ingestion-fields.png",
|
||||
dark: "img/astra-ingestion-fields.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
And run it! This will ingest the Text data from your file into the Astra DB database.
|
||||
|
||||
<ZoomableImage
|
||||
alt="Astra Run"
|
||||
sources={{
|
||||
light: "img/astra-ingestion-run.png",
|
||||
dark: "img/astra-ingestion-run.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
Now, on to the **RAG Flow**. This flow is responsible for generating responses to your queries. It will define all of the steps from getting the User's input to generating a response and displaying it in the Playground.
|
||||
|
||||
The RAG flow is a bit more complex. It consists of:
|
||||
|
||||
- **Chat Input** component that defines where to put the user input coming from the Playground
|
||||
- **OpenAI Embeddings** component that generates embeddings from the user input
|
||||
- **Astra DB Search** component that retrieves the most relevant Data from the Astra DB database
|
||||
- **Text Output** component that turns the Data into Text by concatenating them and also displays it in the Playground
|
||||
- One interesting point you'll see here is that this component is named `Extracted Chunks`, and that is how it will appear in the Playground
|
||||
- **Prompt** component that takes in the user input and the retrieved Data as text and builds a prompt for the OpenAI model
|
||||
- **OpenAI** component that generates a response to the prompt
|
||||
- **Chat Output** component that displays the response in the Playground
|
||||
|
||||
<ZoomableImage
|
||||
alt="Docusaurus themed image"
|
||||
sources={{
|
||||
light: "img/astra-rag-flow.png",
|
||||
dark: "img/astra-rag-flow.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
To run it all we have to do is click on the ⚡ _Run_ button and start interacting with your RAG application.
|
||||
|
||||
<ZoomableImage
|
||||
alt="Astra RAG"
|
||||
sources={{
|
||||
light: "img/astra-rag-flow-run.png",
|
||||
dark: "img/astra-rag-flow-run.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
This opens the Playground where you can chat your data.
|
||||
|
||||
Because this flow has a **Chat Input** and a **Text Output** component, the Panel displays a chat input at the bottom and the Extracted Chunks section on the left.
|
||||
|
||||
<ZoomableImage
|
||||
alt="Playground"
|
||||
sources={{
|
||||
light: "img/astra-rag-flow-interaction-panel.png",
|
||||
dark: "img/astra-rag-flow-interaction-panel.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
Once we interact with it we get a response and the Extracted Chunks section is updated with the retrieved data.
|
||||
|
||||
<ZoomableImage
|
||||
alt="Astra Playground"
|
||||
sources={{
|
||||
light: "img/astra-rag-flow-interaction-panel-interaction.png",
|
||||
dark: "img/astra-rag-flow-interaction-panel-interaction.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
And that's it! You have successfully ran a RAG application using Astra DB and Langflow.
|
||||
|
||||
# Conclusion
|
||||
|
||||
In this guide, we have learned how to run a RAG application using Astra DB and Langflow.
|
||||
We have seen how to create an Astra DB database, import the Astra DB RAG Flows project into Langflow, and run the ingestion and RAG flows.
|
||||
|
|
@ -6,10 +6,6 @@ import Admonition from "@theme/Admonition";
|
|||
|
||||
# 🎨 Langflow Workspace
|
||||
|
||||
<Admonition type="warning" title="warning">
|
||||
This page may contain outdated information. It will be updated as soon as possible.
|
||||
</Admonition>
|
||||
|
||||
## The Langflow Workspace Interface
|
||||
|
||||
The **Langflow Workspace** is where you assemble new flows and create AIs by connecting and running components. To get started, click on **New Project**. You can either build a flow from scratch (Blank Flow) or choose from pre-built starter examples.
|
||||
|
|
|
|||
|
|
@ -5,10 +5,6 @@ import ZoomableImage from "/src/theme/ZoomableImage.js";
|
|||
|
||||
# LangSmith
|
||||
|
||||
<Admonition type="warning" title="warning">
|
||||
This page may contain outdated information. It will be updated as soon as possible.
|
||||
</Admonition>
|
||||
|
||||
LangSmith is a full-lifecycle DevOps service from LangChain that provides monitoring and observability. To integrate with Langflow, just add your LangChain API key as a Langflow environment variable and you are good to go!
|
||||
|
||||
## Step-by-step Configuration
|
||||
|
|
|
|||
|
|
@ -1,6 +1,15 @@
|
|||
import ZoomableImage from "/src/theme/ZoomableImage.js";
|
||||
|
||||
# A new chapter for Langflow
|
||||
# 1.0 - A new chapter for Langflow
|
||||
|
||||
<ZoomableImage
|
||||
alt="1.0"
|
||||
sources={{
|
||||
light: "/img/langflow-1-0.png",
|
||||
dark: "/img/langflow-1-0.png",
|
||||
}}
|
||||
style={{ width: "80%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
## First things first
|
||||
|
||||
|
|
|
|||
|
|
@ -240,3 +240,7 @@ body {
|
|||
.ch-scrollycoding-step-content {
|
||||
min-height: 70px;
|
||||
}
|
||||
|
||||
.theme-doc-sidebar-item-category.theme-doc-sidebar-item-category-level-2.menu__list-item:not(:first-child) {
|
||||
margin-top: 0.25rem!important;
|
||||
}
|
||||
BIN
docs/static/img/langflow-1-0.png
vendored
Normal file
BIN
docs/static/img/langflow-1-0.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1 MiB |
Loading…
Add table
Add a link
Reference in a new issue