Package-level declarations

Types

Link copied to clipboard
data class LiteralText(val name: String, val description: String, val notes: String) : LlmReferenceProvider, LlmReference

Reference for literal text, in notes field. Held in memory.

Link copied to clipboard
interface LlmReference

An 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.

Link copied to clipboard

Provider of a serializable reference - supports dynamic subclass loading This is important to allow LlmReferences to be serialized, externalized in application.yml files, loaded from a database etc.

Link copied to clipboard

Parse LlmReferenceProviders from YML files

Link copied to clipboard
data class LocalDirectoryReference(val root: String, val description: String, val notes: String, val name: String = root.substringAfterLast('/')) : LlmReferenceProvider, LlmReference

Reference for a local directory on the filesystem. Provides readonly access via file read tools.

Link copied to clipboard
data class SpringResource constructor(val resourcePath: String, val name: String = resourcePath, val description: String = "Spring resource at ") : LlmReferenceProvider, LlmReference

Contents of a Spring resource as an LlmReference. Read and held in memory.

Link copied to clipboard
data class WebPage(val url: String, val name: String = url, val description: String = "Web page at ") : LlmReferenceProvider, LlmReference

Reference for the contents of a web page. Works only if fetch tool is available. See CoreToolGroups.WEB