@ai16z/eliza v0.1.5-alpha.3 / IDatabaseAdapter
Interface for database operations
db:
any
Database instance
packages/core/src/types.ts:740
init():
Promise
<void
>
Optional initialization
Promise
<void
>
packages/core/src/types.ts:743
close():
Promise
<void
>
Close database connection
Promise
<void
>
packages/core/src/types.ts:746
getAccountById(
userId
):Promise
<Account
>
Get account by ID
• userId: `${string}-${string}-${string}-${string}-${string}`
Promise
<Account
>
packages/core/src/types.ts:749
createAccount(
account
):Promise
<boolean
>
Create new account
• account: Account
Promise
<boolean
>
packages/core/src/types.ts:752
getMemories(
params
):Promise
<Memory
[]>
Get memories matching criteria
• params
• params.roomId: `${string}-${string}-${string}-${string}-${string}`
• params.count?: number
• params.unique?: boolean
• params.tableName: string
• params.agentId: `${string}-${string}-${string}-${string}-${string}`
• params.start?: number
• params.end?: number
Promise
<Memory
[]>
packages/core/src/types.ts:755
getMemoryById(
id
):Promise
<Memory
>
• id: `${string}-${string}-${string}-${string}-${string}`
Promise
<Memory
>
packages/core/src/types.ts:765
getMemoriesByRoomIds(
params
):Promise
<Memory
[]>
• params
• params.tableName: string
• params.agentId: `${string}-${string}-${string}-${string}-${string}`
• params.roomIds: `${string}-${string}-${string}-${string}-${string}`[]
Promise
<Memory
[]>
packages/core/src/types.ts:767
getCachedEmbeddings(
params
):Promise
<object
[]>
• params
• params.query_table_name: string
• params.query_threshold: number
• params.query_input: string
• params.query_field_name: string
• params.query_field_sub_name: string
• params.query_match_count: number
Promise
<object
[]>
packages/core/src/types.ts:773
log(
params
):Promise
<void
>
• params
• params.body
• params.userId: `${string}-${string}-${string}-${string}-${string}`
• params.roomId: `${string}-${string}-${string}-${string}-${string}`
• params.type: string
Promise
<void
>
packages/core/src/types.ts:782
getActorDetails(
params
):Promise
<Actor
[]>
• params
• params.roomId: `${string}-${string}-${string}-${string}-${string}`
Promise
<Actor
[]>
packages/core/src/types.ts:789
searchMemories(
params
):Promise
<Memory
[]>
• params
• params.tableName: string
• params.agentId: `${string}-${string}-${string}-${string}-${string}`
• params.roomId: `${string}-${string}-${string}-${string}-${string}`
• params.embedding: number
[]
• params.match_threshold: number
• params.match_count: number
• params.unique: boolean
Promise
<Memory
[]>
packages/core/src/types.ts:791
updateGoalStatus(
params
):Promise
<void
>
• params
• params.goalId: `${string}-${string}-${string}-${string}-${string}`
• params.status: GoalStatus
Promise
<void
>
packages/core/src/types.ts:801
searchMemoriesByEmbedding(
embedding
,params
):Promise
<Memory
[]>
• embedding: number
[]
• params
• params.match_threshold?: number
• params.count?: number
• params.roomId?: `${string}-${string}-${string}-${string}-${string}`
• params.agentId?: `${string}-${string}-${string}-${string}-${string}`
• params.unique?: boolean
• params.tableName: string
Promise
<Memory
[]>
packages/core/src/types.ts:806
createMemory(
memory
,tableName
,unique
?):Promise
<void
>
• memory: Memory
• tableName: string
• unique?: boolean
Promise
<void
>
packages/core/src/types.ts:818
removeMemory(
memoryId
,tableName
):Promise
<void
>
• memoryId: `${string}-${string}-${string}-${string}-${string}`
• tableName: string
Promise
<void
>
packages/core/src/types.ts:824
removeAllMemories(
roomId
,tableName
):Promise
<void
>
• roomId: `${string}-${string}-${string}-${string}-${string}`
• tableName: string
Promise
<void
>
packages/core/src/types.ts:826
countMemories(
roomId
,unique
?,tableName
?):Promise
<number
>
• roomId: `${string}-${string}-${string}-${string}-${string}`
• unique?: boolean
• tableName?: string
Promise
<number
>
packages/core/src/types.ts:828
getGoals(
params
):Promise
<Goal
[]>
• params
• params.agentId: `${string}-${string}-${string}-${string}-${string}`
• params.roomId: `${string}-${string}-${string}-${string}-${string}`
• params.userId?: `${string}-${string}-${string}-${string}-${string}`
• params.onlyInProgress?: boolean
• params.count?: number
Promise
<Goal
[]>
packages/core/src/types.ts:834
updateGoal(
goal
):Promise
<void
>
• goal: Goal
Promise
<void
>
packages/core/src/types.ts:842
createGoal(
goal
):Promise
<void
>
• goal: Goal
Promise
<void
>
packages/core/src/types.ts:844
removeGoal(
goalId
):Promise
<void
>
• goalId: `${string}-${string}-${string}-${string}-${string}`
Promise
<void
>
packages/core/src/types.ts:846
removeAllGoals(
roomId
):Promise
<void
>
• roomId: `${string}-${string}-${string}-${string}-${string}`
Promise
<void
>
packages/core/src/types.ts:848
getRoom(
roomId
):Promise
<`${string}-${string}-${string}-${string}-${string}`>
• roomId: `${string}-${string}-${string}-${string}-${string}`
Promise
<`${string}-${string}-${string}-${string}-${string}`>
packages/core/src/types.ts:850
createRoom(
roomId
?):Promise
<`${string}-${string}-${string}-${string}-${string}`>
• roomId?: `${string}-${string}-${string}-${string}-${string}`
Promise
<`${string}-${string}-${string}-${string}-${string}`>
packages/core/src/types.ts:852
removeRoom(
roomId
):Promise
<void
>
• roomId: `${string}-${string}-${string}-${string}-${string}`
Promise
<void
>
packages/core/src/types.ts:854
getRoomsForParticipant(
userId
):Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
• userId: `${string}-${string}-${string}-${string}-${string}`
Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
packages/core/src/types.ts:856
getRoomsForParticipants(
userIds
):Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
• userIds: `${string}-${string}-${string}-${string}-${string}`[]
Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
packages/core/src/types.ts:858
addParticipant(
userId
,roomId
):Promise
<boolean
>
• userId: `${string}-${string}-${string}-${string}-${string}`
• roomId: `${string}-${string}-${string}-${string}-${string}`
Promise
<boolean
>
packages/core/src/types.ts:860
removeParticipant(
userId
,roomId
):Promise
<boolean
>
• userId: `${string}-${string}-${string}-${string}-${string}`
• roomId: `${string}-${string}-${string}-${string}-${string}`
Promise
<boolean
>
packages/core/src/types.ts:862
getParticipantsForAccount(
userId
):Promise
<Participant
[]>
• userId: `${string}-${string}-${string}-${string}-${string}`
Promise
<Participant
[]>
packages/core/src/types.ts:864
getParticipantsForRoom(
roomId
):Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
• roomId: `${string}-${string}-${string}-${string}-${string}`
Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
packages/core/src/types.ts:866
getParticipantUserState(
roomId
,userId
):Promise
<"FOLLOWED"
|"MUTED"
>
• roomId: `${string}-${string}-${string}-${string}-${string}`
• userId: `${string}-${string}-${string}-${string}-${string}`
Promise
<"FOLLOWED"
| "MUTED"
>
packages/core/src/types.ts:868
setParticipantUserState(
roomId
,userId
,state
):Promise
<void
>
• roomId: `${string}-${string}-${string}-${string}-${string}`
• userId: `${string}-${string}-${string}-${string}-${string}`
• state: "FOLLOWED"
| "MUTED"
Promise
<void
>
packages/core/src/types.ts:873
createRelationship(
params
):Promise
<boolean
>
• params
• params.userA: `${string}-${string}-${string}-${string}-${string}`
• params.userB: `${string}-${string}-${string}-${string}-${string}`
Promise
<boolean
>
packages/core/src/types.ts:879
getRelationship(
params
):Promise
<Relationship
>
• params
• params.userA: `${string}-${string}-${string}-${string}-${string}`
• params.userB: `${string}-${string}-${string}-${string}-${string}`
Promise
<Relationship
>
packages/core/src/types.ts:881
getRelationships(
params
):Promise
<Relationship
[]>
• params
• params.userId: `${string}-${string}-${string}-${string}-${string}`
Promise
<Relationship
[]>