parent
ed3306fb7e
commit
cc52f5f00d
1 changed files with 46 additions and 2 deletions
|
|
@ -35,9 +35,53 @@ You can also open a flow's **Playground** without entering its workspace. From *
|
|||
|
||||
---
|
||||
|
||||
Click the Memories tab to open a table of previous interactions for a specific flow.
|
||||
|
||||
Whenever you send a message from the **Playground** interface, under the **Memories** **Tab** you'll see a table of previous interactions for that session.
|
||||
Whenever you send a message from the **Playground** interface, under the **Memories** tab you'll see a table of previous interactions for that session.
|
||||
|
||||
Langflow allows every chat message to be stored, and a single flow can have multiple memory sessions.
|
||||
|
||||
Langflow allows every chat message to be stored, and a single flow can have multiple memory sessions. To learn more about how to use memories in Langflow, see [Chat Memory](/guides-chat-memory).
|
||||
Chat conversations store messages categorized by a Session ID. A single flow can host multiple Session IDs, and different flows can share the same Session ID.
|
||||
|
||||
Individual messages in chat memory can be edited or deleted. Modifying these memories will influence the behavior of the chatbot responses.
|
||||
|
||||
To learn more about memories in Langflow, see [Chat Memory](/guides-chat-memory).
|
||||
|
||||
## Use custom Session IDs for multiple user interactions
|
||||
|
||||
Session ID values are used to track user interactions in a flow. They can be configured in the Advanced Settings of the Chat Input and Chat Output components.
|
||||
|
||||
By default, if the Session ID value is empty, it is set to the same value as the Flow ID. This means every API call will use the same Session ID, and you’ll effectively have one session.
|
||||
|
||||
To have more than one session in a single flow, pass a specific Session ID to a flow with the `session_id` parameter in the URL. All the components in the flow will automatically use this `session_id` value.
|
||||
|
||||
Post a message to a flow with a specific Session ID with curl:
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"http://127.0.0.1:7860/api/v1/run/4017e9f2-1fec-4643-bb05-165a8b50c4b3?stream=false" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"input_value": "message",
|
||||
"output_type": "chat",
|
||||
"input_type": "chat",
|
||||
"session_id": "YOUR_SESSION_ID"
|
||||
}'
|
||||
```
|
||||
|
||||
Check your flow’s Memories tab. In addition to the messages stored for the Default Session, a new chat session is started with your new Session ID.
|
||||
|
||||
**Chat Input** and **Chat Output** components can also store a `session_id` parameter as a **Tweak** for specific sessions. The Playground will still display all available sessions, but the flow will use the value stored in the `session_id` tweak.
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"http://127.0.0.1:7860/api/v1/run/4017e9f2-1fec-4643-bb05-165a8b50c4b3?stream=false" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"input_value": "message",
|
||||
"output_type": "chat",
|
||||
"input_type": "chat",
|
||||
"tweaks": {
|
||||
"session_id": "YOUR_SESSION_ID"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue