mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-28 04:37:37 +00:00
✅ test: Update AppService capability snapshots for memory strip
AppService now strips the memory capability from the served agents defaults when no memory block is configured; update the spec's expected capability lists to defaultAgentCapabilitiesWithoutMemory for the no-memory-config cases.
This commit is contained in:
parent
9dfcd837ee
commit
ccca0ad1d5
1 changed files with 10 additions and 3 deletions
|
|
@ -60,6 +60,13 @@ const azureGroups = [
|
|||
} as const,
|
||||
];
|
||||
|
||||
/** Default agent capabilities served when no `memory` block is configured —
|
||||
* `AppService` strips `memory` from the defaults since the capability is inert
|
||||
* without a memory config. */
|
||||
const defaultAgentCapabilitiesWithoutMemory = defaultAgentCapabilities.filter(
|
||||
(capability) => capability !== AgentCapabilities.memory,
|
||||
);
|
||||
|
||||
describe('AppService', () => {
|
||||
const mockSystemTools: Record<string, FunctionTool> = {
|
||||
ExampleTool: {
|
||||
|
|
@ -132,7 +139,7 @@ describe('AppService', () => {
|
|||
endpoints: expect.objectContaining({
|
||||
agents: expect.objectContaining({
|
||||
disableBuilder: false,
|
||||
capabilities: expect.arrayContaining([...defaultAgentCapabilities]),
|
||||
capabilities: expect.arrayContaining([...defaultAgentCapabilitiesWithoutMemory]),
|
||||
maxCitations: 30,
|
||||
maxCitationsPerFile: 7,
|
||||
minRelevanceScore: 0.45,
|
||||
|
|
@ -313,7 +320,7 @@ describe('AppService', () => {
|
|||
endpoints: expect.objectContaining({
|
||||
[EModelEndpoint.agents]: expect.objectContaining({
|
||||
disableBuilder: false,
|
||||
capabilities: expect.arrayContaining([...defaultAgentCapabilities]),
|
||||
capabilities: expect.arrayContaining([...defaultAgentCapabilitiesWithoutMemory]),
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
|
|
@ -336,7 +343,7 @@ describe('AppService', () => {
|
|||
endpoints: expect.objectContaining({
|
||||
[EModelEndpoint.agents]: expect.objectContaining({
|
||||
disableBuilder: false,
|
||||
capabilities: expect.arrayContaining([...defaultAgentCapabilities]),
|
||||
capabilities: expect.arrayContaining([...defaultAgentCapabilitiesWithoutMemory]),
|
||||
}),
|
||||
[EModelEndpoint.openAI]: expect.objectContaining({
|
||||
titleConvo: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue