mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-28 11:54:20 +08:00
Merge fixes and improvements (#1910)
Co-authored-by: tristanliu <tristanliu@tencent.com>
This commit is contained in:
@@ -217,7 +217,11 @@ const MemorySection = ({ agentId }: Props) => {
|
||||
};
|
||||
|
||||
const loadMemoryList = async (
|
||||
{ filtersValue, current }: { filtersValue?: any; current?: number } = {},
|
||||
{
|
||||
filtersValue,
|
||||
current,
|
||||
pageSize,
|
||||
}: { filtersValue?: any; current?: number; pageSize?: number } = {},
|
||||
sort?: any,
|
||||
) => {
|
||||
if (!agentId) {
|
||||
@@ -249,10 +253,11 @@ const MemorySection = ({ agentId }: Props) => {
|
||||
agentId,
|
||||
chatMemoryFilter: filtersValue || filters,
|
||||
current: current || 1,
|
||||
pageSize,
|
||||
...sortParams,
|
||||
});
|
||||
setLoading(false);
|
||||
const { list, total, pageSize, pageNum } = res.data;
|
||||
const { list, total, pageNum } = res.data;
|
||||
setDataSource(list);
|
||||
setPagination({
|
||||
pageSize,
|
||||
|
||||
@@ -35,15 +35,20 @@ export function getMetricList(modelId: number) {
|
||||
});
|
||||
}
|
||||
|
||||
export function getMemeoryList(data: { agentId: number; chatMemoryFilter: any; current: number }) {
|
||||
const { agentId, chatMemoryFilter, current } = data;
|
||||
export function getMemeoryList(data: {
|
||||
agentId: number;
|
||||
chatMemoryFilter: any;
|
||||
current: number;
|
||||
pageSize: number;
|
||||
}) {
|
||||
const { agentId, chatMemoryFilter, current, pageSize } = data;
|
||||
return request<Result<{ list: MetricType[] }>>('/api/chat/memory/pageMemories', {
|
||||
method: 'POST',
|
||||
data: {
|
||||
...data,
|
||||
chatMemoryFilter: { agentId, ...chatMemoryFilter },
|
||||
current,
|
||||
pageSize: 10,
|
||||
pageSize: pageSize || 10,
|
||||
sort: 'desc',
|
||||
// orderCondition: 'updatedAt',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user