Documentation
¶
Index ¶
- func ExtractInterruptInfo(err error) (*compose.InterruptInfo, bool)
- func NewChatModel(ctx context.Context, modelName, apiKey, baseURL string) (einomodel.ToolCallingChatModel, error)
- func WithCheckPointID(id string) compose.Option
- func WithStateModifier(fn func(ctx context.Context, path compose.NodePath, s any) error) compose.Option
- type Agent
- type InMemoryStore
- type Provider
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractInterruptInfo ¶
func ExtractInterruptInfo(err error) (*compose.InterruptInfo, bool)
func NewChatModel ¶
func NewChatModel(ctx context.Context, modelName, apiKey, baseURL string) (einomodel.ToolCallingChatModel, error)
NewChatModel creates a ToolCallingChatModel for the given model name.
Provider selection:
- Pass a non-empty baseURL to force the OpenAI-compatible path (any provider).
- Otherwise the provider is inferred from the model name via DetectProvider.
Required environment variables per provider (when apiKey is empty):
OpenAI/Grok OPENAI_API_KEY / XAI_API_KEY Anthropic ANTHROPIC_API_KEY Gemini GOOGLE_API_KEY (or ADC credentials)
func WithCheckPointID ¶
Types ¶
type InMemoryStore ¶
type InMemoryStore struct {
// contains filtered or unexported fields
}
type Provider ¶
type Provider string
Provider identifies the LLM backend.
func DetectProvider ¶
DetectProvider infers the provider from the model name when the caller has not set an explicit base URL or provider hint.
- "claude-*" → Anthropic
- "gemini-*" → Gemini
- "grok-*" → Grok (xAI)
- everything else → OpenAI
Click to show internal directories.
Click to hide internal directories.