跳到主要内容

aimemory

共 7 个函数

函数索引​

函数参数返回值说明
aimemory.CurrentNamespace-string

可变参数函数索引​

函数参数返回值说明
aimemory.Amendoperator string, memoryID string, content string, tags []string, opts ...Option*Item, errormanages one exact memory ID in a namespace. Change deletes the old
aimemory.Searchquery string, opts ...Option[]*Item, errorreads an existing memory set. It does not initialize triage,

函数详情​

CurrentNamespace​

CurrentNamespace() string

暂无描述

返回值

序号类型说明
r1string

可变参数函数详情​

Amend​

Amend(operator string, memoryID string, content string, tags []string, opts ...Option) (*Item, error)

manages one exact memory ID in a namespace. Change deletes the old memory and its indexes, then writes a replacement with a new ID.

必填参数

参数名类型说明
operatorstring
memoryIDstring
contentstring
tags[]string

可选参数

可作为可变参数 opts ...Option 传入选项;共 4 个可用选项,详见 Option 选项列表。

返回值

序号类型说明
r1*Item
r2error

Search(query string, opts ...Option) ([]*Item, error)

reads an existing memory set. It does not initialize triage, create collections or update injection. Returned items expose raw readable Dump text.

必填参数

参数名类型说明
querystring

可选参数

可作为可变参数 opts ...Option 传入选项;共 4 个可用选项,详见 Option 选项列表。

返回值

序号类型说明
r1[]*Item
r2error

可变参数选项列表​

以下按选项类型汇总全部可变参数选项(原先重复在各主函数下的选项表已收拢到此处):

1. 类型:Option​

涉及到的函数有:aimemory.Amend、aimemory.Search

选项函数参数返回值说明
aimemory.memoryLimitn intOption
aimemory.memoryNamespaceid stringOption
aimemory.memorySearchModemode stringOption
aimemory.memoryTokenLimitn intOption