agents

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package agents implements a virtual provider backend that orchestrates requests across multiple real providers with custom instructions and optional decision-based routing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter implements the provider.GoAdapter interface for virtual agents.

func (*Adapter) Complete

func (*Adapter) CompleteStream

func (a *Adapter) CompleteStream(
	ctx context.Context,
	cred *models.Credential,
	req *models.ChatCompletionRequest,
	w io.Writer,
	_ map[string]any,
) error

func (*Adapter) GetModelInfos

func (a *Adapter) GetModelInfos(ctx context.Context, cred *models.Credential, _ map[string]any) ([]models.ModelInfo, error)

func (*Adapter) NeedsRefresh

func (a *Adapter) NeedsRefresh(cred *models.Credential) bool

func (*Adapter) RefreshCredential

func (a *Adapter) RefreshCredential(ctx context.Context, cred *models.Credential) (map[string]any, error)

func (*Adapter) SetAgentService

func (a *Adapter) SetAgentService(svc *agent.Service)

SetAgentService injects the agent service dependency.

func (*Adapter) SetLogger

func (a *Adapter) SetLogger(logger *slog.Logger)

SetLogger injects the logger dependency.

func (*Adapter) SetRouterService

func (a *Adapter) SetRouterService(svc *router.Service)

SetRouterService injects the router service dependency.

func (*Adapter) TypeKey

func (a *Adapter) TypeKey() string

func (*Adapter) ValidateCredentials

func (a *Adapter) ValidateCredentials(data map[string]any) error

Jump to

Keyboard shortcuts

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