Mockers¶
relai.mocker.Persona(user_persona, intent=None, starting_message=None, tools=None, model='gpt-5-mini')
¶
Bases: BaseMocker
A mocker class for creating AI personas with specific behaviors and tools. A persona can be used to mimic a particular role by defining a system prompt and optionally equipping it with tools.
Attributes:
| Name | Type | Description |
|---|---|---|
user_persona |
str
|
The description of the persona's characteristics and behavior. |
intent |
str | None
|
The intent or goal of the persona during interactions. |
starting_message |
str | None
|
An optional initial message that the persona will use to start interactions. |
tools |
Optional[list[Tool]]
|
A list of tools that the persona can use. |
Initializes the Persona with a description, intent, optional starting message, tools, and model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_persona
|
str
|
The description of the persona's characteristics and behavior. |
required |
intent
|
str | None
|
The intent or goal of the persona during interactions. |
None
|
starting_message
|
str | None
|
An optional initial message that the persona will use to start interactions. |
None
|
tools
|
Optional[list[Tool]]
|
A list of tools that the persona can use. |
None
|
model
|
str | None
|
The AI model to use for simulating the persona's behavior. |
'gpt-5-mini'
|
relai.mocker.MockTool(model='gpt-5-mini')
¶
Bases: BaseMocker
A mocker class for simulating the behavior of a tool used by an AI agent.
Initializes the MockTool with an optional model specification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str | None
|
The AI model to use for simulating the tool's behavior. |
'gpt-5-mini'
|