add docs with components
This commit is contained in:
parent
5d2a29a436
commit
ce240aedf6
223 changed files with 20606 additions and 6210 deletions
41
docs/README.md
Normal file
41
docs/README.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Website
|
||||
|
||||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
### Installation
|
||||
|
||||
```
|
||||
$ yarn
|
||||
```
|
||||
|
||||
### Local Development
|
||||
|
||||
```
|
||||
$ yarn start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
|
||||
### Build
|
||||
|
||||
```
|
||||
$ yarn build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
|
||||
### Deployment
|
||||
|
||||
Using SSH:
|
||||
|
||||
```
|
||||
$ USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> yarn deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
||||
3
docs/babel.config.js
Normal file
3
docs/babel.config.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
# 🐦 Stay tunned for **LangFlow** on Twitter
|
||||
|
||||
Follow [@logspace_ai](https://twitter.com/logspace_ai){.internal-link target=_blank} on **Twitter** to get the latest news about **LangFlow**.
|
||||
<br>
|
||||
|
||||
---
|
||||
# ⭐️ Star **LangFlow** on GitHub
|
||||
|
||||
You can "star" **LangFlow** in [GitHub](https://github.com/logspace-ai/langflow){.internal-link target=_blank}.
|
||||
|
||||
<br>
|
||||
|
||||
By adding a star, other users will be able to find it more easily and see that it has been already useful for others.
|
||||
|
||||
<br>
|
||||
|
||||
[](https://star-history.com/#logspace-ai/langflow&Date){.internal-link target=_blank}
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
# 👀 Watch the GitHub repository for releases
|
||||
|
||||
You can "watch" **LangFlow** in [GitHub](https://github.com/logspace-ai/langflow){.internal-link target=_blank}.
|
||||
|
||||
<br>
|
||||
|
||||
If you select "Watching" instead of "Releases only" you will receive notifications when someone creates a new issue or question. You can also specify that you only want to be notified about new issues, discussions, PRs, etc.
|
||||
|
||||
<br>
|
||||
|
||||
Then you can try and help them solve those questions.
|
||||
|
||||
---
|
||||
|
||||
Thanks! 🚀
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
# 👋 Contributing
|
||||
|
||||
Hello there! We welcome contributions from developers of all levels to our open-source project on [GitHub](https://github.com/logspace-ai/langflow){.internal-link target=_blank}. If you'd like to contribute, please check our contributing guidelines and help make LangFlow more accessible.
|
||||
|
||||
<br>
|
||||
|
||||
As an open-source project in a rapidly developing field, we are extremely open
|
||||
to contributions, whether it be in the form of a new feature, improved infra, or better documentation.
|
||||
|
||||
<br>
|
||||
|
||||
To contribute to this project, please follow a ["fork and pull request"](https://docs.github.com/en/get-started/quickstart/contributing-to-projects){.internal-link target=_blank} workflow.
|
||||
Please do not try to push directly to this repo unless you are a maintainer.
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
`ConversationBufferMemory` allows you to store messages and then extract the messages in a variable. The **memory key** input is typically generated by encoding the input text using an encoder network, which maps the input text into a fixed-dimensional vector representation.
|
||||
|
||||
<br>
|
||||
|
||||
{width=50%}
|
||||
{width=50%}
|
||||
|
||||
<br>
|
||||
|
||||
Learn more about the [ConversationBufferMemory](https://python.langchain.com/en/latest/modules/memory/types/buffer.html){.internal-link target=\_blank} in the LangChain documentation.
|
||||
|
||||
---
|
||||
### ⛓️LangFlow example
|
||||
|
||||
<!-- <figure markdown> -->
|
||||
|
||||
{width=100%}
|
||||
{width=100%}
|
||||
|
||||
<br>
|
||||
|
||||
[Download Flow](data/Conversation_buffer_memory.json){: .md-button download="Conversation_buffer_memory"}
|
||||
|
||||
<br>
|
||||
|
||||
`ConversationChain` is a chain to have a conversation and load context from memory. **Output Key** and **Input Key** are simply unique identifiers used to represent the data being passed between different modules or steps in a Conversation Chain. These keys help to ensure that the data is properly routed and processed by the appropriate modules in the conversation flow.
|
||||
|
||||
<br>
|
||||
|
||||
Output Key used the default: `response` and Input Key used the default: `input`.
|
||||
|
||||
<br>
|
||||
|
||||
In the LangFlow example, we used `ChatOpenAI` as the LLM, but you can use any LLM that has an API. Make sure to get the API key from the LLM provider. For example, [ChatOpenAI](https://platform.openai.com/){.internal-link target=\_blank} requires you to create an account to get your API key.
|
||||
|
||||
<br>
|
||||
|
||||
Check out the [ChatOpenAI](https://platform.openai.com/docs/introduction/overview){.internal-link target=\_blank} documentation to learn more about the API and the options that contain in the node.
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
`ConversationSummaryMemory` creates a summary of the conversation over time, which can be useful for condensing information. The **memory key** input is typically generated by encoding the input text using an encoder network, which maps the input text into a fixed-dimensional vector representation.
|
||||
|
||||
<br>
|
||||
|
||||
{width=50%}
|
||||
{width=50%}
|
||||
|
||||
<br>
|
||||
|
||||
To understand more, check out the LangChain [ConversationSummaryMemory](https://python.langchain.com/en/latest/modules/memory/types/summary.html){.internal-link target=\_blank} documentation.
|
||||
|
||||
---
|
||||
|
||||
### ⛓️LangFlow example
|
||||
|
||||
{width=100%}
|
||||
{width=100%}
|
||||
|
||||
<br>
|
||||
|
||||
[Download Flow](data/Conversation_summary_memory.json){: .md-button download="Conversation_summary_memory"}
|
||||
|
||||
<br>
|
||||
|
||||
In the LangFlow example, we used `ChatOpenAI` as the LLM, but you can use any LLM that has an API. Make sure to get the API key from the LLM provider. For example, [ChatOpenAI](https://platform.openai.com/){.internal-link target=\_blank} requires you to create an account to get your API key.
|
||||
|
||||
<br>
|
||||
|
||||
Check out the [ChatOpenAI](https://platform.openai.com/docs/introduction/overview){.internal-link target=\_blank} documentation to learn more about the API and the options that contain in the node.
|
||||
|
||||
<br>
|
||||
|
||||
`ConversationChain` is a chain to have a conversation and load context from memory. **Output Key** and **Input Key** are simply unique identifiers used to represent the data being passed between different modules or steps in a Conversation Chain. These keys help to ensure that the data is properly routed and processed by the appropriate modules in the conversation flow.
|
||||
|
||||
<br>
|
||||
|
||||
Output Key used the default: `response` and Input Key used the default: `input`.
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# Creating Flows
|
||||
|
||||
Creating flows with LangFlow is easy. Simply drag sidebar components onto the canvas and connect them together to create your pipeline. LangFlow provides a range of [LangChain components](https://langchain.readthedocs.io/en/latest/reference.html){.internal-link target=\_blank} to choose from, including LLMs, prompt serializers, agents, and chains.
|
||||
|
||||
<br>
|
||||
|
||||
Explore by editing prompt parameters, link chains and agents, track an agent's thought process, and export your flow.
|
||||
|
||||
<br>
|
||||
|
||||
Once you're done, you can export your flow as a JSON file to use with LangChain.
|
||||
To do so, click the "Export" button in the top right corner of the canvas, then
|
||||
in Python, you can load the flow with:
|
||||
|
||||
```py
|
||||
from langflow import load_flow_from_json
|
||||
|
||||
flow = load_flow_from_json("path/to/flow.json")
|
||||
# Now you can use it like any chain
|
||||
flow("Hey, have you heard of LangFlow?")
|
||||
```
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
The `CSVLoader` loads a CSV file into a list of documents.
|
||||
|
||||
<br>
|
||||
|
||||
{width=50%}
|
||||
{width=50%}
|
||||
|
||||
<br>
|
||||
|
||||
Check out more about the `CSVLoader` in [LangChain](https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/csv.html?highlight=CSV%20loader){.internal-link target=\_blank} documentation.
|
||||
|
||||
---
|
||||
|
||||
### ⛓️LangFlow example
|
||||
|
||||
{width=100%}
|
||||
{width=100%}
|
||||
|
||||
<br>
|
||||
|
||||
[Download Flow](data/Csv_loader.json){: .md-button download="Csv_loader"}
|
||||
|
||||
<br>
|
||||
|
||||
`File path:`
|
||||
|
||||
<br>
|
||||
|
||||
[Download CSV](data/organizations-100.csv){: .md-button download="organizations-100.csv"}
|
||||
|
||||
<br>
|
||||
|
||||
`CharacterTextSplitter` implements splitting text based on characters.
|
||||
|
||||
Text splitters operate as follows:
|
||||
|
||||
- Split the text into small, meaningful chunks (usually sentences).
|
||||
|
||||
- Combine these small chunks into larger ones until they reach a certain size (measured by a function).
|
||||
|
||||
- Once a chunk reaches the desired size, make it its piece of text and create a new chunk with some overlap to maintain context.
|
||||
|
||||
**Separator used**:
|
||||
|
||||
```txt
|
||||
.
|
||||
```
|
||||
|
||||
**Chunk size used**:
|
||||
|
||||
```txt
|
||||
2000
|
||||
```
|
||||
|
||||
**Chunk overlap used**:
|
||||
|
||||
```txt
|
||||
200
|
||||
```
|
||||
|
||||
<br>
|
||||
For the example, we used `OpenAI` as the LLM, but you can use any LLM that has an API. Make sure to get the API key from the LLM provider. For example, [OpenAI](https://platform.openai.com/){.internal-link target=_blank} requires you to create an account to get your API key.
|
||||
|
||||
<br>
|
||||
|
||||
Check out the [OpenAI](https://platform.openai.com/docs/introduction/overview){.internal-link target=\_blank} documentation to learn more about the API and the options that contain in the node.
|
||||
|
||||
<br>
|
||||
|
||||
The `OpenAIEmbeddings`, wrapper around [OpenAI Embeddings](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings){.internal-link target=\_blank} models. Make sure to get the API key from the LLM provider, in this case [OpenAI](https://platform.openai.com/){.internal-link target=\_blank}.
|
||||
|
||||
<br>
|
||||
|
||||
`Chroma` vector databases can be used as vector stores to conduct a semantic search or to select examples, thanks to a wrapper around them.
|
||||
|
||||
<br>
|
||||
|
||||
A `VectorStoreInfo` set information about the vector store, such as the name and description.
|
||||
|
||||
<br>
|
||||
|
||||
**Name used**:
|
||||
|
||||
```txt
|
||||
organizations-100
|
||||
```
|
||||
|
||||
**Description used**:
|
||||
|
||||
```txt
|
||||
A table contains 100 companies.
|
||||
```
|
||||
|
||||
The `VectoStoreAgent`is an agent designed to retrieve information from one or more vector stores, either with or without sources.
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue