Update Short Term Memory Config
curl --request PUT \
--url http://localhost:8080/api/v2/config/memory/episodic/short_term \
--header 'Content-Type: application/json' \
--data '
{
"llm_model": "<string>",
"message_capacity": 1,
"enabled": true
}
'import requests
url = "http://localhost:8080/api/v2/config/memory/episodic/short_term"
payload = {
"llm_model": "<string>",
"message_capacity": 1,
"enabled": True
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({llm_model: '<string>', message_capacity: 1, enabled: true})
};
fetch('http://localhost:8080/api/v2/config/memory/episodic/short_term', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v2/config/memory/episodic/short_term",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'llm_model' => '<string>',
'message_capacity' => 1,
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v2/config/memory/episodic/short_term"
payload := strings.NewReader("{\n \"llm_model\": \"<string>\",\n \"message_capacity\": 1,\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("http://localhost:8080/api/v2/config/memory/episodic/short_term")
.header("Content-Type", "application/json")
.body("{\n \"llm_model\": \"<string>\",\n \"message_capacity\": 1,\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v2/config/memory/episodic/short_term")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"llm_model\": \"<string>\",\n \"message_capacity\": 1,\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Configuration
Update Short Term Memory Config
Update short-term memory configuration.
This endpoint updates the short-term memory configuration at runtime. Only the fields you supply are modified; omitted fields retain their current values.
The configuration includes:
- llm_model: The language model to use for summarization
- message_capacity: Maximum message capacity in characters
- enabled: Whether short-term memory is enabled
PUT
/
api
/
v2
/
config
/
memory
/
episodic
/
short_term
Update Short Term Memory Config
curl --request PUT \
--url http://localhost:8080/api/v2/config/memory/episodic/short_term \
--header 'Content-Type: application/json' \
--data '
{
"llm_model": "<string>",
"message_capacity": 1,
"enabled": true
}
'import requests
url = "http://localhost:8080/api/v2/config/memory/episodic/short_term"
payload = {
"llm_model": "<string>",
"message_capacity": 1,
"enabled": True
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({llm_model: '<string>', message_capacity: 1, enabled: true})
};
fetch('http://localhost:8080/api/v2/config/memory/episodic/short_term', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v2/config/memory/episodic/short_term",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'llm_model' => '<string>',
'message_capacity' => 1,
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v2/config/memory/episodic/short_term"
payload := strings.NewReader("{\n \"llm_model\": \"<string>\",\n \"message_capacity\": 1,\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("http://localhost:8080/api/v2/config/memory/episodic/short_term")
.header("Content-Type", "application/json")
.body("{\n \"llm_model\": \"<string>\",\n \"message_capacity\": 1,\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v2/config/memory/episodic/short_term")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"llm_model\": \"<string>\",\n \"message_capacity\": 1,\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Specification for updating short-term memory configuration with enabled flag.
The ID of the language model to use for short-term memory summarization.
Must reference a language model configured in the resources section.
The maximum message capacity for short-term memory, in characters.
When exceeded, older messages are summarized.
Required range:
x > 0⌘I

