Learn R Programming

aisdk (version 1.1.0)

AiHubMixLanguageModel: AiHubMix Language Model Class

Description

Language model implementation for AiHubMix's chat completions API. Inherits from OpenAILanguageModel as AiHubMix provides an OpenAI-compatible API.

Arguments

Super classes

aisdk::LanguageModelV1 -> aisdk::OpenAILanguageModel -> AiHubMixLanguageModel

Methods

Inherited methods


Method parse_response()

Parse the API response into a GenerateResult. Overrides parent to extract AiHubMix-specific reasoning fields.

Usage

AiHubMixLanguageModel$parse_response(response)

Arguments

response

The parsed API response.

Returns

A GenerateResult object.


Method build_payload()

Build the request payload for non-streaming generation. Overrides parent to process caching and reasoning parameters.

Usage

AiHubMixLanguageModel$build_payload(params)

Arguments

params

A list of call options.

Returns

A list with url, headers, and body.


Method build_stream_payload()

Build the request payload for streaming generation. Overrides parent to process caching and reasoning parameters.

Usage

AiHubMixLanguageModel$build_stream_payload(params)

Arguments

params

A list of call options.

Returns

A list with url, headers, and body.


Method clone()

The objects of this class are cloneable with this method.

Usage

AiHubMixLanguageModel$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.