mirror of
https://github.com/LibreChat-AI/librechat.ai.git
synced 2026-03-27 02:38:32 +07:00
docs: update memory pages for custom endpoints PR (#488)
This commit is contained in:
@@ -160,7 +160,7 @@ When using custom agent configuration, the following fields are available:
|
||||
**provider** (required)
|
||||
<OptionTable
|
||||
options={[
|
||||
['provider', 'String', 'Specifies the AI provider for the memory agent (e.g., "openAI", "anthropic", "google").', 'provider: "openAI"'],
|
||||
['provider', 'String', 'Specifies the AI provider for the memory agent. Can be a built-in provider (e.g., "openAI", "anthropic", "google") or a custom endpoint name.', 'provider: "openAI"'],
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -221,6 +221,41 @@ memory:
|
||||
frequency_penalty: 0.1
|
||||
```
|
||||
|
||||
## Using Custom Endpoints
|
||||
|
||||
The memory feature supports custom endpoints. When using a custom endpoint, the `provider` field should match the custom endpoint's `name` exactly. Custom headers with environment variables and user placeholders are properly resolved.
|
||||
|
||||
```yaml filename="librechat.yaml with custom endpoint for memory"
|
||||
|
||||
endpoints:
|
||||
custom:
|
||||
- name: 'Custom Memory Endpoint'
|
||||
apiKey: 'dummy'
|
||||
baseURL: 'https://api.gateway.ai/v1'
|
||||
headers:
|
||||
x-gateway-api-key: '${GATEWAY_API_KEY}'
|
||||
x-gateway-virtual-key: '${GATEWAY_OPENAI_VIRTUAL_KEY}'
|
||||
X-User-Identifier: '{{LIBRECHAT_USER_EMAIL}}'
|
||||
X-Application-Identifier: 'LibreChat - Test'
|
||||
api-key: '${TEST_CUSTOM_API_KEY}'
|
||||
models:
|
||||
default:
|
||||
- 'gpt-4o-mini'
|
||||
- 'gpt-4o'
|
||||
fetch: false
|
||||
|
||||
memory:
|
||||
disabled: false
|
||||
tokenLimit: 3000
|
||||
personalize: true
|
||||
messageWindowSize: 10
|
||||
agent:
|
||||
provider: 'Custom Memory Endpoint'
|
||||
model: 'gpt-4o-mini'
|
||||
```
|
||||
|
||||
- See [Custom Endpoint Headers](/docs/configuration/librechat_yaml/object_structure/custom_endpoint#headers) for all available placeholders
|
||||
|
||||
## Notes
|
||||
|
||||
- Memory functionality enhances conversation continuity and personalization
|
||||
|
||||
@@ -154,6 +154,41 @@ memory:
|
||||
id: "memory-specialist-001"
|
||||
```
|
||||
|
||||
### Custom Endpoints with Memory
|
||||
|
||||
Memory fully supports custom endpoints, including those with custom headers and environment variables. When using a custom endpoint, header placeholders and environment variables are properly resolved during memory processing.
|
||||
|
||||
```yaml filename="librechat.yaml with custom endpoint for memory"
|
||||
|
||||
endpoints:
|
||||
custom:
|
||||
- name: 'Custom Memory Endpoint'
|
||||
apiKey: 'dummy'
|
||||
baseURL: 'https://api.gateway.ai/v1'
|
||||
headers:
|
||||
x-gateway-api-key: '${GATEWAY_API_KEY}'
|
||||
x-gateway-virtual-key: '${GATEWAY_OPENAI_VIRTUAL_KEY}'
|
||||
X-User-Identifier: '{{LIBRECHAT_USER_EMAIL}}'
|
||||
X-Application-Identifier: 'LibreChat - Test'
|
||||
api-key: '${TEST_CUSTOM_API_KEY}'
|
||||
models:
|
||||
default:
|
||||
- 'gpt-4o-mini'
|
||||
- 'gpt-4o'
|
||||
fetch: false
|
||||
|
||||
memory:
|
||||
disabled: false
|
||||
tokenLimit: 3000
|
||||
personalize: true
|
||||
messageWindowSize: 10
|
||||
agent:
|
||||
provider: 'Custom Memory Endpoint'
|
||||
model: 'gpt-4o-mini'
|
||||
```
|
||||
|
||||
- All [custom endpoint headers](/docs/configuration/librechat_yaml/object_structure/custom_endpoint#headers) are supported
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Memory Not Working
|
||||
@@ -161,6 +196,7 @@ memory:
|
||||
2. Check that `disabled` is set to `false`
|
||||
3. Ensure the configured agent/model is available
|
||||
4. Verify users have enabled memory in their chat interface
|
||||
5. For custom endpoints: ensure the `provider` name matches the custom endpoint `name` exactly
|
||||
|
||||
### High Token Usage
|
||||
1. Reduce `tokenLimit` to control costs
|
||||
@@ -174,6 +210,12 @@ memory:
|
||||
3. Ensure consistent agent configuration
|
||||
4. Review stored memory for conflicts
|
||||
|
||||
### Custom Endpoint Authentication Issues
|
||||
1. Verify environment variables are set correctly in your `.env` file
|
||||
2. Ensure custom headers use the correct syntax (`${ENV_VAR}` for environment variables, `{{LIBRECHAT_USER_*}}` for user placeholders)
|
||||
3. Check that the custom endpoint is working for regular chat completions before testing with memory
|
||||
4. Review server logs for authentication errors from the custom endpoint API
|
||||
|
||||
## Related Features
|
||||
|
||||
- [Agents](/docs/features/agents) - Build custom AI assistants
|
||||
|
||||
Reference in New Issue
Block a user