OpenAICompatibleDialect

org.llm4s.llmconnect.provider.OpenAICompatibleDialect
See theOpenAICompatibleDialect companion trait

Attributes

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

Members list

Value members

Concrete methods

def lenientToolCalls(toolCalls: Value): Seq[ToolCall]

Parses a tool_calls array without failing: a missing id or name becomes "", and missing or unparseable arguments become {}, as do arguments nested more than 512 levels deep - they are model output, and a value that deep overflows the stack of whatever renders it next (#1562).

Parses a tool_calls array without failing: a missing id or name becomes "", and missing or unparseable arguments become {}, as do arguments nested more than 512 levels deep - they are model output, and a value that deep overflows the stack of whatever renders it next (#1562).

Attributes

def standard(extraHeaders: Seq[(String, String)], streamUsage: Boolean): OpenAICompatibleDialect

The plain OpenAI chat-completions format, sending extraHeaders on every request and asking for streamed usage when streamUsage is set. This is the whole of the generic openai-compatible provider's dialect: both come from config.

The plain OpenAI chat-completions format, sending extraHeaders on every request and asking for streamed usage when streamUsage is set. This is the whole of the generic openai-compatible provider's dialect: both come from config.

Attributes

Concrete fields

The plain OpenAI chat-completions format, with no extra headers.

The plain OpenAI chat-completions format, with no extra headers.

Attributes

val standardUserParts: PartialFunction[ContentPart, Value]

Text, and an image by URL or inline (image_url, inline as a data: URL): what chat completions takes.

Text, and an image by URL or inline (image_url, inline as a data: URL): what chat completions takes.

Attributes

val textPart: PartialFunction[ContentPart, Value]

A text part, as a content array element.

A text part, as a content array element.

Attributes