ResponseFormatMapper

org.llm4s.llmconnect.model.ResponseFormatMapper

Maps ResponseFormat to provider-specific request payloads.

Used internally by provider clients; no provider names leak in the public API.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def toOpenAIResponseFormat(format: ResponseFormat): Option[Value]

Produces the OpenAI-compatible response_format JSON value.

Produces the OpenAI-compatible response_format JSON value.

Used by OpenAI, Azure, OpenRouter, DeepSeek, Zai (OpenAI-compatible APIs).

Value parameters

format

the requested response format

Attributes

Returns

the JSON value to set as response_format in the request body, or None to omit