Skip to content

Commit 015083a

Browse files
authored
Refactor state management to use Zustand, migrate components to CustomComponent and other fixes (#1403)
This release: - Adds Components from the Community - Changes the state management to Zustand which simplifies many parts of Langflow's frontend - Migrates many components to CustomComponent to eventually put all components in the same framework - Fixes migration problems
2 parents d2bfd30 + e93c512 commit 015083a

File tree

239 files changed

+23110
-36203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+23110
-36203
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ qdrant_storage
1717
.chroma
1818
.ruff_cache
1919

20+
# PyCharm
21+
.idea/
22+
2023
# Diagnostic reports (https://nodejs.org/api/report.html)
2124
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
2225

@@ -256,4 +259,4 @@ langflow.db
256259
/tmp/*
257260
src/backend/langflow/frontend/
258261
.docker
259-
scratchpad*
262+
scratchpad*

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ run_frontend:
4545
@-kill -9 `lsof -t -i:3000`
4646
cd src/frontend && npm start
4747

48+
tests_frontend:
49+
ifeq ($(UI), true)
50+
cd src/frontend && ./run-tests.sh --ui
51+
else
52+
cd src/frontend && ./run-tests.sh
53+
endif
54+
4855
run_cli:
4956
poetry run langflow run --path src/frontend/build
5057

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Follow our step-by-step guide to deploy Langflow on Google Cloud Platform (GCP)
133133

134134
Alternatively, click the **"Open in Cloud Shell"** button below to launch Google Cloud Shell, clone the Langflow repository, and start an **interactive tutorial** that will guide you through the process of setting up the necessary resources and deploying Langflow on your GCP project.
135135

136-
[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/logspace-ai/langflow&working_dir=scripts&shellonly=true&tutorial=walkthroughtutorial_spot.md)
136+
[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/logspace-ai/langflow&working_dir=scripts/gcp&shellonly=true&tutorial=walkthroughtutorial_spot.md)
137137

138138
## Deploy on Railway
139139

docs/docs/components/embeddings.mdx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import Admonition from '@theme/Admonition';
1+
import Admonition from "@theme/Admonition";
22

33
# Embeddings
44

55
<Admonition type="caution" icon="🚧" title="ZONE UNDER CONSTRUCTION">
6-
<p>
7-
We appreciate your understanding as we polish our documentation – it may contain some rough edges. Share your feedback or report issues to help us improve! 🛠️📝
8-
</p>
6+
<p>
7+
We appreciate your understanding as we polish our documentation – it may
8+
contain some rough edges. Share your feedback or report issues to help us
9+
improve! 🛠️📝
10+
</p>
911
</Admonition>
1012

1113
Embeddings are vector representations of text that capture the semantic meaning of the text. They are created using text embedding models and allow us to think about the text in a vector space, enabling us to perform tasks like semantic search, where we look for pieces of text that are most similar in the vector space.
@@ -110,4 +112,12 @@ Vertex AI is a cloud computing platform offered by Google Cloud Platform (GCP).
110112
- **top_k:** How the model selects tokens for output, the next token is selected from – defaults to `40`.
111113
- **top_p:** Tokens are selected from most probable to least until the sum of their – defaults to `0.95`.
112114
- **tuned_model_name:** The name of a tuned model. If provided, model_name is ignored.
113-
- **verbose:** This parameter is used to control the level of detail in the output of the chain. When set to True, it will print out some internal states of the chain while it is being run, which can help debug and understand the chain's behavior. If set to False, it will suppress the verbose output – defaults to `False`.
115+
- **verbose:** This parameter is used to control the level of detail in the output of the chain. When set to True, it will print out some internal states of the chain while it is being run, which can help debug and understand the chain's behavior. If set to False, it will suppress the verbose output – defaults to `False`.
116+
117+
### OllamaEmbeddings
118+
119+
Used to load [Ollama’s](https://ollama.ai/) embedding models. Wrapper around LangChain's [Ollama API](https://python.langchain.com/docs/integrations/text_embedding/ollama).
120+
121+
- **model** The name of the Ollama model to use – defaults to `llama2`.
122+
- **base_url** The base URL for the Ollama API – defaults to `http://localhost:11434`.
123+
- **temperature** Tunes the degree of randomness in text generations. Should be a non-negative value – defaults to `0`.

docs/docs/examples/buffer-memory.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import ZoomableImage from "/src/theme/ZoomableImage.js";
2121

2222
<Admonition type="note" title="LangChain Components 🦜🔗">
2323

24-
- [`ConversationBufferMemory`](https://python.langchain.com/docs/modules/memory/how_to/buffer)
24+
- [`ConversationBufferMemory`](https://python.langchain.com/docs/modules/memory/types/buffer)
2525
- [`ConversationChain`](https://python.langchain.com/docs/modules/chains/)
2626
- [`ChatOpenAI`](https://python.langchain.com/docs/modules/model_io/models/chat/integrations/openai)
2727

docs/package-lock.json

Lines changed: 13662 additions & 21555 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "docusaurus",
2+
"name": "langflow-docs",
33
"version": "0.0.0",
44
"private": true,
55
"scripts": {
@@ -36,8 +36,8 @@
3636
"path-browserify": "^1.0.1",
3737
"postcss": "^8.4.31",
3838
"prism-react-renderer": "^1.3.5",
39-
"react": "^17.0.2",
40-
"react-dom": "^17.0.2",
39+
"react": "^18.2.0",
40+
"react-dom": "^18.2.0",
4141
"react-images": "^0.6.7",
4242
"react-medium-image-zoom": "^5.1.6",
4343
"react-player": "^2.12.0",

0 commit comments

Comments
 (0)