ModelRef

org.llm4s.capability.ModelRef
See theModelRef companion object
@Experimental
final class ModelRef[+C]

A model named in the code with model"provider/model", typed with the capabilities the model data bundled with llm4s-core marks it as having: model"openai/gpt-4o" is a ModelRef[Vision & Tools & StructuredOutput & ...].

The type is the compile-time view, from the bundled snapshot of the data. The check that counts is the run-time one: client.requireCapabilities(ref) checks the model again against the registry in scope, which may differ (overrides, a newer snapshot, a registry of the application's own).

Type parameters

C

the capabilities the bundled data marks as supported (Any when it marks none)

Value parameters

capabilities

the capabilities in C, in the order of Capability.values

model

the model, the part after it

provider

the provider, the part of the literal before the first /

Attributes

Companion
object
Source
ModelRef.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def id: String

provider/model, as written in the literal.

provider/model, as written in the literal.

Attributes

Source
ModelRef.scala
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
Source
ModelRef.scala

Concrete fields

Attributes

Source
ModelRef.scala
val model: String

Attributes

Source
ModelRef.scala

Attributes

Source
ModelRef.scala