spi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsrSpi

type AsrSpi interface {
	CreateTranscription(
		ctx context.Context,
		request *openai.AudioRequest,
	) (response *openai.AudioResponse, err error)
}

type LlmSpi

type LlmSpi interface {
	CreateChatCompletionStream(
		ctx context.Context,
		request *openai.ChatCompletionRequest,
	) (stream *openai.ChatCompletionStream, err error)

	CreateChatCompletion(
		ctx context.Context,
		request *openai.ChatCompletionRequest,
	) (response *openai.ChatCompletionResponse, err error)
}

type SPIRegistry

type SPIRegistry struct {
	// contains filtered or unexported fields
}

func NewSPIRegistry

func NewSPIRegistry(ctx context.Context, conf *config.Config) *SPIRegistry

func (SPIRegistry) LoadByAsrModel

func (r SPIRegistry) LoadByAsrModel(model string) AsrSpi

func (SPIRegistry) LoadByLlmModel

func (r SPIRegistry) LoadByLlmModel(model string) LlmSpi

func (SPIRegistry) LoadByTtsModel

func (r SPIRegistry) LoadByTtsModel(model string) TtsSpi

type TtsSpi

type TtsSpi interface {
	CreateSpeech(
		ctx context.Context,
		request *openai.CreateSpeechRequest,
	) (response *openai.RawResponse, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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