xiaomi

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package xiaomi provides Xiaomi MiMo API integration for the LLM gateway.

Index

Constants

This section is empty.

Variables

View Source
var Registration = providers.Registration{
	Type: "xiaomi",
	New:  New,
	Discovery: providers.DiscoveryConfig{
		DefaultBaseURL: defaultBaseURL,
	},
}

Registration provides factory registration for the Xiaomi MiMo provider.

Functions

func New

New creates a new Xiaomi MiMo provider.

Types

type Provider

type Provider struct {
	*openai.ChatCompatible
}

Provider implements the core.Provider interface for Xiaomi MiMo. MiMo-specific extensions such as the "thinking" parameter pass through unchanged as unknown JSON fields.

func (*Provider) CreateSpeech

func (p *Provider) CreateSpeech(ctx context.Context, req *core.AudioSpeechRequest) (*core.AudioResponse, error)

CreateSpeech synthesizes speech by translating the request into a MiMo TTS chat completion: the synthesis text goes in an assistant message, optional style instructions in a user message, and voice/format in the top-level audio parameter. The base64 audio returned in message.audio.data is decoded back into binary.

func (*Provider) CreateTranscription

func (p *Provider) CreateTranscription(ctx context.Context, req *core.AudioTranscriptionRequest) (*core.AudioResponse, error)

CreateTranscription transcribes audio by translating the request into a MiMo ASR chat completion: the audio bytes are sent as a base64 data: URI in an input_audio content part, with the language passed via asr_options.

func (*Provider) Embeddings

Embeddings returns an error because Xiaomi MiMo does not expose an embeddings endpoint.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL