ContextWindowResolver

org.llm4s.llmconnect.config.ContextWindowResolver
See theContextWindowResolver companion class

Attributes

Companion
class
Source
ContextWindowResolver.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Givens

Givens

The resolver of the org.llm4s.model.ModelRegistryService in scope, so a provider config's fromValues needs only the registry that LLMConnect.getClient needs too (#2340):

The resolver of the org.llm4s.model.ModelRegistryService in scope, so a provider config's fromValues needs only the registry that LLMConnect.getClient needs too (#2340):

for {
 registry <- ModelRegistryService.default()
 given ModelRegistryService = registry
 config <- OpenAIConfig.fromValues(ModelName("gpt-4o-mini"), apiKey, OpenAIConfig.DEFAULT_BASE_URL)
 client <- LLMConnect.getClient(config)
} yield client

A ContextWindowResolver given in lexical scope still takes precedence.

Attributes

Source
ContextWindowResolver.scala