Capable

org.llm4s.capability.Capable
See theCapable companion object
@Experimental
final class Capable[+C]

A client whose model has the capabilities C, a set such as Vision & Tools.

One is made at the application's edge, by org.llm4s.capability.requireCapabilities, which checks the model's metadata, or by Capable.assume, which does not. From then on the compiler tracks the set: an operation that needs vision takes a Capable[Vision], and since Capable is covariant a Capable[Vision & Tools] is one, while a Capable[Tools] is a compile error.

Type parameters

C

the capability set

Value parameters

capabilities

the capabilities this value was checked (or assumed) for, which may be more than its static type shows

client

the client, unchanged

metadata

the model metadata the capabilities were checked against; None when they were assumed

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def completeWithTools(conversation: Conversation, tools: Seq[ToolFunction[_, _]], options: CompletionOptions): Result[Completion]
Extension method from Capable

client.complete with tools offered to the model, added to any tools options already has.

client.complete with tools offered to the model, added to any tools options already has.

Attributes

def describe(image: Image, question: String, options: CompletionOptions): Result[Completion]
Extension method from Capable

Asks the model about one image: a conversation of one user message holding the image and then the question, sent with client.complete.

Asks the model about one image: a conversation of one user message holding the image and then the question, sent with client.complete.

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Concrete fields

val metadata: Option[ModelMetadata]