Documentation
¶
Index ¶
- Constants
- Variables
- func BuildGraph(task AgentTask) workflow.Graph
- func InferMediaType(task AgentTask) string
- type AgentTask
- type AgentTaskStructured
- type AsyncResult
- type Client
- func (c *Client) AllModelInfos() []engine.ModelInfo
- func (c *Client) ApplyConfig(cfg FileConfig) ([]string, error)
- func (c *Client) AvailableFor(mediaType string) []string
- func (c *Client) DisableEngine(name string) error
- func (c *Client) DryRun(engineName string, task AgentTask) (engine.DryRunResult, error)
- func (c *Client) EnableEngine(name string) error
- func (c *Client) EngineCapabilities(name string) (engine.Capability, error)
- func (c *Client) EngineInfos() []EngineInfo
- func (c *Client) EngineNames() []string
- func (c *Client) Execute(ctx context.Context, engineName string, graph workflow.Graph, ...) (Result, error)
- func (c *Client) ExecuteAsync(ctx context.Context, engineName string, graph workflow.Graph) <-chan AsyncResult
- func (c *Client) ExecutePipeline(ctx context.Context, p *Pipeline) ([]Result, error)
- func (c *Client) ExecutePrompt(ctx context.Context, engineName string, prompt string) (Result, error)
- func (c *Client) ExecutePromptAuto(ctx context.Context, selector Selector, prompt string) (RoutedResult, error)
- func (c *Client) ExecuteTask(ctx context.Context, engineName string, task AgentTask, opts ...ExecuteOption) (Result, error)
- func (c *Client) ExecuteTaskAuto(ctx context.Context, selector Selector, task AgentTask) (RoutedResult, error)
- func (c *Client) ExecuteTaskAutoWithFallback(ctx context.Context, selector Selector, task AgentTask) (RoutedResult, error)
- func (c *Client) ExecuteTaskWithFallback(ctx context.Context, engines []string, task AgentTask, opts ...ExecuteOption) (FallbackResult, error)
- func (c *Client) ExecuteWithFallback(ctx context.Context, engines []string, graph workflow.Graph, ...) (FallbackResult, error)
- func (c *Client) ExportModelCatalog() ([]byte, error)
- func (c *Client) IsEnabled(name string) bool
- func (c *Client) ModelInfo(model string) (engine.ModelInfo, bool)
- func (c *Client) ModelInfosByCapability(cap string) []engine.ModelInfo
- func (c *Client) ModelInfosByProvider(provider string) []engine.ModelInfo
- func (c *Client) RecoverPending() ([]TaskRecord, error)
- func (c *Client) RegisterAll(engines map[string]engine.Engine) error
- func (c *Client) RegisterAllIfKey(entries []EngineEntry) ([]string, error)
- func (c *Client) RegisterEngine(name string, e engine.Engine) error
- func (c *Client) RegisterEngineIfKey(name string, e engine.Engine, envVars ...string) (bool, error)
- func (c *Client) RegisterProvider(p engine.Provider) ([]string, error)
- func (c *Client) Resume(ctx context.Context, taskID string) (Result, error)
- func (c *Client) SearchModelInfos(query string) []engine.ModelInfo
- func (c *Client) Submit(ctx context.Context, engineName string, graph workflow.Graph, ...) (string, error)
- func (c *Client) UnregisterEngine(name string) error
- func (c *Client) Use(mw ...Middleware)
- type ClientOption
- type EngineEntry
- type EngineInfo
- type ExecuteOption
- type FallbackError
- type FallbackResult
- type FileConfig
- type FileTaskStore
- type Middleware
- type MusicOptions
- type OutputKind
- type Pipeline
- type PipelineStep
- type PrioritySelector
- type ProgressEvent
- type ReferenceAsset
- type ReferenceType
- type Result
- type RichSelector
- type RoutedResult
- type RuleFilter
- type Selection
- type Selector
- type TTSOptions
- type TaskRecord
- type TaskStore
- type VoiceDesignOptions
Constants ¶
const ( OutputUnknown = engine.OutputUnknown OutputURL = engine.OutputURL OutputDataURI = engine.OutputDataURI OutputJSON = engine.OutputJSON OutputPlainText = engine.OutputPlainText )
const ( TaskStatusPending = "pending" TaskStatusCompleted = "completed" TaskStatusFailed = "failed" )
TaskStatus constants.
Variables ¶
var ( ErrEngineNil = errors.New("aigo: engine is nil") ErrEngineExists = errors.New("aigo: engine already registered") ErrEngineNotFound = errors.New("aigo: engine not found") ErrEngineNameEmpty = errors.New("aigo: engine name is empty") ErrEngineDisabled = errors.New("aigo: engine is disabled") )
Functions ¶
func BuildGraph ¶
BuildGraph compiles a high-level agent task into the SDK's workflow graph format.
func InferMediaType ¶ added in v0.15.0
InferMediaType guesses the required media type from an AgentTask's fields.
Types ¶
type AgentTask ¶
type AgentTask struct {
Prompt string
NegativePrompt string
Width int
Height int
Size string
Duration int
Watermark *bool
References []ReferenceAsset
AudioURL string // data URI or URL for ASR transcription input
TTS *TTSOptions
VoiceDesign *VoiceDesignOptions
Music *MusicOptions
// Structured groups image/video options separately for finer control.
Structured *AgentTaskStructured
}
AgentTask is a graph-free request shape for agents.
type AgentTaskStructured ¶
type AgentTaskStructured struct {
ImageSize string
ImageAspectRatio string
ImageResolution string // "1K", "2K", "4K"
ImageCameraAngle string
ImageWatermark *bool
VideoDuration int
VideoSize string
VideoWatermark *bool
VideoAspectRatio string
VideoResolution string // "480P", "720P", "1080P"
VideoAudio *bool
}
AgentTaskStructured 将图像与视频选项分组;便于扩展而无需继续增大 AgentTask 扁平字段。
type AsyncResult ¶
AsyncResult delivers an asynchronous execution outcome.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client routes a workflow graph to a registered execution engine.
func (*Client) AllModelInfos ¶ added in v0.16.0
AllModelInfos returns all registered model i18n metadata, sorted by name.
func (*Client) ApplyConfig ¶ added in v0.15.0
func (c *Client) ApplyConfig(cfg FileConfig) ([]string, error)
ApplyConfig registers engines from a FileConfig using registered factories. Disabled entries are silently skipped. Returns the names of successfully registered engines.
func (*Client) AvailableFor ¶
AvailableFor returns enabled engine names whose capabilities include the given media type. Disabled engines are excluded. Engines that do not implement Describer are included (assumed capable).
func (*Client) DisableEngine ¶ added in v0.15.0
DisableEngine temporarily disables a registered engine without removing it. Disabled engines are excluded from Execute, EngineNames, EngineInfos, and AvailableFor. Returns ErrEngineNotFound if the name is not registered.
func (*Client) DryRun ¶
DryRun checks what would happen without actually executing the task. Returns an estimation if the engine implements DryRunner; otherwise returns a basic result based on Describer capabilities.
func (*Client) EnableEngine ¶ added in v0.15.0
EnableEngine re-enables a previously disabled engine. Returns ErrEngineNotFound if the name is not registered.
func (*Client) EngineCapabilities ¶
func (c *Client) EngineCapabilities(name string) (engine.Capability, error)
EngineCapabilities returns the capabilities of a registered engine. If the engine does not implement Describer, an empty Capability is returned.
func (*Client) EngineInfos ¶ added in v0.15.0
func (c *Client) EngineInfos() []EngineInfo
EngineInfos returns capability metadata for all enabled engines, sorted by name. Disabled engines are excluded. Engines that do not implement Describer get an empty Capability.
func (*Client) EngineNames ¶
EngineNames returns enabled engine names in deterministic order. Disabled engines are excluded.
func (*Client) Execute ¶
func (c *Client) Execute(ctx context.Context, engineName string, graph workflow.Graph, opts ...ExecuteOption) (Result, error)
Execute dispatches the graph to the named engine. Returns ErrEngineNotFound if the engine is not registered, or ErrEngineDisabled if it is disabled.
func (*Client) ExecuteAsync ¶
func (c *Client) ExecuteAsync(ctx context.Context, engineName string, graph workflow.Graph) <-chan AsyncResult
ExecuteAsync runs Execute in a goroutine and delivers the result on the returned channel. The channel is closed after sending exactly one value. Cancelling ctx stops the work.
func (*Client) ExecutePipeline ¶
ExecutePipeline runs each step in sequence, feeding results forward.
func (*Client) ExecutePrompt ¶
func (c *Client) ExecutePrompt(ctx context.Context, engineName string, prompt string) (Result, error)
ExecutePrompt runs the simplest agent request: a single prompt.
func (*Client) ExecutePromptAuto ¶
func (c *Client) ExecutePromptAuto(ctx context.Context, selector Selector, prompt string) (RoutedResult, error)
ExecutePromptAuto lets a selector choose the engine for a prompt-driven request.
func (*Client) ExecuteTask ¶
func (c *Client) ExecuteTask(ctx context.Context, engineName string, task AgentTask, opts ...ExecuteOption) (Result, error)
ExecuteTask converts an agent task into a workflow graph and routes it to the target engine.
func (*Client) ExecuteTaskAuto ¶
func (c *Client) ExecuteTaskAuto(ctx context.Context, selector Selector, task AgentTask) (RoutedResult, error)
ExecuteTaskAuto lets a selector choose the engine for a structured agent task. If the selector implements RichSelector, capability metadata is collected and passed automatically.
func (*Client) ExecuteTaskAutoWithFallback ¶ added in v0.15.0
func (c *Client) ExecuteTaskAutoWithFallback(ctx context.Context, selector Selector, task AgentTask) (RoutedResult, error)
ExecuteTaskAutoWithFallback selects an engine and retries with alternatives on failure. If the selector is a RichSelector, all candidates receive capability metadata.
func (*Client) ExecuteTaskWithFallback ¶
func (c *Client) ExecuteTaskWithFallback(ctx context.Context, engines []string, task AgentTask, opts ...ExecuteOption) (FallbackResult, error)
ExecuteTaskWithFallback is the AgentTask variant of ExecuteWithFallback.
func (*Client) ExecuteWithFallback ¶
func (c *Client) ExecuteWithFallback(ctx context.Context, engines []string, graph workflow.Graph, opts ...ExecuteOption) (FallbackResult, error)
ExecuteWithFallback tries each engine in order; the first success wins. All engines that fail are recorded in FallbackResult.Skipped.
func (*Client) ExportModelCatalog ¶ added in v0.16.0
ExportModelCatalog returns the complete model catalog as JSON bytes.
func (*Client) IsEnabled ¶ added in v0.15.0
IsEnabled reports whether a registered engine is currently enabled.
func (*Client) ModelInfo ¶ added in v0.16.0
ModelInfo returns the i18n metadata for a specific model name.
func (*Client) ModelInfosByCapability ¶ added in v0.16.0
ModelInfosByCapability returns all registered model metadata matching the given capability.
func (*Client) ModelInfosByProvider ¶ added in v0.16.0
ModelInfosByProvider returns all registered model metadata for the given provider/engine name.
func (*Client) RecoverPending ¶ added in v0.11.0
func (c *Client) RecoverPending() ([]TaskRecord, error)
RecoverPending returns all tasks that are still pending (not completed or failed). Callers should iterate and call Resume for each.
func (*Client) RegisterAll ¶ added in v0.15.0
RegisterAll registers multiple engines at once. Stops and returns the first error encountered.
func (*Client) RegisterAllIfKey ¶ added in v0.15.0
func (c *Client) RegisterAllIfKey(entries []EngineEntry) ([]string, error)
RegisterAllIfKey registers multiple engines, each gated by env vars. Engines whose env vars are not set are silently skipped. Returns the names of engines that were actually registered.
func (*Client) RegisterEngine ¶
RegisterEngine registers an engine under a logical name.
func (*Client) RegisterEngineIfKey ¶ added in v0.15.0
RegisterEngineIfKey registers an engine only if the required API key is available. It checks the environment variables in order; if any is set, the engine is registered. Returns true if the engine was registered, false if skipped (no key found).
func (*Client) RegisterProvider ¶ added in v0.15.0
RegisterProvider registers all engines from a provider. Engines whose required env vars are not set are silently skipped. Returns the names of engines that were actually registered.
func (*Client) Resume ¶ added in v0.11.0
Resume polls a previously submitted async task to completion. The taskID is the aigo-side ID returned by Submit.
func (*Client) SearchModelInfos ¶ added in v0.16.0
SearchModelInfos returns models whose Name or DisplayName contains the query (case-insensitive).
func (*Client) Submit ¶ added in v0.11.0
func (c *Client) Submit(ctx context.Context, engineName string, graph workflow.Graph, opts ...ExecuteOption) (string, error)
Submit executes the graph and persists the task for crash recovery. If the engine completes synchronously, the result is stored as completed and an empty task ID is returned. If the engine returns a remote task ID (WaitForCompletion=false), the record is stored as pending and the aigo-side task ID is returned for later Resume.
func (*Client) UnregisterEngine ¶ added in v0.15.0
UnregisterEngine removes a previously registered engine. Returns ErrEngineNotFound if the name is not registered.
func (*Client) Use ¶
func (c *Client) Use(mw ...Middleware)
Use appends middleware that wraps every engine on each Execute call. Middleware is applied in the order added (first added = outermost wrapper).
type ClientOption ¶ added in v0.11.0
type ClientOption func(*Client)
ClientOption configures the Client at construction time.
func WithDefaultStore ¶ added in v0.11.0
func WithDefaultStore() (ClientOption, error)
WithDefaultStore attaches a FileTaskStore at .aigo/tasks.json (current working directory). Returns an error if the store directory cannot be created.
func WithStore ¶ added in v0.11.0
func WithStore(s TaskStore) ClientOption
WithStore attaches a TaskStore for async task persistence and crash recovery.
type EngineEntry ¶ added in v0.15.0
type EngineEntry struct {
Name string
Engine engine.Engine
EnvVars []string // required env vars; if empty, always register
}
EngineEntry describes an engine to register with optional env-var gating.
type EngineInfo ¶ added in v0.15.0
type EngineInfo struct {
Name string `json:"name"`
DisplayName engine.DisplayName `json:"display_name"`
Intro engine.DisplayName `json:"intro,omitempty"`
DocURL string `json:"doc_url,omitempty"`
Capability engine.Capability `json:"capability"`
Models []engine.ModelInfo `json:"models,omitempty"`
}
EngineInfo describes a candidate engine's capabilities, provided to RichSelector for informed decisions.
type ExecuteOption ¶
type ExecuteOption func(*executeConfig)
ExecuteOption configures optional Execute behavior.
func WithProgress ¶
func WithProgress(fn func(ProgressEvent)) ExecuteOption
WithProgress registers a callback for execution progress events.
type FallbackError ¶
FallbackError records a single engine failure during fallback execution.
func (FallbackError) Error ¶
func (e FallbackError) Error() string
func (FallbackError) Unwrap ¶
func (e FallbackError) Unwrap() error
type FallbackResult ¶
type FallbackResult struct {
Engine string
Output Result
Skipped []FallbackError
}
FallbackResult is the outcome of a fallback-enabled execution.
type FileConfig ¶ added in v0.15.0
type FileConfig struct {
Engines []engine.EngineConfig `json:"engines"`
}
FileConfig is the top-level structure for JSON-based engine configuration.
func LoadConfig ¶ added in v0.15.0
func LoadConfig(path string) (FileConfig, error)
LoadConfig reads engine configuration from a JSON file.
type FileTaskStore ¶ added in v0.11.0
type FileTaskStore struct {
// contains filtered or unexported fields
}
FileTaskStore implements TaskStore using a single JSON file. It uses sync.Mutex for in-process safety and flock for cross-process safety.
func DefaultFileTaskStore ¶ added in v0.11.0
func DefaultFileTaskStore() (*FileTaskStore, error)
DefaultFileTaskStore creates a file-backed task store at .aigo/tasks.json relative to the current working directory.
func NewFileTaskStore ¶ added in v0.11.0
func NewFileTaskStore(path string) (*FileTaskStore, error)
NewFileTaskStore creates a file-backed task store at the given path.
func (*FileTaskStore) All ¶ added in v0.11.0
func (s *FileTaskStore) All() ([]TaskRecord, error)
func (*FileTaskStore) Delete ¶ added in v0.11.0
func (s *FileTaskStore) Delete(id string) error
func (*FileTaskStore) Load ¶ added in v0.11.0
func (s *FileTaskStore) Load(id string) (TaskRecord, error)
func (*FileTaskStore) Purge ¶ added in v0.11.0
func (s *FileTaskStore) Purge(maxAge time.Duration) error
Purge removes completed and failed records older than maxAge.
func (*FileTaskStore) Save ¶ added in v0.11.0
func (s *FileTaskStore) Save(record TaskRecord) error
type Middleware ¶
Middleware wraps an engine to add cross-cutting behavior (logging, timing, retry, etc.).
func WithLogging ¶
func WithLogging(w io.Writer) Middleware
WithLogging returns middleware that logs engine calls to the given writer.
func WithRetry ¶
func WithRetry(maxRetries int) Middleware
WithRetry returns middleware that retries on retryable errors up to maxRetries times.
type MusicOptions ¶ added in v0.10.0
type MusicOptions struct {
Lyrics string
IsInstrumental *bool
LyricsOptimizer *bool
OutputFormat string // "url" or "hex"
SampleRate int
Bitrate int
Format string // "mp3", "wav", "flac"
}
MusicOptions groups music generation parameters.
type OutputKind ¶
type OutputKind = engine.OutputKind
OutputKind is an alias for engine.OutputKind.
func InterpretOutputKind ¶
func InterpretOutputKind(s string) OutputKind
InterpretOutputKind 根据内容前缀做轻量分类;任务 id、纯数字等会落在 OutputPlainText。
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline chains multiple engine executions where each step's input depends on the previous output.
func NewPipeline ¶
NewPipeline starts a pipeline with an initial engine and task.
func (*Pipeline) Then ¶
func (p *Pipeline) Then(fn PipelineStep) *Pipeline
Then appends a step that transforms the previous result into the next task.
type PipelineStep ¶
PipelineStep transforms a previous result into the next task and target engine.
type PrioritySelector ¶ added in v0.15.0
type PrioritySelector struct {
Priority []string // Engine names in preference order.
Filter *RuleFilter // Optional constraint filter.
}
PrioritySelector picks the first compatible engine from a priority-ordered list. It optionally pre-filters candidates using a RuleFilter.
func (*PrioritySelector) SelectEngine ¶ added in v0.15.0
func (s *PrioritySelector) SelectEngine(_ context.Context, task AgentTask, engines []string) (Selection, error)
SelectEngine implements Selector using the priority list against flat engine names.
func (*PrioritySelector) SelectEngineFromCandidates ¶ added in v0.15.0
func (s *PrioritySelector) SelectEngineFromCandidates(_ context.Context, task AgentTask, candidates []EngineInfo) (Selection, error)
SelectEngineFromCandidates implements RichSelector with capability-aware filtering.
type ProgressEvent ¶
type ProgressEvent struct {
Phase string // "submitted", "polling", "completed"
Attempt int // poll attempt number (0 for non-polling phases)
Elapsed time.Duration // wall-clock time since execution start
Percent float64 // 0~1, actual progress from upstream API (0 if unavailable)
PreviewURL string // intermediate preview URL (e.g. video first frame)
}
ProgressEvent reports execution progress to the caller.
type ReferenceAsset ¶
type ReferenceAsset struct {
Type ReferenceType
URL string
}
ReferenceAsset describes an externally reachable media input.
type ReferenceType ¶
type ReferenceType string
ReferenceType identifies the kind of remote asset to attach to an agent task.
const ( ReferenceTypeImage ReferenceType = "image" ReferenceTypeVideo ReferenceType = "video" )
type Result ¶
type Result struct {
Value string // Raw output from the engine.
Kind OutputKind // Authoritative classification from the engine.
Engine string // Name of the engine that produced the result.
Elapsed time.Duration // Wall-clock execution time.
Metadata map[string]any // Engine-specific data (optional).
}
Result is the public outcome of every Client execution method.
type RichSelector ¶ added in v0.15.0
type RichSelector interface {
Selector
SelectEngineFromCandidates(ctx context.Context, task AgentTask, candidates []EngineInfo) (Selection, error)
}
RichSelector is an enhanced selector that receives engine capability metadata. Implementations can use capability information to make better routing decisions. A RichSelector is also a Selector — ExecuteTaskAuto auto-detects the interface.
type RoutedResult ¶
RoutedResult is the result of a selector-driven execution.
type RuleFilter ¶ added in v0.15.0
type RuleFilter struct{}
RuleFilter filters candidates based on task constraints.
func (*RuleFilter) Filter ¶ added in v0.15.0
func (f *RuleFilter) Filter(task AgentTask, candidates []EngineInfo) []EngineInfo
Filter returns candidates compatible with the task. It checks media type, size, duration, and voice constraints.
type Selector ¶
type Selector interface {
SelectEngine(ctx context.Context, task AgentTask, engines []string) (Selection, error)
}
Selector decides which registered engine should handle a task.
type TTSOptions ¶
type TTSOptions struct {
Voice string
LanguageType string
Instructions string
OptimizeInstructions *bool
}
TTSOptions groups text-to-speech parameters.
type TaskRecord ¶ added in v0.11.0
type TaskRecord struct {
ID string `json:"id"`
EngineName string `json:"engine"`
RemoteID string `json:"remote_id"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ResultVal string `json:"result_value,omitempty"`
ResultKind OutputKind `json:"result_kind,omitempty"`
ErrMsg string `json:"error,omitempty"`
}
TaskRecord represents a persisted async task.
type TaskStore ¶ added in v0.11.0
type TaskStore interface {
Save(record TaskRecord) error
Load(id string) (TaskRecord, error)
All() ([]TaskRecord, error)
Delete(id string) error
}
TaskStore persists async task records for crash recovery.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
aigoerr
Package aigoerr provides structured, classifiable errors for aigo engines.
|
Package aigoerr provides structured, classifiable errors for aigo engines. |
|
alibabacloud
Package alibabacloud 对接阿里云百炼(DashScope)多模态 API。
|
Package alibabacloud 对接阿里云百炼(DashScope)多模态 API。 |
|
alibabacloud/internal/async
Package async 封装百炼异步任务创建与轮询(图生图、文生视频等共用)。
|
Package async 封装百炼异步任务创建与轮询(图生图、文生视频等共用)。 |
|
alibabacloud/internal/audiogen
Package audiogen 实现阿里云百炼「语音合成 / 声音设计」类能力。
|
Package audiogen 实现阿里云百炼「语音合成 / 声音设计」类能力。 |
|
alibabacloud/internal/graphx
Package graphx 从 workflow.Graph 抽取各域(图/视频/音频)共用字段。
|
Package graphx 从 workflow.Graph 抽取各域(图/视频/音频)共用字段。 |
|
alibabacloud/internal/imggen
Package imggen 实现阿里云百炼「图片生成」类能力(文生图等)。
|
Package imggen 实现阿里云百炼「图片生成」类能力(文生图等)。 |
|
alibabacloud/internal/threedgen
Package threedgen 实现阿里云百炼「3D 资产生成」类能力(Tripo 系列)。
|
Package threedgen 实现阿里云百炼「3D 资产生成」类能力(Tripo 系列)。 |
|
alibabacloud/internal/vidgen
Package vidgen 实现阿里云百炼「视频生成 / 编辑」类能力(Wan 系列异步接口)。
|
Package vidgen 实现阿里云百炼「视频生成 / 编辑」类能力(Wan 系列异步接口)。 |
|
ark
Package ark implements the Volcengine Ark (火山方舟) video generation engine, supporting Seedance 2.0 and other Ark content generation models.
|
Package ark implements the Volcengine Ark (火山方舟) video generation engine, supporting Seedance 2.0 and other Ark content generation models. |
|
comfydeploy
Package comfydeploy implements engine.Engine for the ComfyDeploy API.
|
Package comfydeploy implements engine.Engine for the ComfyDeploy API. |
|
elevenlabs
Package elevenlabs implements engine.Engine for the ElevenLabs TTS API.
|
Package elevenlabs implements engine.Engine for the ElevenLabs TTS API. |
|
embed
Package embed defines the EmbedEngine interface for vector embedding backends.
|
Package embed defines the EmbedEngine interface for vector embedding backends. |
|
embed/alibabacloud
Package aliyun implements the Alibaba Cloud DashScope (Bailian) embedding backend.
|
Package aliyun implements the Alibaba Cloud DashScope (Bailian) embedding backend. |
|
embed/gemini
Package gemini implements the Gemini Embedding 2 backend.
|
Package gemini implements the Gemini Embedding 2 backend. |
|
embed/jina
Package jina implements the Jina AI embedding backend.
|
Package jina implements the Jina AI embedding backend. |
|
embed/openai
Package openai implements the OpenAI text embedding backend.
|
Package openai implements the OpenAI text embedding backend. |
|
embed/voyage
Package voyage implements the Voyage AI embedding backend.
|
Package voyage implements the Voyage AI embedding backend. |
|
fal
Package fal implements engine.Engine for the Fal.ai inference platform.
|
Package fal implements engine.Engine for the Fal.ai inference platform. |
|
flux
Package flux implements engine.Engine for Black Forest Labs FLUX API.
|
Package flux implements engine.Engine for Black Forest Labs FLUX API. |
|
gemini
Package gemini implements engine.Engine for Google Gemini multi-modal understanding.
|
Package gemini implements engine.Engine for Google Gemini multi-modal understanding. |
|
google
Package google implements engine.Engine for Google Imagen and Veo APIs.
|
Package google implements engine.Engine for Google Imagen and Veo APIs. |
|
gpt4o
Package gpt4o implements engine.Engine for OpenAI GPT-4o vision understanding.
|
Package gpt4o implements engine.Engine for OpenAI GPT-4o vision understanding. |
|
hailuo
Package hailuo implements engine.Engine for Hailuo (MiniMax) video generation.
|
Package hailuo implements engine.Engine for Hailuo (MiniMax) video generation. |
|
hedra
Package hedra implements engine.Engine for the Hedra character video API.
|
Package hedra implements engine.Engine for the Hedra character video API. |
|
httpx
Package httpx 提供各引擎共用的 HTTP Client 默认值(超时等)。
|
Package httpx 提供各引擎共用的 HTTP Client 默认值(超时等)。 |
|
ideogram
Package ideogram implements engine.Engine for the Ideogram API.
|
Package ideogram implements engine.Engine for the Ideogram API. |
|
jimeng
Package jimeng implements engine.Engine for the Jimeng (即梦) API by ByteDance.
|
Package jimeng implements engine.Engine for the Jimeng (即梦) API by ByteDance. |
|
kling
Package kling implements engine.Engine for the Kling (快手可灵) API.
|
Package kling implements engine.Engine for the Kling (快手可灵) API. |
|
liblib
Package liblib implements engine.Engine for the LibLibAI open API.
|
Package liblib implements engine.Engine for the LibLibAI open API. |
|
luma
Package luma implements engine.Engine for the Luma Dream Machine API.
|
Package luma implements engine.Engine for the Luma Dream Machine API. |
|
meshy
Package meshy implements engine.Engine for the Meshy 3D model generation API.
|
Package meshy implements engine.Engine for the Meshy 3D model generation API. |
|
midjourney
Package midjourney implements engine.Engine for MidJourney image generation via third-party proxy APIs (e.g.
|
Package midjourney implements engine.Engine for MidJourney image generation via third-party proxy APIs (e.g. |
|
minimax
Package minimax implements engine.Engine for MiniMax music generation.
|
Package minimax implements engine.Engine for MiniMax music generation. |
|
newapi
Package newapi 对接 New API 文档中的大模型 HTTP 接口(图像 / 视频 / 语音等)。
|
Package newapi 对接 New API 文档中的大模型 HTTP 接口(图像 / 视频 / 语音等)。 |
|
newapi/internal/rt
Package rt 提供网关 BaseURL 规范化与路径拼接。
|
Package rt 提供网关 BaseURL 规范化与路径拼接。 |
|
openrouter
Package openrouter implements an aigo engine for the OpenRouter API.
|
Package openrouter implements an aigo engine for the OpenRouter API. |
|
pika
Package pika implements engine.Engine for the Pika video generation API.
|
Package pika implements engine.Engine for the Pika video generation API. |
|
qwenvl
Package qwenvl implements engine.Engine for Qwen multimodal understanding.
|
Package qwenvl implements engine.Engine for Qwen multimodal understanding. |
|
recraft
Package recraft implements engine.Engine for the Recraft AI API.
|
Package recraft implements engine.Engine for the Recraft AI API. |
|
replicate
Package replicate implements engine.Engine for the Replicate API.
|
Package replicate implements engine.Engine for the Replicate API. |
|
runninghub
Package runninghub implements engine.Engine for the RunningHub API.
|
Package runninghub implements engine.Engine for the RunningHub API. |
|
runway
Package runway implements engine.Engine for the Runway API.
|
Package runway implements engine.Engine for the Runway API. |
|
stability
Package stability implements engine.Engine for the Stability AI API.
|
Package stability implements engine.Engine for the Stability AI API. |
|
suno
Package suno implements engine.Engine for Suno music generation.
|
Package suno implements engine.Engine for Suno music generation. |
|
volcvoice
Package volcvoice implements engine.Engine for Volcengine Speech (火山语音 / openspeech.bytedance.com) TTS and ASR.
|
Package volcvoice implements engine.Engine for Volcengine Speech (火山语音 / openspeech.bytedance.com) TTS and ASR. |
|
examples
|
|
|
agent_auto_router
command
|
|
|
alibabacloud_qwen_image
command
|
|
|
alibabacloud_qwen_tts
command
|
|
|
alibabacloud_qwen_voice_design
command
|
|
|
alibabacloud_tripo_3d
command
阿里云百炼 Tripo 3D 资产生成示例:演示文生 3D / 单图生 3D / 多图生 3D 三种入口。
|
阿里云百炼 Tripo 3D 资产生成示例:演示文生 3D / 单图生 3D / 多图生 3D 三种入口。 |
|
alibabacloud_wan_image
command
|
|
|
alibabacloud_wan_r2v
command
|
|
|
alibabacloud_wan_t2v
command
|
|
|
alibabacloud_wan_videoedit
command
|
|
|
alibabacloud_zimage
command
|
|
|
newapi_image
command
|
|
|
newapi_seedance_video
command
|
|
|
newapi_speech
command
|
|
|
newapi_video
command
|
|
|
Package tooldef provides JSON Schema tool definitions for AI agent frameworks.
|
Package tooldef provides JSON Schema tool definitions for AI agent frameworks. |