einos

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OLLAMA   = "ollama"
	OPENAI   = "openai"
	CLAUDE   = "claude"
	DEEPSEEK = "deepseek"
	GEMINI   = "gemini"
	QIANFAN  = "qianfan"
	QWEN     = "qwen"
	ARK      = "ark"
)
View Source
const (
	EmbeddingOllama       = "ollama"
	EmbeddingDashscope    = "dashscope"
	EmbeddingOpenai       = "openai"
	EmbeddingArk          = "ark"
	EmbeddingQianfan      = "qianfan"
	EmbeddingTencentCloud = "tencentcloud"
	EmbeddingGemini       = "gemini"
)

Variables

This section is empty.

Functions

func ConvertSchema

func ConvertSchema(inputSchema mcp.ToolInputSchema) map[string]*schema.ParameterInfo

ConvertSchema converts mcp.ToolInputSchema to a map of ParameterInfo

func GetEinoBaseTools

func GetEinoBaseTools(ctx context.Context, config *McpConfig) ([]tool.BaseTool, error)

func GetMCPTool

func GetMCPTool(ctx context.Context, config *McpConfig) ([]mcp.Tool, error)

func GetMCPToolAndCli

func GetMCPToolAndCli(ctx context.Context, config *McpConfig) ([]mcp.Tool, *client.Client, error)

func LoadChatModel

func LoadChatModel(ctx context.Context, chatType string, config *ChatModelConfig) (model.ToolCallingChatModel, error)

func LoadEmbedding

func LoadEmbedding(ctx context.Context, embeddingType string, config *EmbeddingModelConfig) (embedding.Embedder, error)

Types

type ChatModelConfig

type ChatModelConfig struct {
	OllamaConfig   *ollama.ChatModelConfig
	ArkConfig      *ark.ChatModelConfig
	ClaudeConfig   *claude.Config
	OpenaiConfig   *openai.ChatModelConfig
	DeepseekConfig *deepseek.ChatModelConfig
	QianfanConfig  *qianfan.ChatModelConfig
	QwenConfig     *qwen.ChatModelConfig
	GeminiConfig   *gemini.Config
}

type EmbeddingModelConfig

type EmbeddingModelConfig struct {
	OllamaConfig       *ollama.EmbeddingConfig
	DashscopeConfig    *dashscope.EmbeddingConfig
	ArkConfig          *ark.EmbeddingConfig
	QianfanConfig      *qianfan.EmbeddingConfig
	TencentCloudConfig *tencentcloud.EmbeddingConfig
	OpenaiConfig       *openai.EmbeddingConfig
	GeminiConfig       *gemini.EmbeddingConfig
}

type InvokeParamTool

type InvokeParamTool interface {
	tool.InvokableTool
	Params() map[string]*schema.ParameterInfo
}

type McpConfig

type McpConfig struct {
	BaseUrl string
	Token   string
	Name    string
	Version string
}

Jump to

Keyboard shortcuts

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