org.llm4s.testkit.UnscriptedCallError
See theUnscriptedCallError companion object
final case class UnscriptedCallError extends LLMError, NonRecoverableError
The error a ScriptedLLMClient returns for a call its script has no reply for: a call past the end of a ScriptedLLMClient.sequence, or a conversation no case of ScriptedLLMClient.respondingTo matches.
It is a type of its own, so a test can tell "the code made a call I did not script" apart from every error a real provider returns, and from the errors a test scripts with Reply.failure:
client.complete(conversation, options) match {
case Left(e: UnscriptedCallError) => e.callNumber // 3
case other => ...
}
It is a NonRecoverableError, so a ReliableClient around the scripted client does not retry it.
Value parameters
- callNumber
-
which call had no reply, counting from 1
- lastMessage
-
the last message of the conversation, as
role: "text"cut to 80 characters;Nonewhen the conversation had no messages - reason
-
why there was none, for example
the script has 2 replies
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait NonRecoverableErrortrait LLMErrortrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article