LlmClientOptions

org.llm4s.llmconnect.LlmClientOptions
See theLlmClientOptions companion object
@Stable
final case class LlmClientOptions

Client-construction options for LLMConnect.

This lets library users opt into runtime behaviors such as metrics, provider exchange logging and their own HTTP transport without folding those concerns into org.llm4s.llmconnect.config.ProviderConfig.

Build one with LlmClientOptions.apply (or start from LlmClientOptions.default) and change it with the with* setters; the constructor and copy are private, so a new option never breaks callers.

Value parameters

exchangeLogging

whether, and where, provider request/response exchanges are logged; disabled by default

httpClient

the HTTP client an SDK-free provider sends its requests through instead of building its own; None (the default) builds one from the section's proxy and TLS settings. The caller owns a supplied client: closing the LLM client does not close it, and the section's network settings do not apply to it. A provider whose ProviderFeatures.customHttpClient is false (the default; the SDK-based ones keep it) ignores it.

metrics

collector the client reports request metrics to; no-op by default

Attributes

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

Members list

Value members

Concrete methods

Sets whether, and where, provider exchanges are logged.

Sets whether, and where, provider exchanges are logged.

Attributes

Sends the provider's HTTP requests through httpClient, which the caller keeps owning and closes.

Sends the provider's HTTP requests through httpClient, which the caller keeps owning and closes.

Attributes

def withHttpClient(httpClient: Option[Llm4sHttpClient]): LlmClientOptions

Sets the HTTP client to send requests through; None lets the provider build its own.

Sets the HTTP client to send requests through; None lets the provider build its own.

Attributes

Sets the collector the client reports request metrics to.

Sets the collector the client reports request metrics to.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product