OpenAICompatibleClient

org.llm4s.llmconnect.provider.OpenAICompatibleClient
See theOpenAICompatibleClient companion class

Attributes

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

Members list

Type members

Classlikes

final case class Settings(providerName: String, displayName: String, model: String, baseUrl: String, apiKey: Option[String], contextWindow: Int, reserveCompletion: Int)

Where an OpenAICompatibleClient sends requests, and how it describes itself.

Where an OpenAICompatibleClient sends requests, and how it describes itself.

Value parameters

apiKey

sent as Authorization: Bearer <key>; None sends no Authorization header.

baseUrl

API base URL; requests go to <baseUrl>/chat/completions.

contextWindow

the model's total token capacity.

displayName

human-readable name used in log lines and the "already closed" error, e.g. "DeepSeek".

model

model identifier sent in every request.

providerName

metrics and exchange-log label, and the provider named in mapped HTTP errors, e.g. "deepseek".

reserveCompletion

tokens held back from the prompt for the reply.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class StreamToolCalls

The tool calls seen so far in one stream, by their index.

The tool calls seen so far in one stream, by their index.

A streamed tool call is split across deltas: the first carries its id, name and the start of its arguments, and each continuation carries only its index and the next argument fragment. Several calls can be interleaved, told apart by index. Continuations are given the id and name their index was first seen with, so the chunks a caller receives

  • and the ones StreamingAccumulator, which keys calls by id and skips a chunk with none, accumulates - all name their call. (Before #1132 each client defaulted a missing id to "", and every continuation's arguments were dropped.)

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

A client for a generic OpenAI-compatible endpoint: the standard dialect, plus config.headers on every request.

A client for a generic OpenAI-compatible endpoint: the standard dialect, plus config.headers on every request.

Attributes

The settings the generic openai-compatible provider derives from its config.

The settings the generic openai-compatible provider derives from its config.

Attributes