XaiConfig

org.llm4s.llmconnect.config.XaiConfig
See theXaiConfig companion class
@Experimental
object XaiConfig

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
XaiConfig.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def fromValues(modelName: String, apiKey: String, baseUrl: String)(using resolver: ContextWindowResolver): Result[XaiConfig]

Constructs an XaiConfig, resolving contextWindow and reserveCompletion from the model name automatically.

Constructs an XaiConfig, resolving contextWindow and reserveCompletion from the model name automatically.

Value parameters

apiKey

xAI API key; must be non-empty.

baseUrl

API base URL; must be non-empty. Defaults to XaiConfig.DEFAULT_BASE_URL when loaded via org.llm4s.config.Llm4sConfig.

modelName

Model identifier, e.g. "grok-4.7".

Attributes

Concrete fields

val DEFAULT_BASE_URL: String

xAI's API base. Requests go to <baseUrl>/chat/completions.

xAI's API base. Requests go to <baseUrl>/chat/completions.

Attributes