eino

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package eino is the only package that imports cloudwego/eino; it adapts the framework to the engine.Provider seam with an explicit tool-calling loop so each tool call flows through the risk-gated executor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey  string
	BaseURL string // empty for the vendor default; set for openai-compatible endpoints
	Model   string
}

Config is the minimal provider wiring the adapter needs.

type Provider

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

Provider is an eino-backed engine.Provider for OpenAI / OpenAI-compatible endpoints.

func NewAnthropic

func NewAnthropic(ctx context.Context, cfg Config) (*Provider, error)

NewAnthropic builds a Claude provider.

func NewGoogle

func NewGoogle(ctx context.Context, cfg Config) (*Provider, error)

NewGoogle builds a Gemini provider.

func NewOpenAI

func NewOpenAI(ctx context.Context, cfg Config) (*Provider, error)

NewOpenAI builds an OpenAI (or OpenAI-compatible) provider. A BaseURL points it at Ollama, OpenRouter, vLLM, gateways, etc.

func (*Provider) Models

func (p *Provider) Models(_ context.Context) ([]engine.ModelInfo, error)

Models reports the configured model. A live catalogue query is not exposed by the adapter; the model allow-list is managed in provider config.

func (*Provider) Stream

func (p *Provider) Stream(ctx context.Context, req engine.ChatRequest, exec engine.ToolExecutor) (<-chan engine.StreamEvent, error)

Stream runs one turn (with an internal ReAct loop over tool calls) and emits engine.StreamEvents until the channel closes. The caller cancels ctx to stop.

Jump to

Keyboard shortcuts

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