Package org.netxms.client.ai
Class AiMemoryEntry
java.lang.Object
org.netxms.client.ai.AiMemoryEntry
AI memory entry: fact about the monitored environment, note about a user, or note about an object that persists
across AI assistant chats, AI tasks, and AI operator iterations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charSource type of entries written by the model from an interactive chat, chat bot session, or one-shot requeststatic final charSource type of entries written by a user through the client or web APIstatic final charSource type of entries written by the model during AI operator iterationstatic final charSource type of entries written by the model during AI task execution -
Constructor Summary
ConstructorsConstructorDescriptionAiMemoryEntry(NXCPMessage msg, long baseId) Create memory entry object from NXCP message.Create copy of memory entry (for editing without changing the original).AiMemoryEntry(AiMemoryScope scope, int scopeId, String title, String content) Create new memory entry definition (for subsequent creation on server). -
Method Summary
Modifier and TypeMethodDescriptionvoidfillMessage(NXCPMessage msg) Fill NXCP message with entry data for create/modify request.intgetId()getScope()intintcharintgetTitle()booleanbooleanisLocked()voidsetContent(String content) voidsetLocked(boolean locked) void
-
Field Details
-
SOURCE_CHAT
public static final char SOURCE_CHATSource type of entries written by the model from an interactive chat, chat bot session, or one-shot request- See Also:
-
SOURCE_TASK
public static final char SOURCE_TASKSource type of entries written by the model during AI task execution- See Also:
-
SOURCE_OPERATOR
public static final char SOURCE_OPERATORSource type of entries written by the model during AI operator iteration- See Also:
-
SOURCE_HUMAN
public static final char SOURCE_HUMANSource type of entries written by a user through the client or web API- See Also:
-
-
Constructor Details
-
AiMemoryEntry
Create new memory entry definition (for subsequent creation on server).- Parameters:
scope- entry scopescopeId- scope ID (user ID for user scope, object ID for object scope, 0 for environment scope)title- entry title (unique within scope)content- entry content
-
AiMemoryEntry
Create copy of memory entry (for editing without changing the original).- Parameters:
src- source entry
-
AiMemoryEntry
Create memory entry object from NXCP message.- Parameters:
msg- NXCP messagebaseId- base ID for fields
-
-
Method Details
-
fillMessage
Fill NXCP message with entry data for create/modify request.- Parameters:
msg- NXCP message
-
getId
public int getId()- Returns:
- entry ID (0 for entries not yet created on server)
-
getScope
- Returns:
- entry scope
-
getScopeId
public int getScopeId()- Returns:
- scope ID (user ID for user scope, object ID for object scope, 0 for environment scope)
-
getTitle
- Returns:
- entry title
-
setTitle
- Parameters:
title- new entry title
-
getContent
- Returns:
- entry content
-
setContent
- Parameters:
content- new entry content
-
isCreatedByModel
public boolean isCreatedByModel()- Returns:
- true if entry was created by the model, false if created by a user
-
getSourceUserId
public int getSourceUserId()- Returns:
- ID of the user on whose behalf the entry was created
-
getSourceType
public char getSourceType()- Returns:
- source type (one of SOURCE_* constants)
-
getSourceId
public int getSourceId()- Returns:
- source ID (chat ID, AI task ID, or AI operator instance ID depending on source type; 0 for human source)
-
getCreationTime
- Returns:
- creation time
-
getModificationTime
- Returns:
- last modification time
-
isLocked
public boolean isLocked()- Returns:
- true if entry is locked (cannot be changed or deleted by the model)
-
setLocked
public void setLocked(boolean locked) - Parameters:
locked- true to lock entry
-