Interface LlmReference
-
- All Implemented Interfaces:
-
com.embabel.common.ai.prompt.PromptContributor,com.embabel.common.ai.prompt.PromptElement,com.embabel.common.core.types.Described,com.embabel.common.core.types.Named,com.embabel.common.core.types.NamedAndDescribed
public interface LlmReference implements NamedAndDescribed, PromptContributorAn LLmReference exposes tools and is a prompt contributor. The prompt contribution might describe how to use the tools or can include relevant information directly. Consider, for example, a reference to an API which is so small it's included in the prompt, versus a large API which must be accessed via tools. The reference name is used in a strategy for tool naming, so should be fairly short. Description may be more verbose. If you want a custom naming strategy, use a ToolObject directly, and add the PromptContributor separately.
-
-
Method Summary
Modifier and Type Method Description StringtoolPrefix()A safe prefix for LLM tools associated with this reference. ToolObjecttoolObject()Create a tool object for this reference. ObjecttoolInstance()Return the instance of the tool object. Stringcontribution()abstract Stringnotes()Notes about this reference, such as usage guidance. -
Methods inherited from class com.embabel.common.ai.prompt.PromptContributor
promptContribution -
Methods inherited from class com.embabel.common.core.types.Described
getDescription -
Methods inherited from class com.embabel.common.core.types.Named
getName -
Methods inherited from class com.embabel.common.ai.prompt.PromptElement
getPromptContributionLocation, getRole -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
toolPrefix
String toolPrefix()
A safe prefix for LLM tools associated with this reference. Defaults to the name lowercased with spaces replaced by underscores. Subclasses can override it
-
toolObject
ToolObject toolObject()
Create a tool object for this reference.
-
toolInstance
Object toolInstance()
Return the instance of the tool object. Defaults to this
-
contribution
String contribution()
-
-
-
-