From 3806141ab0553a4e60fbbb9bc78c40ab7e8e77d2 Mon Sep 17 00:00:00 2001 From: nlathia Date: Thu, 31 Jul 2025 19:33:00 +0100 Subject: [PATCH] python-client: add intent into agent.reply event --- src/gradient_labs/_article_upsert.py | 4 ++-- src/gradient_labs/conversation.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gradient_labs/_article_upsert.py b/src/gradient_labs/_article_upsert.py index f8eeddc..60d4666 100644 --- a/src/gradient_labs/_article_upsert.py +++ b/src/gradient_labs/_article_upsert.py @@ -40,7 +40,7 @@ class UpsertArticleParams: # status describes whether this article is published or not. status: PublicationStatus - # created is when the topic was first created. + # created is when the article was first created. created: datetime = field( metadata=config( encoder=datetime.isoformat, @@ -49,7 +49,7 @@ class UpsertArticleParams: ) ) - # last_edited is when the topic was last changed. + # last_edited is when the article was last changed. last_edited: datetime = field( metadata=config( encoder=datetime.isoformat, diff --git a/src/gradient_labs/conversation.py b/src/gradient_labs/conversation.py index 3c2f80d..d6193a0 100644 --- a/src/gradient_labs/conversation.py +++ b/src/gradient_labs/conversation.py @@ -144,6 +144,12 @@ class AgentMessageEvent: sequence identifies which agent message this is in the current turn. """ + intent: Optional[str] = None + """ + intent is the most recent intent that was classified from the customer's + conversation, if any. + """ + @dataclass_json @dataclass(frozen=True)