You need to enable JavaScript to run this app.
导航
查看记忆库列表-ListCollection
最近更新时间:2025.11.12 16:58:44首次发布时间:2025.11.12 16:58:44
复制全文
我的收藏
有用
有用
无用
无用

接口概述

根据用户账户与指定项目,获取该用户所属的所有记忆库列表。返回每个记忆库的基本信息,包括名称、描述、内置/自定义事件类型与画像类型,以及创建时间和更新时间。

请求接口

URL

/api/memory/collection/list

统一资源标识符

请求方法

POST

客户端对记忆库服务器请求的操作类型

请求头

Content-Type: application/json

请求消息类型

Authorization: HMAC-SHA256 ***

基于AK/SK生成的签名信息

请求参数

参数名

类型

是否必填

描述

ProjectName

String

项目名称。默认为全部项目。

响应消息

参数名

类型

参数描述

ResponseMetadata

Object

响应元数据信息。

  • Region

String

服务区域,例如"cn-beijing"。

  • RequestId

String

请求唯一标识符

  • Service

String

服务名称,如"knowledge_base_server"。

  • Version

String

API版本号。

Result

Object

记忆库的详细配置信息。

  • CreateAt

String

记忆库创建时间,例如"2025-06-03T06:35:32"。

  • CreatedBy

String

记忆库创建者。

  • DescMsg

String

记忆库描述信息,例如"用于记录和分析学生英语学习过程的记忆库"。

  • Name

String

记忆库名称,例如"english_learning_memory"。

  • PipelineConfig

Object

管道配置信息。

  • CpuQuota

Int

消耗资源

  • LlmExtractConfig
  • -BuiltinProfileTypes

Array of String

内置画像类型列表。

  • -BuiltinEventTypes

Array of String

内置事件类型列表。

  • -CustomProfileTypeSchemas

Array of ProfileTypeSchema

用户自定义的画像类型模式列表。

  • --AssociatedEventTypes

Array of String

与此画像类型相关联的事件类型名称列表,例如["english_study"]。

  • --Description

String

画像类型的详细描述,例如"用于追踪学生在特定英语知识点上的学习进展"。

  • --ProfileType

String

画像类型的唯一名称,例如"english_knowledge_point"。

  • --Properties

Array of ProfileProperty

构成此画像类型的属性列表。

  • ---AggregateExpression

Object

聚合表达式配置,定义此属性如何从关联的事件中聚合计算而来。

  • ---EventPropertyName

String

参与聚合的事件类型中的属性名称,例如"rating_score"。

  • ----EventType

String

参与聚合的事件类型名称,例如"english_study"。

  • ----Op

String

聚合操作符,例如"MAX"、"SUM"、"COUNT"。

  • ---Description

String

属性的详细描述,例如"知识点的唯一主键ID"。

  • ---IsPrimaryKey

Boolean

是否为画像的主键,例如true。

  • ---PropertyName

String

属性名称,例如"id"、"knowledge_point_name"。

  • ---PropertyValueType

String

属性值的类型,例如"int64"、"string"、"list"。

  • --Role

String

角色类型,例如"user"。

  • --Version

String

画像模式版本号,例如"1"。

  • -CustomEventTypeSchemas

Array of EventTypeSchema

用户自定义的事件类型模式列表。

  • --Description

String

事件类型的详细描述,例如"记录一次英语学习会话中助教与学生的问答及评分"。

  • --EventType

String

事件类型的唯一名称,例如"english_study"。

  • --HasMultiEvent

Boolean

是否支持多事件,例如true。

  • --OriginalMessagePreserveStrategy

String

原始消息保存策略,例如"ranges"。

  • --Properties

Array of EventProperty

构成此事件类型的属性列表。

  • ---Description

String

属性的详细描述,例如"当前对话涉及的知识点名称"。

  • ---PropertyName

String

属性名称,例如"knowledge_point_name"、"question"、"answer"。

  • ---PropertyValueType

String

属性值的类型,例如"string"、"float32"。

  • --Searchable

Boolean

是否可搜索,例如true。

  • --ValidationExpression

String

验证表达式。

  • --Version

String

版本号,例如"1"。

  • Project

String

项目名称,例如"default"。

  • ResourceId

String

资源唯一标识符。

  • UpdatedAt

String

最后更新时间,例如"2025-06-03T06:35:32"。

  • EventCount

Int

当前collection事件记忆数量

  • ProfileCount

Int

当前collection画像记忆数量

TotalNum

Int

项目中记忆库的数量

示例代码

Python 代码

import volcenginesdkcore
import volcenginesdkvikingdb
from volcenginesdkcore.rest import ApiException
from volcenginesdkvikingdb import MemoryCollectionListRequest, MemoryCollectionListResponse
host="vikingdb.cn-beijing.volcengineapi.com"
# 全局设置
configuration = volcenginesdkcore.Configuration()
configuration.ak =  "your_ak"
configuration.sk = "your_sk"
configuration.debug = True
configuration.host = host
configuration.region = "cn-beijing"
configuration.scheme="https"
configuration.client_side_validation = True
volcenginesdkcore.Configuration.set_default(configuration)
api_instance = volcenginesdkvikingdb.VIKINGDBApi()
try:
    body:MemoryCollectionListRequest = MemoryCollectionListRequest(project_name="default")
    res:MemoryCollectionListResponse = api_instance.memory_collection_list(body)
    print(res.to_dict())
except ApiException as e:
    pass