VisionCapability
The vision capability will hook to the ConversableAgent’s
process_last_received_message.Some technical details:
When the agent (who has the vision capability) received an message, it will:
1. _process_received_message:
a. _append_oai_message 2. generate_reply: if the agent is a MultimodalAgent, it will also use the image tag.
a. hook process_last_received_message (NOTE: this is where the vision capability will be hooked to.) b. hook process_all_messages_before_reply 3. send:
a. hook process_message_before_send b. _append_oai_message Initializes a new instance, setting up the configuration for interacting with a Language Multimodal (LMM) client and specifying optional parameters for image description and captioning.
Parameters:
Instance Methods
add_to_agent
An implementation will typically call agent.register_hook() one or more times. See teachability.py as an example. Parameters:
process_last_received_message
The function aims to transform the content into a format compatible with GPT-4V multimodal inputs, specifically by formatting strings into PIL-compatible images if needed and appending text descriptions for images. This allows for a more accessible presentation of the content, especially in contexts where images cannot be displayed directly.
Parameters:
Returns: