This commit is contained in:
Mendon Kissling 2024-06-23 10:07:52 -04:00 committed by Gabriel Luiz Freitas Almeida
commit 85c1d79d3e
7 changed files with 39 additions and 2 deletions

View file

@ -0,0 +1,34 @@
import ThemedImage from "@theme/ThemedImage";
import useBaseUrl from "@docusaurus/useBaseUrl";
import ZoomableImage from "/src/theme/ZoomableImage.js";
import Admonition from "@theme/Admonition";
# Chat Memory
Langflow allows every chat message to be stored, and a single flow can have multiple memory sessions. This enables you to create multiple “memories” for agents to store and recall specific information as needed. You can edit and remove previous messages to inspect and validate a models response behavior. Control, explore, and manage conversation histories to get your models acting just right.
The **Chat Memory** component retrieves message histories by session ID. Users can change the session ID in the advanced settings, with the default session ID set to match the flow ID. These memories are accessible and manageable directly from the Playground; modifications to them directly affect the behavior of chatbot responses. Users can remove or edit previous messages to manipulate and explore model responses further.
<ZoomableImage
alt="Docusaurus themed image"
sources={{
light: "img/chat-memory-component.png",
dark: "img/chat-memory-component.png",
}}
style={{ width: "40%", margin: "20px auto" }}
/>
By default, chat conversations store Message objects categorized by session ID. A a single flow can host multiple session IDs, and different flows can also share the same session ID.
Memories can be visualized and managed directly from the Playground. Modifying these memories will influence the behavior of the chatbot responses, as long as an agent uses them. Here you have the ability to remove or edit previous messages, allowing them to manipulate and explore how these changes affect model responses.
<ZoomableImage
alt="Docusaurus themed image"
sources={{
light: "img/playground-memories.png",
dark: "img/playground-memories.png",
}}
style={{ width: "40%", margin: "20px auto" }}
/>
You can also display all messages stored across every flow in your workspace by going to **Settings** > **Messages**.

View file

@ -1,5 +1,6 @@
# Settings
Change the **Project Settings** or **General Settings** for Langflow.
## Project Settings

View file

@ -1,6 +1,6 @@
# Text and Data
In Langflow 1.0, we added two main input and output types: `Text` and `Data`.
There are two main input and output types: `Text` and `Data`.
`Text` is a simple string input and output type, while `Data` is a structure very similar to a dictionary in Python. It is a key-value pair data structure.

View file

@ -123,6 +123,7 @@ will see orange <span style={{ color: "orange" }}>o</span> and purple{" "}
/>
<div style={{ marginBottom: "20px" }}>
In the top right corner of the component, you'll find the component status icon (![Status icon](/logos/playbutton.svg)).
Build the flow by clicking the **![Playground icon](/logos/botmessage.svg)Playground** at the bottom right of the workspace.
@ -255,7 +256,7 @@ The **curl** tab displays sample code for posting a query to your flow.
Modify the `input_value` to change your input message.
Copy the code and run it to post a query to your flow and get the result.
```curl
```bash
curl -X POST \
http://127.0.0.1:7863/api/v1/run/f2eefd80-bb91-4190-9279-0d6ffafeaac4\?stream\=false \
-H 'Content-Type: application/json'\

View file

@ -40,6 +40,7 @@ module.exports = {
"administration/login",
"administration/cli",
"administration/playground",
"administration/memories",
"administration/collections-projects",
"administration/settings",
"administration/global-env",

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
docs/static/img/playground-memories.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 KiB