LlmInteraction

data class LlmInteraction(val id: InteractionId, val llm: <Error class: unknown class> = LlmOptions(), val toolGroups: Set<ToolGroupRequirement> = emptySet(), val toolCallbacks: List<<Error class: unknown class>> = emptyList(), val promptContributors: List<<Error class: unknown class>> = emptyList(), val contextualPromptContributors: List<ContextualPromptElement> = emptyList(), val generateExamples: Boolean? = null) : LlmCall

Encapsulates an interaction with an LLM. An LlmInteraction is a specific instance of an LlmCall. The LLM must have been chosen and the call has a unique identifier.

Parameters

id

Unique identifier for the interaction. Note that this is NOT the id of this particular LLM call, but of the interaction in general. For example, it might be the "analyzeProject" call within the "Analyze" action. Every such call with have the same id, but many calls may be made across different AgentProcesses, or even within the same AgentProcess if the action can be rerun. This is per action, not per process.

llm

LLM options to use, specifying model and hyperparameters

toolCallbacks

Tool callbacks to use for this interaction

promptContributors

Prompt contributors to use for this interaction

Constructors

Link copied to clipboard
constructor(id: InteractionId, llm: <Error class: unknown class> = LlmOptions(), toolGroups: Set<ToolGroupRequirement> = emptySet(), toolCallbacks: List<<Error class: unknown class>> = emptyList(), promptContributors: List<<Error class: unknown class>> = emptyList(), contextualPromptContributors: List<ContextualPromptElement> = emptyList(), generateExamples: Boolean? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val generateExamples: Boolean? = null

Whether to generate examples for the prompt. Defaults to unknown: Set to false if generating your own examples.

Link copied to clipboard
Link copied to clipboard
open override val llm: <Error class: unknown class>
Link copied to clipboard
open override val name: String
Link copied to clipboard
open val promptContributors: List<<Error class: unknown class>>
Link copied to clipboard
open override val toolCallbacks: List<<Error class: unknown class>>
Link copied to clipboard
open override val toolGroups: Set<ToolGroupRequirement>

Tool groups exposed. This will include directly registered tool groups and tool groups resolved from ToolGroups.

Functions

Link copied to clipboard
open fun resolveToolCallbacks(toolGroupResolver: ToolGroupResolver): List<<Error class: unknown class>>