PromptResponse

com.alecdorrington.iris.prompt.PromptResponse
final case class PromptResponse(text: String, stopReason: StopReason = ..., usage: Usage = ..., cost: Option[Usd] = ..., toolCalls: List[ToolCall] = ...)

One response of the model's, as the provider gave it: its message, why it stopped, and what it took.

Value parameters

cost

What the response cost, priced as it came at the Rates of the service's configuration or else of its model, or None where there are none, as for a model Iris does not list.

stopReason

The reason the model stopped.

text

The text of the response, as the model wrote it.

toolCalls

The tools the model asks to have run before it goes on, if any.

usage

The token counts of the response.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def events: List[PromptEvent]

The events of this response, as PromptService.stream would give it whole: its text, each tool call, and its end, so that a service answering whole, as a cache or a test's fake does, is read alike however it is read.

The events of this response, as PromptService.stream would give it whole: its text, each tool call, and its end, so that a service answering whole, as a cache or a test's fake does, is read alike however it is read.

Attributes

The model's message, its text and tool calls.

The model's message, its text and tool calls.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product