Skip to content

Commit 915678e

Browse files
committed
update to 1.0.17
1 parent a14d11c commit 915678e

File tree

8 files changed

+64
-8
lines changed

8 files changed

+64
-8
lines changed

LOADBALANCE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Load Balancing and Routing
2+
3+
Langflow (at least at version 1.0.15) expects all URLs to be rooted from `/`: there is not a straightforward way to configure a `base_url` or similar.
4+
This is a challenge for load balancers and other application routers. This goal of this page is to inform you about some tricks you can use
5+
to configure your own system; it is based on the popular Nginx framework but should be easily translatable to whatever framework you use.
6+
7+
## Server Proxy
8+
9+
Consider this Nginx `server` configuration, which allows Langflow developers to access the UI at `langflow.dev.internal` on port `80`,
10+
whilst routing requests to `langflow.dev.service` on port `7860`:
11+
12+
```
13+
server {
14+
listen 80;
15+
16+
server_name langflow.dev.internal;
17+
18+
location / {
19+
proxy_pass http://langflow.dev.service:7860;
20+
proxy_set_header Host $host;
21+
proxy_set_header X-Real-IP $remote_addr;
22+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
23+
proxy_set_header X-Forwarded-Proto $scheme;
24+
}
25+
}
26+
```
27+
28+
## Server Proxy with Routing
29+
30+
To add an application routing based on URL (in this case `/chat`), use the route to identify the destination location, but
31+
remove the route from the URL before passing to Langflow:
32+
33+
```
34+
server {
35+
listen 80;
36+
37+
server_name langflow.test.internal;
38+
39+
location /chat {
40+
rewrite ^/chat/(.*)$ /$1 break;
41+
proxy_pass http://langflow.test.service:7860;
42+
proxy_set_header Host $host;
43+
proxy_set_header X-Real-IP $remote_addr;
44+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
45+
proxy_set_header X-Forwarded-Proto $scheme;
46+
}
47+
}
48+
```
49+
50+
Two important things to note about this routing approach:
51+
52+
1. The Langflow frontend will not work without a '/' location, but backend API calls should. You can combine both locations within the `server` configuration.
53+
2. Some returned content (such as when an API is called with `stream=true`) includes URLs that will not be prefixed (i.e. `stream_url` will begin `/api/v1/...`); you will need to add the prefix within your application logic.
54+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ apply your own Enterprise architucture patterns to it.
3333

3434
## Langflow Version
3535

36-
This repo is currently based on Langflow v1.0.14; future versions of Langflow may change
36+
This repo is currently based on Langflow v1.0.17; future versions of Langflow may change
3737
the advice.
3838

3939
## Contributions

example.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,10 @@ <h2>Document Summary</h2>
289289
output_type: "chat",
290290
input_type: "chat",
291291
"tweaks": {
292-
"TextInput-eYtbq": {"input_value": base64Content },
293-
"TextInput-AlrlI": {"input_value": filename }
292+
"Parameter Input": {
293+
"base64_file": base64Content,
294+
"filename": filename
295+
}
294296
}
295297
})
296298
})

flows/AstraMemoryChatbot.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

flows/BasicMemoryChatbot.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

flows/PiratePrompt.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

flows/ResearchPaperDigest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

render.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ services:
3636
- key: LANGFLOW_HOST
3737
value: 0.0.0.0
3838
- key: LANGFLOW_PORT
39-
value: 10000
39+
value: 10000 # This is the default port used by Render
4040
- key: LANGFLOW_LOG_LEVEL
4141
value: INFO
4242
- fromGroup: langflow-demo-flow-secrets

0 commit comments

Comments
 (0)