Help us shape the future of Go! Take the 2026 Go Developer Survey

einos

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 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
	Endpoint string
	Type     ToolType
	Stdio    *Stdio
}

type Stdio added in v1.0.10

type Stdio struct {
	Command string
	Args    []string
	// contains filtered or unexported fields
}

type ToolType added in v1.0.10

type ToolType string
const (
	ToolTypeSSE            ToolType = "sse"
	ToolTypeStreamableHttp ToolType = "streamableHttp"
	ToolTypeStdio          ToolType = "stdio"
)

Jump to

Keyboard shortcuts

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