agora.sender.components.negotiator
SenderNegotiator Objects
class SenderNegotiator()
Manages the negotiation of protocols for sending tasks.
__init__
def __init__(toolformer: Toolformer, max_rounds: int = 10) -> None
Initializes the SenderNegotiator.
Arguments:
toolformer
Toolformer - The Toolformer instance.max_rounds
int - Maximum number of negotiation rounds.
__call__
def __call__(task_schema: TaskSchemaLike,
callback: Callable[[str], str],
additional_info: str = '') -> Protocol
Negotiates and finalizes a protocol based on the task schema.
Arguments:
task_schema
TaskSchemaLike - The schema of the task.callback
Callable[[str], str] - A callback to handle messages from the other party.additional_info
str - Additional information for the negotiation.
Returns:
Protocol
- The finalized Protocol object.