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

enum Credential

How a request authenticates.

How a request authenticates.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Settings(providerName: String, displayName: String, model: String, baseUrl: String, credential: Credential, contextWindow: Int, reserveCompletion: Int, timeouts: ProviderTimeouts)

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

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

Value parameters

baseUrl

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

contextWindow

the model's total token capacity.

credential

how requests authenticate; Credential.Anonymous sends no Authorization header.

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, asking for streamed usage unless config.streamUsage is off.

A client for a generic OpenAI-compatible endpoint: the standard dialect, plus config.headers on every request, asking for streamed usage unless config.streamUsage is off.

Attributes

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

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

Attributes

Concrete fields

val RequestTimeout: FiniteDuration

The timeout on complete's request: two minutes, what the old MistralClient and CohereClient used, and what OllamaClient, GeminiClient and VertexAIClient use. This is the default: a section's timeouts.request replaces it (#712).

The timeout on complete's request: two minutes, what the old MistralClient and CohereClient used, and what OllamaClient, GeminiClient and VertexAIClient use. This is the default: a section's timeouts.request replaces it (#712).

Attributes

val StreamTimeout: FiniteDuration

The timeout on streamComplete's request: five minutes, as in the clients this one replaced. A section's timeouts.stream replaces it.

The timeout on streamComplete's request: five minutes, as in the clients this one replaced. A section's timeouts.stream replaces it.

Attributes