Giter Club home page Giter Club logo

langflow-ai / langflow Goto Github PK

View Code? Open in Web Editor NEW
17.4K 149.0 2.6K 207.49 MB

⛓️ Langflow is a dynamic graph where each node is an executable unit. Its modular and interactive design fosters rapid experimentation and prototyping, pushing hard on the limits of creativity.

Home Page: http://www.langflow.org

License: MIT License

HTML 0.02% CSS 0.94% TypeScript 23.56% Dockerfile 0.29% Shell 0.35% Python 32.95% JavaScript 41.74% Makefile 0.14% Mako 0.02%
langchain react-flow chatgpt large-language-models

langflow's Introduction

Langflow

Langflow is a new, visual way to build, iterate and deploy AI apps.

⚡️ Documentation and Community

📦 Installation

You can install Langflow with pip:

# Make sure you have Python 3.10 installed on your system.
# Install the pre-release version
python -m pip install langflow --pre --force-reinstall

# or stable version
python -m pip install langflow -U

Then, run Langflow with:

python -m langflow run

You can also preview Langflow in HuggingFace Spaces. Clone the space using this link, to create your own Langflow workspace in minutes.

🎨 Creating Flows

Creating flows with Langflow is easy. Simply drag components from the sidebar onto the canvas and connect them to start building your application.

Explore by editing prompt parameters, grouping components into a single high-level component, and building your own Custom Components.

Once you’re done, you can export your flow as a JSON file.

Load the flow with:

from langflow.load import run_flow_from_json

results = run_flow_from_json("path/to/flow.json", input_value="Hello, World!")

🖥️ Command Line Interface (CLI)

Langflow provides a command-line interface (CLI) for easy management and configuration.

Usage

You can run the Langflow using the following command:

langflow run [OPTIONS]

Each option is detailed below:

  • --help: Displays all available options.
  • --host: Defines the host to bind the server to. Can be set using the LANGFLOW_HOST environment variable. The default is 127.0.0.1.
  • --workers: Sets the number of worker processes. Can be set using the LANGFLOW_WORKERS environment variable. The default is 1.
  • --timeout: Sets the worker timeout in seconds. The default is 60.
  • --port: Sets the port to listen on. Can be set using the LANGFLOW_PORT environment variable. The default is 7860.
  • --config: Defines the path to the configuration file. The default is config.yaml.
  • --env-file: Specifies the path to the .env file containing environment variables. The default is .env.
  • --log-level: Defines the logging level. Can be set using the LANGFLOW_LOG_LEVEL environment variable. The default is critical.
  • --components-path: Specifies the path to the directory containing custom components. Can be set using the LANGFLOW_COMPONENTS_PATH environment variable. The default is langflow/components.
  • --log-file: Specifies the path to the log file. Can be set using the LANGFLOW_LOG_FILE environment variable. The default is logs/langflow.log.
  • --cache: Selects the type of cache to use. Options are InMemoryCache and SQLiteCache. Can be set using the LANGFLOW_LANGCHAIN_CACHE environment variable. The default is SQLiteCache.
  • --dev/--no-dev: Toggles the development mode. The default is no-dev.
  • --path: Specifies the path to the frontend directory containing build files. This option is for development purposes only. Can be set using the LANGFLOW_FRONTEND_PATH environment variable.
  • --open-browser/--no-open-browser: Toggles the option to open the browser after starting the server. Can be set using the LANGFLOW_OPEN_BROWSER environment variable. The default is open-browser.
  • --remove-api-keys/--no-remove-api-keys: Toggles the option to remove API keys from the projects saved in the database. Can be set using the LANGFLOW_REMOVE_API_KEYS environment variable. The default is no-remove-api-keys.
  • --install-completion [bash|zsh|fish|powershell|pwsh]: Installs completion for the specified shell.
  • --show-completion [bash|zsh|fish|powershell|pwsh]: Shows completion for the specified shell, allowing you to copy it or customize the installation.
  • --backend-only: This parameter, with a default value of False, allows running only the backend server without the frontend. It can also be set using the LANGFLOW_BACKEND_ONLY environment variable.
  • --store: This parameter, with a default value of True, enables the store features, use --no-store to deactivate it. It can be configured using the LANGFLOW_STORE environment variable.

These parameters are important for users who need to customize the behavior of Langflow, especially in development or specialized deployment scenarios.

Environment Variables

You can configure many of the CLI options using environment variables. These can be exported in your operating system or added to a .env file and loaded using the --env-file option.

A sample .env file named .env.example is included with the project. Copy this file to a new file named .env and replace the example values with your actual settings. If you're setting values in both your OS and the .env file, the .env settings will take precedence.

Deployment

Deploy Langflow on Google Cloud Platform

Follow our step-by-step guide to deploy Langflow on Google Cloud Platform (GCP) using Google Cloud Shell. The guide is available in the Langflow in Google Cloud Platform document.

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.

Open in Cloud Shell

Deploy on Railway

Deploy on Railway

Deploy on Render

Deploy to Render

👋 Contributing

We welcome contributions from developers of all levels to our open-source project on GitHub. If you'd like to contribute, please check our contributing guidelines and help make Langflow more accessible.


Star History Chart

🌟 Contributors

langflow contributors

📄 License

Langflow is released under the MIT License. See the LICENSE file for details.

langflow's People

Contributors

aaronsteers avatar alexandrehptavares avatar alexleventer avatar anovazzi1 avatar carlosrcoelho avatar coolgo0811 avatar cristhianzl avatar deepankarm avatar dependabot[bot] avatar diogenesbr avatar dvmorris avatar gabfr avatar genome21 avatar gladson avatar gustavoschaedler avatar gyliu513 avatar ibiscp avatar igorrcarvalho avatar jacquesmats avatar jatharva22 avatar kandakji avatar lucaseduoli avatar ogabrielluiz avatar paxcalpt avatar queenvictoria avatar rodrigosnader avatar yamonkjd avatar yassineselmi avatar yoazmenda avatar ysekiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

langflow's Issues

Both search tools have lost their key input setting

Version 0.0.53 - both version have lost their key setting, leading to:

Error sending message
Oops! Looks like you missed some required information. Please fill in all the required fields before continuing

BaseLLM bug

bug

I can't connect the model to any tool or LLMMathChain. OpenAI model input type is str. (0.0.40 version on windows)

Having issues running docker

Git cloned and then ran docker compose up in the langflow directory.
Seemed to spin up fine, but I'm getting errors when I go to localhost:3000.
Keep getting proxy error.
Running on linux mint, but that shouldn't cause any issues since it's in docker.
See screenshots.
Screenshot from 2023-03-21 20-57-50
Screenshot from 2023-03-21 20-58-33

Fix dockerfile

Facing error when building image.

image

Logspace repo on Docker Hub is not accessible.

Implement Agents as Tools

This issue is for us to discuss this topic and its implementation.
This is probably one of the most interesting parts of Langchain and we should build a structure that will allow us to have a more accessible interface with it.

Right now we work with a pretty straight line between LangFlow and langchain but this will require us to point to the run function instead of just building and calling the agent or run function.

I think one approach is to associate the Agent Output node to the action creating a tool from it.
This requires a blank Tool node that has Name, Description, and Func parameters.
The Func could come from outside (Agent Output or Chain output) or we could allow the user to pass a python script that we would have to parse in the backend.

The Agent or Chain output is pretty straightforward in the frontend but will require custom implementation in the backend i.e create the agent and then set its run function to a new Tool.

The python script would require checking for imports and parsing the function itself. There might be solutions for this in the community already.
One option though would be to first allow the use of the requests package for now and build on top of that once we get it working.

The implementation might get confusing once we implement this so the point of this issue is for us to discuss the course of action to build a structure that is robust possibly using pydantic.BaseModel to get the validation basically for free and use an object-oriented approach to build the graph.

If we create classes inheriting from LangChain's classes and we setup functions such as Chain.as_tool(name, description) and maybe a class called GraphProcessor that processes the JSON and goes over the nodes and edges to build the LangChain Agent, I think it will be easier to maintain once LangChain implements a breaking change.

Frontend won't compile

I run docker compose up
logs end up with:

langflow-frontend-1  | ERROR in ./src/App.tsx 16:0-53
langflow-frontend-1  | Module not found: Error: Can't resolve 'react-error-boundary' in '/home/node/app/src'
langflow-frontend-1  | 
langflow-frontend-1  | webpack compiled with 1 error and 1 warning
langflow-frontend-1  | ERROR in src/App.tsx:12:31
langflow-frontend-1  | TS2307: Cannot find module 'react-error-boundary' or its corresponding type declarations.
langflow-frontend-1  |     10 | import { locationContext } from "./contexts/locationContext";
langflow-frontend-1  |     11 | import TabsManagerComponent from "./pages/FlowPage/components/tabsManagerComponent";
langflow-frontend-1  |   > 12 | import { ErrorBoundary } from "react-error-boundary";
langflow-frontend-1  |        |                               ^^^^^^^^^^^^^^^^^^^^^^
langflow-frontend-1  |     13 | import CrashErrorComponent from "./components/CrashErrorComponent";
langflow-frontend-1  |     14 | import { TabsContext } from "./contexts/tabsContext";
langflow-frontend-1  |     15 |

Apparently this broke at some point after 0.0.45

getting langflow running on Windows

Discussed in #41

Originally posted by scott------ March 18, 2023
after running pip install langflow and watching that complete successfully I try:
C:\Users\Scott>langflow
'langflow' is not recognized as an internal or external command,
operable program or batch file.

I CD into the site-packages langflow_backend and run:
C:\Users\Scott>cd C:\Users\Scott\AppData\Roaming\Python\Python310\site-packages\langflow_backend

C:\Users\Scott\AppData\Roaming\Python\Python310\site-packages\langflow_backend>python main.py
INFO: Started server process [13420]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:5003 (Press CTRL+C to quit)

I click on the link and the page displays:
{"detail":"Not Found"}

What am I missing here :-)

HuggingFaceHub?

Just installed and dropped HuggingFaceHub into the canvas, it asks for HF token but no way to set the model name. Is this implemented at all?

Prompt Template "does not contain any variables for data entry."

In Langchain 0.0.54 I receive the message "The template you are attempting to use does not contain any variables for data entry." when I select "Check & Save" on the text entry modal. The text does show up inside of the PromptTemplate block, but when attempting to use the block, I receive the message "Oops! Looks like you missed some required information. Please fill in all the required fields before continuing.

Error: A single string input was passed in, but this chain expects multiple inputs (set()).

Hey there!

Just installed this and playing around with it.
Unfortunately I'm getting this error as soon as I try a basic example

Error: A single string input was passed in, but this chain expects multiple inputs (set()). When a chain expects multiple inputs, please call it by passing in a dictionary, eg `chain({'foo': 1, 'bar': 2})`

Is there something I'm not configuring correctly and I'm missing?

image

Thanks in advance for this amazing project

Extend with custom components

Is there a way to import custom LangChain components (tools, chains, agents, etc.)? The current selection is very limited and doesn't seem to keep up with what's already in the core LangChain library.

Error: 'OpenAI' object has no attribute 'input_keys'

I am getting an error when using langflow:

Steps to reproduce:

brew install pyenv
pyenv install 3.10.10 # Saw you are using Python 3.10 from Docker file so installed that
pyenv local 3.10.10
pyenv virtualenv 3.10.10 langflow
virtualenv activate langflow
pip install langflow
langflow

I dragged the OpenAI LLM into the screen, copied my API key into the text box for it, and then in the chat field typed 'Hi'.
Upon pressing enter, I get an error in the lower left hand corner saying:
Error: 'OpenAI' object has no attribute 'input_keys'

Here is a screenshot of the error.
Screenshot 2023-04-05 at 7 48 00 PM

Am I not using it right or is this a bug? Happy to contribute to the project as I come up to speed on it more.

UI Dissapears when loading invalid json file

  1. Langflow worked when I installed it using pip.
  2. I wanted to add additional agents from the langchain-hub. So I clicked the import button on the top-right import button and selected the self-ask-with-search/agent.json file.
  3. From that point onward, the UI would disappear within milliseconds of loading. IE, when I Ctrl+Shift+R'ed, I would briefly see the origonal UI, but it would be gone by the 0.25 second mark. In the Chrome debugger, I observed this message appear at the time that the UI went blank:
Uncaught TypeError: Cannot read properties of undefined (reading 'map')
    at tp (index.tsx:164:21)
    at Ea (react-dom.production.min.js:167:137)
    at El (react-dom.production.min.js:290:337)
    at xs (react-dom.production.min.js:280:389)
    at ys (react-dom.production.min.js:280:320)
    at gs (react-dom.production.min.js:280:180)
    at as (react-dom.production.min.js:271:88)
    at is (react-dom.production.min.js:268:429)
    at S (scheduler.production.min.js:13:203)
    at MessagePort.P (scheduler.production.min.js:14:128)

By setting a breakpoint in the debugger, I could see the UI correctly rendered prior to the error. After this error happens, the screen is completely white.

  1. I tried restarting the langflow server. I tried force reloading. I also tried uninstalling and reinstalling langflow. No change in behavior.

How can I revert my system to its state prior to importing the json file? I don't need recovery, I just need to restart as a fresh user. Thanks!

Running langflow in replit

This issue is for us to discuss this topic and its implementation.

Let's discuss langflow in replit and test it so that we can see if it works.

Not able to open langflow after installing

(venv) PS C:\Users\XXX\PycharmProjects\XXX> langflow
Traceback (most recent call last):
File "C:\Users\XXX\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\XXX\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\XXX\PycharmProjects\XXX\venv\Scripts\langflow.exe_main
.py", line 4, in
File "C:\Users\XXX\PycharmProjects\XXX\venv\lib\site-packages\langflow_backend_init
.py", line 1, in
from langflow_backend.interface.loading import load_flow_from_json # noqa
File "C:\Users\XXX\PycharmProjects\XXX\venv\lib\site-packages\langflow_backend\interface\loading.py", line 4, in
from langchain.agents.loading import load_agent_executor_from_config
ImportError: cannot import name 'load_agent_executor_from_config' from 'langchain.agents.loading' (C:\Users\XXX\PycharmProjects\XXX\venv\lib\site-packages\langchain\agents\loading.py)
(venv) PS C:\Users\XXX\PycharmProjects\XXX>

Local Server setup with Docker

Hey LangFlow Dev Team!

I have a feature request that I think would be awesome for the platform. Can you add a local server with Docker, so users can use chained prompts on local networks? It's like an OpenAI API server proxy, and would let us experiment with more complex flows for personal servers and systems.

Process stuck

I've installed langflow via pip on my Mac and ran it using langflow. But it seems to be stuck. I get the following when CTRL-Cing out of the process.

Traceback (most recent call last):
  File "/usr/local/bin/langflow", line 5, in <module>
    from langflow.__main__ import main
  File "/usr/local/lib/python3.11/site-packages/langflow/__init__.py", line 1, in <module>
    from langflow.interface.loading import load_flow_from_json  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/langflow/interface/loading.py", line 3, in <module>
    from langflow.interface.types import get_type_list
  File "/usr/local/lib/python3.11/site-packages/langflow/interface/types.py", line 1, in <module>
    from langflow.interface.listing import list_type
  File "/usr/local/lib/python3.11/site-packages/langflow/interface/listing.py", line 1, in <module>
    from langchain import chains, agents, prompts
  File "/usr/local/lib/python3.11/site-packages/langchain/__init__.py", line 57, in <module>
    set_default_callback_manager()
  File "/usr/local/lib/python3.11/site-packages/langchain/callbacks/__init__.py", line 31, in set_default_callback_manager
    set_tracing_callback_manager(session)
  File "/usr/local/lib/python3.11/site-packages/langchain/callbacks/__init__.py", line 45, in set_tracing_callback_manager
    handler.load_default_session()
  File "/usr/local/lib/python3.11/site-packages/langchain/callbacks/tracers/langchain.py", line 83, in load_default_session
    r = requests.get(
        ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
                       ^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/local/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 706, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^

Requirement missing in release 0.0.53? rich.logging

File "py390/lib/python3.9/site-packages/langflow/utils/logger.py", line 4, in
from rich.logging import RichHandler
ModuleNotFoundError: No module named 'rich'

After pip install rich all was good

Awesome release by the way!

docker compose install not working on Mac Pro M2

langflow % docker-compose up -d
[+] Building 36.9s (27/27) FINISHED
=> [langflow-backend internal] load build definition from dev.Dockerfile 0.0s
=> => transferring dockerfile: 603B 0.0s
=> [langflow-frontend internal] load build definition from dev.Dockerfile 0.0s
=> => transferring dockerfile: 553B 0.0s
=> [langflow-backend internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [langflow-frontend internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [langflow-backend internal] load metadata for docker.io/library/python:3.10-slim 1.9s
=> [langflow-frontend internal] load metadata for docker.io/library/node:19-bullseye-slim 2.0s
=> [langflow-backend 1/7] FROM docker.io/library/python:3.10-slim@sha256:7b0a5cefbcdd085faa21533c21549e55a7e66f5aed40f8d1f4de13a017e352cd 6.2s
=> => resolve docker.io/library/python:3.10-slim@sha256:7b0a5cefbcdd085faa21533c21549e55a7e66f5aed40f8d1f4de13a017e352cd 0.0s
=> => sha256:93a67280259393dc61b3b00d448dfe8c71e2fa81bfd4242f464ee813460608c7 1.06MB / 1.06MB 1.1s
=> => sha256:8dcaf4f41922b5c226f133fe4fc15c680a48807ebf35153a0dc3dabf51ee2203 11.62MB / 11.62MB 1.0s
=> => sha256:7b0a5cefbcdd085faa21533c21549e55a7e66f5aed40f8d1f4de13a017e352cd 1.65kB / 1.65kB 0.0s
=> => sha256:8d388bd2c07d176d5a9dded8fc8f5a10514f26323042c9bc02bd610cae3b494f 1.37kB / 1.37kB 0.0s
=> => sha256:35ce97c3e6679fbc15551848fae67b75cdc8b304c7b2ddba5196bddf7af5f54a 6.91kB / 6.91kB 0.0s
=> => sha256:fcdb9667c46b09d1c1d058681ea4a1db41e66bbc1a71d873a0c9da4f7a92947d 30.06MB / 30.06MB 5.1s
=> => sha256:3fdc970d6941574ded95783f1ffef19e8f4910579cd43c2777b762a31785cf96 244B / 244B 1.2s
=> => sha256:5e42bc20b98e6386bb4dd78946b51c72241099523dfe261d4a05142f54b0dd92 3.37MB / 3.37MB 2.1s
=> => extracting sha256:fcdb9667c46b09d1c1d058681ea4a1db41e66bbc1a71d873a0c9da4f7a92947d 0.5s
=> => extracting sha256:93a67280259393dc61b3b00d448dfe8c71e2fa81bfd4242f464ee813460608c7 0.1s
=> => extracting sha256:8dcaf4f41922b5c226f133fe4fc15c680a48807ebf35153a0dc3dabf51ee2203 0.2s
=> => extracting sha256:3fdc970d6941574ded95783f1ffef19e8f4910579cd43c2777b762a31785cf96 0.0s
=> => extracting sha256:5e42bc20b98e6386bb4dd78946b51c72241099523dfe261d4a05142f54b0dd92 0.1s
=> [langflow-backend internal] load build context 0.1s
=> => transferring context: 10.09MB 0.1s
=> [langflow-frontend base 1/5] FROM docker.io/library/node:19-bullseye-slim@sha256:8ac2083552bb3d92abbbda6baaf9b89b054bfa2cde863d965df9c28ac9baef41 6.7s
=> => resolve docker.io/library/node:19-bullseye-slim@sha256:8ac2083552bb3d92abbbda6baaf9b89b054bfa2cde863d965df9c28ac9baef41 0.0s
=> => sha256:0835210398882ef429d081ed531af92a36ccee0aa45c2060af9166875b637e5a 6.86kB / 6.86kB 0.0s
=> => sha256:fcdb9667c46b09d1c1d058681ea4a1db41e66bbc1a71d873a0c9da4f7a92947d 30.06MB / 30.06MB 5.0s
=> => sha256:8ac2083552bb3d92abbbda6baaf9b89b054bfa2cde863d965df9c28ac9baef41 1.21kB / 1.21kB 0.0s
=> => sha256:be8c55668e437bf00e125597b9449680a75c7190dc829b6401f94c1ef9570129 1.37kB / 1.37kB 0.0s
=> => sha256:12208f06d5953722cdff5ac0cdba75c6b4d1ac5f812cb0b8a3dda599ed15b832 4.19kB / 4.19kB 1.3s
=> => sha256:c57bccfe4039ad5b3a465c56da4cea658d141a49548a2b6c94fa338cb6a020ae 46.77MB / 46.77MB 5.4s
=> => sha256:f990dd30467d49c03ddce76f191e85ed9499edb33a32baa0a1be0fd6924e6d29 2.76MB / 2.76MB 3.2s
=> => sha256:1a49604e8d632e8cc7877f17bae6130bd3e1bb76bc45ce5be709157d92cba4b7 449B / 449B 3.5s
=> => extracting sha256:fcdb9667c46b09d1c1d058681ea4a1db41e66bbc1a71d873a0c9da4f7a92947d 0.5s
=> => extracting sha256:12208f06d5953722cdff5ac0cdba75c6b4d1ac5f812cb0b8a3dda599ed15b832 0.0s
=> => extracting sha256:c57bccfe4039ad5b3a465c56da4cea658d141a49548a2b6c94fa338cb6a020ae 0.9s
=> => extracting sha256:f990dd30467d49c03ddce76f191e85ed9499edb33a32baa0a1be0fd6924e6d29 0.1s
=> => extracting sha256:1a49604e8d632e8cc7877f17bae6130bd3e1bb76bc45ce5be709157d92cba4b7 0.0s
=> [langflow-frontend internal] load build context 0.0s
=> => transferring context: 955.15kB 0.0s
=> [langflow-backend 2/7] WORKDIR /app 0.3s
=> [langflow-backend 3/7] RUN apt-get update && apt-get install gcc curl -y 11.3s
=> [langflow-frontend base 2/5] RUN mkdir -p /home/node/app 0.2s
=> [langflow-frontend base 3/5] RUN chown -R node:node /home/node && chmod -R 770 /home/node 0.3s
=> [langflow-frontend base 4/5] RUN apt-get update && apt-get install -y jq 2.8s
=> [langflow-frontend base 5/5] WORKDIR /home/node/app 0.0s
=> [langflow-frontend builder-client 1/6] RUN echo "BACKEND_URL: http://backend:7860" 0.3s
=> [langflow-frontend builder-client 2/6] WORKDIR /home/node/app 0.0s
=> [langflow-frontend builder-client 3/6] COPY --chown=node:node . ./ 0.0s
=> [langflow-frontend builder-client 4/6] COPY ./set_proxy.sh . 0.0s
=> [langflow-frontend builder-client 5/6] RUN chmod +x set_proxy.sh && ./set_proxy.sh 0.2s
=> [langflow-frontend builder-client 6/6] RUN npm install --loglevel warn 12.7s
=> [langflow-backend 4/7] RUN curl -sSL https://install.python-poetry.org | python3 - 10.8s
=> [langflow-frontend] exporting to image 2.6s
=> => exporting layers 2.6s
=> => writing image sha256:827a866d6afa3b1b1f68c2f6564e871ba6cf1054d875a008fa68830ba57e58f3 0.0s
=> => naming to docker.io/library/langflow-frontend 0.0s
=> [langflow-backend 5/7] COPY poetry.lock pyproject.toml ./ 0.0s
=> [langflow-backend 6/7] COPY ./ ./ 0.0s
=> ERROR [langflow-backend 7/7] RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi 6.2s

[langflow-backend 7/7] RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi:
#0 0.694 Skipping virtualenv creation, as specified in config file.
#0 0.997 Installing dependencies from lock file
#0 1.278
#0 1.278 Package operations: 88 installs, 1 update, 0 removals
#0 1.278
#0 1.279 • Installing packaging (23.0)
#0 1.279 • Installing pyasn1 (0.4.8)
#0 1.279 • Installing six (1.16.0)
#0 1.527 • Installing asttokens (2.2.1)
#0 1.527 • Installing cachetools (5.3.0)
#0 1.528 • Installing certifi (2022.12.7)
#0 1.529 • Installing executing (1.2.0)
#0 1.530 • Installing charset-normalizer (3.1.0)
#0 1.531 • Installing frozenlist (1.3.3)
#0 1.531 • Installing idna (3.4)
#0 1.533 • Installing marshmallow (3.19.0)
#0 1.565 • Installing multidict (6.0.4)
#0 1.571 • Installing mypy-extensions (1.0.0)
#0 1.621 • Installing parso (0.8.3)
#0 1.625 • Installing platformdirs (3.1.1)
#0 1.637 • Installing protobuf (4.22.1)
#0 1.667 • Installing ptyprocess (0.7.0)
#0 1.689 • Installing pure-eval (0.2.2)
#0 1.703 • Installing pyasn1-modules (0.2.8)
#0 1.710 • Installing pyparsing (3.0.9)
#0 1.717 • Installing rsa (4.9)
#0 1.746 • Installing sniffio (1.3.0)
#0 1.752 • Installing traitlets (5.9.0)
#0 1.764 • Installing typing-extensions (4.5.0)
#0 1.768 • Installing urllib3 (1.26.15)
#0 1.788 • Installing wcwidth (0.2.6)
#0 1.911 • Installing aiosignal (1.3.1)
#0 1.912 • Installing anyio (3.6.2)
#0 1.912 • Installing async-timeout (4.0.2)
#0 1.913 • Installing attrs (22.2.0)
#0 1.914 • Installing backcall (0.2.0)
#0 1.915 • Installing decorator (5.1.1)
#0 1.915 • Installing google-auth (2.16.2)
#0 1.916 • Installing googleapis-common-protos (1.58.0)
#0 1.948 • Installing greenlet (2.0.2)
#0 1.965 • Installing httplib2 (0.21.0)
#0 1.969 • Installing jedi (0.18.2)
#0 1.992 • Installing jupyter-core (5.3.0)
#0 2.048 • Installing marshmallow-enum (1.5.1)
#0 2.092 • Installing matplotlib-inline (0.1.6)
#0 2.170 • Installing pexpect (4.8.0)
#0 2.178 • Installing pickleshare (0.7.5)
#0 2.182 • Installing prompt-toolkit (3.0.38)
#0 2.184 • Installing pygments (2.14.0)
#0 2.234 • Installing python-dateutil (2.8.2)
#0 2.265 • Installing pyzmq (25.0.1)
#0 2.286 • Installing requests (2.28.2)
#0 2.289 • Installing stack-data (0.6.2)
#0 2.304 • Installing tornado (6.2)
#0 2.434 • Installing typing-inspect (0.8.0)
#0 2.447 • Installing yarl (1.8.2)
#0 2.948 • Installing aiohttp (3.8.4)
#0 2.949 • Installing click (8.1.3)
#0 2.949 • Installing comm (0.1.2)
#0 2.950 • Installing dataclasses-json (0.5.7)
#0 2.951 • Installing debugpy (1.6.6)
#0 2.952 • Installing google-auth-httplib2 (0.1.0)
#0 2.952 • Installing h11 (0.14.0)
#0 2.953 • Installing google-api-core (2.11.0)
#0 3.002 • Installing ipython (8.11.0)
#0 3.030 • Installing jupyter-client (8.0.3)
#0 3.035 • Installing nest-asyncio (1.5.6)
#0 3.045 • Installing numpy (1.24.2)
#0 3.136 • Installing pathspec (0.11.1)
#0 3.181 • Installing psutil (5.9.4)
#0 3.183 • Installing pydantic (1.10.6)
#0 3.304 • Installing pyyaml (6.0)
#0 3.453 • Updating setuptools (65.5.1 -> 67.6.0)
#0 3.492 • Installing soupsieve (2.4)
#0 3.556 • Installing sqlalchemy (1.4.47)
#0 3.576 • Installing starlette (0.25.0)
#0 3.701 • Installing tenacity (8.2.2)
#0 3.752 • Installing tomli (2.0.1)
#0 3.831 • Installing tqdm (4.65.0)
#0 3.843 • Installing uritemplate (4.1.1)
#0 3.955
#0 3.955 _WheelFileValidationError
#0 3.955
#0 3.955 ["In /root/.cache/pypoetry/artifacts/f2/96/74/9c8a5447a1d805edc0c82f964602703c805d10cae4b7b14e5d5d546ff0/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cp39-win_amd64.pyd didn't match RECORD", "In /root/.cache/pypoetry/artifacts/f2/96/74/9c8a5447a1d805edc0c82f964602703c805d10cae4b7b14e5d5d546ff0/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.cp39-win_amd64.pyd didn't match RECORD", "In /root/.cache/pypoetry/artifacts/f2/96/74/9c8a5447a1d805edc0c82f964602703c805d10cae4b7b14e5d5d546ff0/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll didn't match RECORD", "In /root/.cache/pypoetry/artifacts/f2/96/74/9c8a5447a1d805edc0c82f964602703c805d10cae4b7b14e5d5d546ff0/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll didn't match RECORD", "In /root/.cache/pypoetry/artifacts/f2/96/74/9c8a5447a1d805edc0c82f964602703c805d10cae4b7b14e5d5d546ff0/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe didn't match RECORD", "In /root/.cache/pypoetry/artifacts/f2/96/74/9c8a5447a1d805edc0c82f964602703c805d10cae4b7b14e5d5d546ff0/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe didn't match RECORD", "In /root/.cache/pypoetry/artifacts/f2/96/74/9c8a5447a1d805edc0c82f964602703c805d10cae4b7b14e5d5d546ff0/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll didn't match RECORD", "In /root/.cache/pypoetry/artifacts/f2/96/74/9c8a5447a1d805edc0c82f964602703c805d10cae4b7b14e5d5d546ff0/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll didn't match RECORD"]
#0 3.955
#0 3.955 at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/installer/sources.py:289 in validate_record
#0 3.961 285│ f"In {self._zipfile.filename}, hash / size of {item.filename} didn't match RECORD"
#0 3.961 286│ )
#0 3.961 287│
#0 3.961 288│ if issues:
#0 3.961 → 289│ raise _WheelFileValidationError(issues)
#0 3.961 290│
#0 3.961 291│ def get_contents(self) -> Iterator[WheelContentElement]:
#0 3.961 292│ """Sequential access to all contents of the wheel (including dist-info files).
#0 3.961 293│
#0 3.961


failed to solve: executor failed running [/bin/sh -c poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi]: exit code: 1

Set backend URL independently of host and port

The backend URL string is currently inferred from port and host and set dynamically at startup. This breaks server deployments in docker containers because the frontend uses a different url than what's exposed to the backend via Docker because of reverse proxies.

Chrome gives the following error<your langflow deployment domain> was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://0.0.0.0:8080/all'. This request has been blocked; the content must be served over HTTPS.

No module named langflow

Hi!

I can install via pip, but cannot run python -m langflow

Pip output:

Requirement already satisfied: langflow in /Users/anishthite/miniconda3/lib/python3.9/site-packages (0.0.32)

python -m langflow output:

/Users/anishthite/miniconda3/bin/python: No module named langflow

Make API keys discoverable from environment variables

Backend should check for necessary environment variables and set them up on the nodes that require them.

Probably a better way would simply acknowledge that the keys are present and use them when the chat request arrives.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.