OllamaConfig

org.llm4s.llmconnect.config.OllamaConfig
See theOllamaConfig companion class
object OllamaConfig

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(model: String, baseUrl: String, contextWindow: Int, reserveCompletion: Int): OllamaConfig

Builds a config without validating it; fromValues validates.

Builds a config without validating it; fromValues validates.

Attributes

def apply(model: String, baseUrl: String): OllamaConfig

The model and server URL, every other field at its default: the entry point for Java and Kotlin, which do not see Scala default arguments. contextWindow and reserveCompletion come from the model name alone (llama3 is 8192); set them with the with* setters, or use fromValues to consult the bundled model catalogue.

The model and server URL, every other field at its default: the entry point for Java and Kotlin, which do not see Scala default arguments. contextWindow and reserveCompletion come from the model name alone (llama3 is 8192); set them with the with* setters, or use fromValues to consult the bundled model catalogue.

Attributes

def fromValues(modelName: String, baseUrl: String)(using resolver: ContextWindowResolver): Result[OllamaConfig]

Constructs an OllamaConfig, resolving contextWindow and reserveCompletion from the model name automatically.

Constructs an OllamaConfig, resolving contextWindow and reserveCompletion from the model name automatically.

Value parameters

baseUrl

Ollama server URL; must be non-empty.

modelName

Model identifier as registered in Ollama.

Attributes