sdk

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentOptions

type AgentOptions struct {
	Name        string
	LLM         llm.Provider
	Tools       []core.Tool
	Output      map[string]any
	History     *history.CommonConversationManager
	Parameters  responses.Parameters
	Instruction core.SystemPromptProvider
	McpServers  []agents.MCPToolset
}

type ClientOptions

type ClientOptions struct {
	ServerConfig ServerConfig

	// Set this if you are using the SDK without the LLM Gateway server.
	// If `LLMConfigs` is set, then `ApiKey` will be ignored.
	LLMConfigs gateway.ConfigStore

	RestateConfig  RestateConfig
	TemporalConfig TemporalConfig
	RedisConfig    RedisConfig
}

type InMemoryConfigStore

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

InMemoryConfigStore implements gateway.ConfigStore for SDK use. It holds API keys and provider configs in memory.

func NewInMemoryConfigStore

func NewInMemoryConfigStore(configs []*gateway.ProviderConfig) *InMemoryConfigStore

NewInMemoryConfigStore creates a config store with full provider options.

func (*InMemoryConfigStore) GetProviderConfig

func (s *InMemoryConfigStore) GetProviderConfig(providerName llm.ProviderName) (*gateway.ProviderConfig, error)

func (*InMemoryConfigStore) GetVirtualKey

func (s *InMemoryConfigStore) GetVirtualKey(secretKey string) (*gateway.VirtualKeyConfig, error)

type LLMOptions

type LLMOptions struct {
	Provider llm.ProviderName
	Model    string
}

type RedisConfig added in v0.1.11

type RedisConfig struct {
	Endpoint string
}

type RestateConfig

type RestateConfig struct {
	Endpoint string
}

type SDK

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

func New

func New(opts *ClientOptions) (*SDK, error)

func (*SDK) CustomPrompt

func (c *SDK) CustomPrompt(loader prompts.PromptLoader) *prompts.SimplePrompt

func (*SDK) NewAgent

func (c *SDK) NewAgent(options *AgentOptions) *agents.Agent

func (*SDK) NewConversationManager

func (c *SDK) NewConversationManager(opts ...history.ConversationManagerOptions) *history.CommonConversationManager

func (*SDK) NewLLM

func (c *SDK) NewLLM(opts LLMOptions) llm.Provider

NewLLM creates a new LLMClient that provides access to multiple LLM providers.

func (*SDK) NewRestateAgent

func (c *SDK) NewRestateAgent(options *AgentOptions) *agents.Agent

func (*SDK) NewTemporalAgent added in v0.1.11

func (c *SDK) NewTemporalAgent(options *AgentOptions) *agents.Agent

func (*SDK) Prompt

func (c *SDK) Prompt(prompt string) *prompts.SimplePrompt

func (*SDK) RemotePrompt

func (c *SDK) RemotePrompt(name, label string) *prompts.SimplePrompt

func (*SDK) ServeHTTP

func (c *SDK) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*SDK) StartRestateService

func (c *SDK) StartRestateService(host, port string)

func (*SDK) StartTemporalService added in v0.1.11

func (c *SDK) StartTemporalService()

type ServerConfig

type ServerConfig struct {
	// Endpoint of the Uno Server
	Endpoint string

	// For LLM calls
	VirtualKey string

	// For conversations
	ProjectName string
}

type TemporalConfig added in v0.1.11

type TemporalConfig struct {
	Endpoint string
}

Directories

Path Synopsis
runtime

Jump to

Keyboard shortcuts

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