doubao

package
v0.0.0-...-21e0b36 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModelList = []*model.ModelConfig{
	{
		Model:       "Doubao-pro-256k",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerDoubao,
		InputPrice:  0.0050,
		OutputPrice: 0.0090,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 256000,
			model.ModelConfigMaxOutputTokensKey:  4096,
		},
	},
	{
		Model:       "Doubao-pro-128k",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerDoubao,
		InputPrice:  0.0050,
		OutputPrice: 0.0090,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 128000,
			model.ModelConfigMaxOutputTokensKey:  4096,
		},
	},
	{
		Model:       "Doubao-pro-32k",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerDoubao,
		InputPrice:  0.0008,
		OutputPrice: 0.0020,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 32768,
			model.ModelConfigMaxOutputTokensKey:  4096,
		},
	},
	{
		Model:       "Doubao-pro-4k",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerDoubao,
		InputPrice:  0.0008,
		OutputPrice: 0.0020,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 4096,
			model.ModelConfigMaxOutputTokensKey:  4096,
		},
	},
	{
		Model:       "Doubao-lite-128k",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerDoubao,
		InputPrice:  0.0008,
		OutputPrice: 0.0010,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 128000,
			model.ModelConfigMaxOutputTokensKey:  4096,
		},
	},
	{
		Model:       "Doubao-lite-32k",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerDoubao,
		InputPrice:  0.0003,
		OutputPrice: 0.0006,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 32768,
			model.ModelConfigMaxOutputTokensKey:  4096,
		},
	},
	{
		Model:       "Doubao-lite-4k",
		Type:        relaymode.ChatCompletions,
		Owner:       model.ModelOwnerDoubao,
		InputPrice:  0.0003,
		OutputPrice: 0.0006,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxContextTokensKey: 4096,
			model.ModelConfigMaxOutputTokensKey:  4096,
		},
	},

	{
		Model:      "Doubao-embedding",
		Type:       relaymode.Embeddings,
		Owner:      model.ModelOwnerDoubao,
		InputPrice: 0.0005,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxInputTokensKey: 4096,
		},
	},
	{
		Model:      "Doubao-embedding-large",
		Type:       relaymode.Embeddings,
		Owner:      model.ModelOwnerDoubao,
		InputPrice: 0.0007,
		Config: map[model.ModelConfigKey]any{
			model.ModelConfigMaxInputTokensKey: 4096,
		},
	},
}

Functions

func GetRequestURL

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

Types

type Adaptor

type Adaptor struct {
	openai.Adaptor
}

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