AfterToolResults

org.llm4s.testkit.AfterToolResults

Matches a conversation that ends with tool results, and extracts all of them as (tool name, result text), in the order they are in the conversation: the results of every tool the model called at once. It never extracts an empty sequence.

case AfterToolResults(results) if results.exists(_._1 == "add_inventory_item") => Reply.text("Taken.")

The names are found as AfterToolResult finds one, and the extractor does not match when any of them is not found.

Attributes

Source
RuleExtractors.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def unapply(conversation: Conversation): Option[Seq[(String, String)]]

The tool name and result text of each tool result that ends the conversation, when every call is found.

The tool name and result text of each tool result that ends the conversation, when every call is found.

Attributes

Source
RuleExtractors.scala