generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 655
Open
Labels
Description
Expected Behaviour
The inline documentation of the on_llm_start method should contain only the actual parameters of the method.
Current Behaviour
A "messages" parameters is mentioned, even though it is not part of the method signature
Code snippet
async def on_llm_start(
self,
name: str,
payload_input: Any,
run_id: Optional[UUID] = None,
tags: Optional[list[str]] = None,
metadata: Optional[dict[str, Any]] = None,
**kwargs: Any,
) -> Any:
"""
Callback method that runs when an llm starts processing.
This method is called at the beginning of an llm's execution, providing information
about the llm session and its context.
Parameters:
self: The instance of the callback handler class.
agent_name: Name of the agent that is starting.
payload_input: Dictionary containing the agent's input.
messages: List of message dictionaries representing the conversation history.
run_id: Unique identifier for this specific agent run.
tags: Optional list of string tags associated with this agent run.
metadata: Optional dictionary containing additional metadata about the run.
**kwargs: Additional keyword arguments that might be passed to the callback.
Returns:
Any: The return value is implementation-dependent.
"""
passPossible Solution
Remove this line:
messages: List of message dictionaries representing the conversation history.
also this "agent_name" should be changed to "name"
Steps to Reproduce
Read the inline documentation for the on_llm_start method