EndsWithUser
org.llm4s.testkit.EndsWithUser
object EndsWithUser
Matches a conversation whose last message is a user message, and extracts its text: the first model call of a turn. The later calls of the turn end with tool results (AfterToolResult) instead.
case EndsWithUser(s"take $item") => Reply.toolCall("add_inventory_item", s"""{"item":"$item"}""")
The agent's correction request is a user message too, so a rule for AfterCorrection goes before a rule for EndsWithUser that would match its text.
Attributes
- Source
- RuleExtractors.scala
- Graph
-
- Supertypes
- Self type
-
EndsWithUser.type
Members list
In this article
