Package com.tnsai.annotations
Class ClassConfig.Level
java.lang.Object
com.tnsai.annotations.ClassConfig.Level
- Enclosing class:
ClassConfig
One level of a file: an agent, a role in an agent's file, or a role's
own file.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanknowledgeMembers(String name) The members this level gives for one knowledge name, by theirKnowledgeattribute names, such aspath,unitoruse.This level's knowledge over the declared one: a declared name is overridden member by member,searchincluded, and an entry that changesusekeeps the declaredmaxTokensorsearchonly when the newuseapplies to it (KnowledgeDeclarations.keepsMaxTokens(com.tnsai.annotations.Knowledge.Use, com.tnsai.annotations.Knowledge.Use),KnowledgeDeclarations.keepsSearch(com.tnsai.annotations.Knowledge.Use, com.tnsai.annotations.Knowledge.Use)); a name the declared entries lack follows them as a full declaration, in name order.llm()where()
-
Method Details
-
llm
- Returns:
- field name to value, in file order; empty when absent
-
hasKnowledge
public boolean hasKnowledge()- Returns:
truewhen this level gives knowledge
-
knowledgeNames
- Returns:
- the knowledge names this level gives
-
knowledgeMembers
The members this level gives for one knowledge name, by theirKnowledgeattribute names, such aspath,unitoruse. Asearchobject is the one membersearch. Only the names are given; the layered values are on the declared knowledge. A host can ask, for example, whether any level of a role gives apathfor a name.- Parameters:
name- a knowledge name- Returns:
- the attribute names, unmodifiable; empty when this level
gives no entry for
name - Since:
- 0.18.0
-
layer
This level's knowledge over the declared one: a declared name is overridden member by member,searchincluded, and an entry that changesusekeeps the declaredmaxTokensorsearchonly when the newuseapplies to it (KnowledgeDeclarations.keepsMaxTokens(com.tnsai.annotations.Knowledge.Use, com.tnsai.annotations.Knowledge.Use),KnowledgeDeclarations.keepsSearch(com.tnsai.annotations.Knowledge.Use, com.tnsai.annotations.Knowledge.Use)); a name the declared entries lack follows them as a full declaration, in name order. The declared entries are everything below this level, so a name a lower file added is overridden member by member too. A relative FILEpaththis level gives resolves against the base directory the file was read with, when one was set.- Parameters:
declared- the entries below this level- Returns:
- the layered entries
-
where
- Returns:
- where this level is, for messages
-