agent_inspect.models.user_proxy package

Submodules

agent_inspect.models.user_proxy.chat module

class agent_inspect.models.user_proxy.chat.ChatHistory(id, conversations)[source]

Bases: object

Represents the user-agent conversation history.

Parameters:
conversations: List[ConversationTurn]

A list of user–agent exchanges across conversational turns.

id: str

The unique identifier for the chat history.

class agent_inspect.models.user_proxy.chat.ConversationTurn(id, agent_responses, user_message)[source]

Bases: object

Represents a single conversation exchange between user and agent in the current conversational turn.

Parameters:
agent_responses: List[ResponseFromAgent]

Agent outputs, which may include responses and other related outputs stored in a list.

id: str

The unique identifier for the current conversation turn.

user_message: UserProxyMessage

User proxy output.

class agent_inspect.models.user_proxy.chat.ResponseFromAgent(response_str, json_data=None)[source]

Bases: object

Represents agent response and other related outputs.

Parameters:
  • response_str (str)

  • json_data (dict | None)

json_data: Optional[dict] = None

Additional outputs by the agent.

response_str: str

Agent response.

class agent_inspect.models.user_proxy.chat.UserProxyMessage(message_str, check=None)[source]

Bases: object

Represents an utterance from the user proxy.

Parameters:
  • message_str (str)

  • check (str | None)

check: Optional[str] = None

Stores the terminating condition that is applied when the user proxy exits the conversation early.

message_str: str

User proxy utterance. May contain stop sequence if the conversation terminates early.

agent_inspect.models.user_proxy.terminating_condition module

class agent_inspect.models.user_proxy.terminating_condition.TerminatingCondition(check, stop_sequence=None)[source]

Bases: object

Represents a condition used to terminate user-agent conversation early.

Parameters:
  • check (str)

  • stop_sequence (str | None)

check: str

Description of the terminating condition.

stop_sequence: Optional[str] = None

The stop sequence indicating the end of the conversation when the condition is met. This is for future use and any value assigned here will be ignored for now.

Module contents

class agent_inspect.models.user_proxy.ChatHistory(id, conversations)[source]

Bases: object

Represents the user-agent conversation history.

Parameters:
conversations: List[ConversationTurn]

A list of user–agent exchanges across conversational turns.

id: str

The unique identifier for the chat history.

class agent_inspect.models.user_proxy.ConversationTurn(id, agent_responses, user_message)[source]

Bases: object

Represents a single conversation exchange between user and agent in the current conversational turn.

Parameters:
agent_responses: List[ResponseFromAgent]

Agent outputs, which may include responses and other related outputs stored in a list.

id: str

The unique identifier for the current conversation turn.

user_message: UserProxyMessage

User proxy output.

class agent_inspect.models.user_proxy.ResponseFromAgent(response_str, json_data=None)[source]

Bases: object

Represents agent response and other related outputs.

Parameters:
  • response_str (str)

  • json_data (dict | None)

json_data: Optional[dict] = None

Additional outputs by the agent.

response_str: str

Agent response.

class agent_inspect.models.user_proxy.TerminatingCondition(check, stop_sequence=None)[source]

Bases: object

Represents a condition used to terminate user-agent conversation early.

Parameters:
  • check (str)

  • stop_sequence (str | None)

check: str

Description of the terminating condition.

stop_sequence: Optional[str] = None

The stop sequence indicating the end of the conversation when the condition is met. This is for future use and any value assigned here will be ignored for now.

class agent_inspect.models.user_proxy.UserProxyMessage(message_str, check=None)[source]

Bases: object

Represents an utterance from the user proxy.

Parameters:
  • message_str (str)

  • check (str | None)

check: Optional[str] = None

Stores the terminating condition that is applied when the user proxy exits the conversation early.

message_str: str

User proxy utterance. May contain stop sequence if the conversation terminates early.