AIAgentLLMWriteSessionCommon
Common base implementation for mutable LLM sessions shared across platform-specific actual classes.
Inheritors
Properties
Functions
Appends messages to the current prompt using PromptBuilder.
Updates LLM parameters on the current prompt.
Updates the active model in this session.
Clears the history of messages in the current AI Agent LLM Write Session.
Removes the last n messages from the current prompt in the write session.
Drops all trailing tool call messages from the current prompt
Keeps only the last N messages in the session's prompt by removing all earlier messages.
Removes all messages from the current session's prompt that have a timestamp earlier than the specified timestamp.
Parses a structured response from an assistant message using the specified configuration.
Rewrites LLM message history, leaving only user message and resulting TLDR.
Sends a request to LLM and appends the response to the prompt.
Sends a request while forcing a specific tool and appends the response to the prompt.
Sends a request to LLM and appends all received responses to the prompt.
Sends a request to LLM and returns all available response choices.
Sends a request that enforces tool calling and appends all received responses to the prompt.
Sends a request without tool usage and appends all received responses to the prompt.
Sends a request that enforces tool calling and appends the received response to the prompt.
Sends a streaming request to LLM.
Streams a response from LLM, optionally adding a structure definition to the prompt beforehand.
Sends a request to LLM and gets a structured response, appending the assistant message on success.
Requests a structured response from the language model using a reified serializer.
Sends a request without tool usage and appends the received response to the prompt.
Sends a moderation request using the specified moderating model or the session model.
Rewrites the current prompt by applying a transformation function.
Sets the ai.koog.prompt.params.LLMParams.ToolChoice for this LLM session.
Set the ai.koog.prompt.params.LLMParams.ToolChoice to ai.koog.prompt.params.LLMParams.ToolChoice.Auto to make LLM automatically decide between calling tools and generating text
Set the ai.koog.prompt.params.LLMParams.ToolChoice to ai.koog.prompt.params.LLMParams.ToolChoice.None to make LLM call one specific tool toolName
Set the ai.koog.prompt.params.LLMParams.ToolChoice to ai.koog.prompt.params.LLMParams.ToolChoice.None to make LLM never call tools
Set the ai.koog.prompt.params.LLMParams.ToolChoice to ai.koog.prompt.params.LLMParams.ToolChoice.Required to make LLM always call tools
Converts each flow item into a parallel tool call using an already resolved SafeTool.
Converts each flow item into a parallel tool call using a tool instance.
Converts each flow item into a parallel tool call using a tool class.
Converts each flow item into a parallel tool call and emits only raw string content.
Converts each flow item into a parallel tool call using a tool class and emits raw string content.
Unset the ai.koog.prompt.params.LLMParams.ToolChoice. Mostly, if left unspecified, the default value of this parameter is ai.koog.prompt.params.LLMParams.ToolChoice.Auto
Updates the current prompt by applying modifications defined in the provided block.