xunfei

package
v0.0.0-...-1389cd0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModelList = []*model.ModelConfig{
	{
		Model:       "SparkDesk-4.0-Ultra",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerXunfei,
		InputPrice:  0.14,
		OutputPrice: 0.14,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 128000,
		},
	},
	{
		Model:       "SparkDesk-Lite",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerXunfei,
		InputPrice:  0.001,
		OutputPrice: 0.001,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 4000,
		},
	},
	{
		Model:       "SparkDesk-Max",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerXunfei,
		InputPrice:  0.06,
		OutputPrice: 0.06,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 128000,
		},
	},
	{
		Model:       "SparkDesk-Max-32k",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerXunfei,
		InputPrice:  0.09,
		OutputPrice: 0.09,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 32000,
		},
	},
	{
		Model:       "SparkDesk-Pro",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerXunfei,
		InputPrice:  0.014,
		OutputPrice: 0.014,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 128000,
		},
	},
	{
		Model:       "SparkDesk-Pro-128K",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerXunfei,
		InputPrice:  0.026,
		OutputPrice: 0.026,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 128000,
		},
	},
}

Functions

This section is empty.

Types

type Adaptor

type Adaptor struct {
	openai.Adaptor
}

func (*Adaptor) ConvertRequest

func (a *Adaptor) ConvertRequest(meta *meta.Meta, req *http.Request) (http.Header, io.Reader, error)

func (*Adaptor) GetChannelName

func (a *Adaptor) GetChannelName() string

func (*Adaptor) GetModelList

func (a *Adaptor) GetModelList() []*model.ModelConfig

func (*Adaptor) GetRequestURL

func (a *Adaptor) GetRequestURL(meta *meta.Meta) (string, error)

Jump to

Keyboard shortcuts

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