Comments (4)
Hey @qiaolb! I'm here to help you with any questions or issues you have regarding Langflow API. I can assist you with bug fixes, troubleshooting, and more while you wait for a human maintainer. Let's tackle these inquiries together!
To ensure distinct and isolated sessions for multiple users accessing Langflow flows via curl, you can use the session_id
parameter in the SimplifiedAPIRequest
. Each user should be assigned a unique session_id
to maintain session isolation.
For passing custom parameters to a Langflow flow through curl, you can use the tweaks
parameter in the request body. The tweaks
parameter allows you to customize the flow's behavior by modifying its parameters and components.
Here is an example of how to use curl to run a flow with custom parameters and ensure session isolation:
curl -X 'POST' \
'http://<your_server>/run/{flow_id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"input_value": "Sample input",
"input_type": "chat",
"output_type": "chat",
"tweaks": {
"Component Name": {"parameter_name": "value"},
"parameter_name": "value"
},
"session_id": "unique_session_id_for_user"
}'
In this example:
- Replace
<your_server>
with the actual server address. - Replace
{flow_id}
with the specific flow ID you want to run. - Replace
YOUR_API_KEY
with your actual API key. - Customize the
input_value
,input_type
,output_type
, andtweaks
as needed. - Use a unique
session_id
for each user to ensure session isolation [1].
To continue talking to Dosu, mention @dosu.
from langflow.
I have a simple flow that uses the chat input for entry. I would like to inquire about the difference between the input_value and the parameters of the Component when making an API call. Here is an example:
curl -X 'POST' \
'http://<your_server>/run/{flow_id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"input_value": "hello",
"input_type": "chat",
"output_type": "chat",
"tweaks": {
"ChatInput-tmTWU": {}
},
"session_id": "unique_session_id_for_user"
}'
curl -X 'POST' \
'http://<your_server>/run/{flow_id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"input_value": "",
"input_type": "chat",
"output_type": "chat",
"tweaks": {
"ChatInput-tmTWU": {"input_value": "hello"}
},
"session_id": "unique_session_id_for_user"
}'
from langflow.
Not work
from langflow.
This problem has been resolved. Thanks!
from langflow.
Related Issues (20)
- Qdrant Vector Store doesnt' use the advanced fields when ingesting documents HOT 1
- Issue with OpenAI Component Outputs When Running Multiple Components in Parallel HOT 1
- LangChain await bug with SQLAgent HOT 3
- Cannot access to Langflow HOT 7
- Bug - Not able to open multiple projects when on running langflow locally HOT 1
- ValueError: Error performing search in AstraDBVectorStore: 'content' HOT 1
- Knowledge Graph Integration for LangFlow HOT 1
- Failed to create any VectorStore - Error building Component Astra DB / Chroma DB HOT 8
- Langflow
- image/api load into the flow HOT 7
- Cloud version: same LLM answer is used across 2 differents output component HOT 3
- Asyncio Thread error when running Flow as Tool with a Agent
- Is there any estimated date for langfuse to be integrated back?
- Support GraphRAG
- Entry
- Getting frequent Server is busy messages HOT 4
- Got an error after run, but still can open the web page HOT 1
- API-Streaming responses a 500 Error HOT 1
- javascript api error with the api key HOT 1
- langflow doesnt run on mac os monterey HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langflow.