conversation
Conversation
Captures the interaction between a user and an agent.
Attributes:
Name | Type | Description |
---|---|---|
messages |
list
|
A list of tuples of the form (role, message). |
turns |
int
|
The number of turns in the conversation. |
Source code in src/agenteval/conversation.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
__iter__()
Allow iteration over conversation messages.
Source code in src/agenteval/conversation.py
21 22 23 |
|
add_turn(user_message, agent_response)
Record a turn in the conversation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_message |
str
|
The users's message |
required |
agent_response |
str
|
The agent's response to the user's message |
required |
Increments the turn
counter by 1
.
Source code in src/agenteval/conversation.py
25 26 27 28 29 30 31 32 33 34 35 |
|