AIAgentLLMReadSession
Represents a session for interacting with a language model (LLM) in a read-only context within an AI agent setup. This session is configured with a set of tools, an executor for handling prompt execution, a prompt definition, a language model, and specific session configurations.
Parameters
A list of tool descriptors that define the tools available for this session.
The PromptExecutor
responsible for handling execution of prompts within this session.
The Prompt
object specifying the input messages and parameters for the session.
The language model instance to be used for processing prompts in this session.
The configuration settings for the AI agent session.
Functions
Sends a request to the underlying LLM and returns the first response. This method ensures the session is active before executing the request.
Sends a request to the language model while enforcing the use of a specific tool, and returns the response.
Sends a request to the language model, potentially utilizing multiple tools, and returns a list of responses from the model.
Sends a request to the language model, potentially receiving multiple choices, and returns a list of choices from the model.
Sends a request to the language model that enforces the usage of tools and retrieves the response.
Sends a request to LLM and gets a structured response.
Sends a request to the language model without utilizing any tools and returns the response.
Sends a moderation request to the specified or default large language model (LLM) for content moderation.