agentsociety.message.message_interceptor¶
Module Contents¶
Classes¶
A class to intercept and process messages based on configured rules. |
Data¶
API¶
- agentsociety.message.message_interceptor.__all__¶
[‘MessageInterceptor’]
- class agentsociety.message.message_interceptor.MessageInterceptor(llm_config: list[agentsociety.llm.LLMConfig])¶
A class to intercept and process messages based on configured rules.
Initialization
Initialize the MessageInterceptor with optional configuration.
Args:
llm_config(LLMConfig): Configuration dictionary for initializing the LLM instance. Defaults to None.
- async set_supervisor(supervisor)¶
- property supervisor¶
- property llm: agentsociety.llm.LLM¶
Access the Large Language Model instance.
Description:
Provides access to the internal LLM instance. Raises an error if accessed before assignment.
Raises:
RuntimeError: If accessed before setting the LLM.
Returns:
LLM: The Large Language Model instance.
- async forward(messages: list[agentsociety.message.messager.Message]) list[agentsociety.message.messager.Message]¶