alibaba

package
v0.0.0-...-190da1e Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

Portions of this adapter are copied and adapted from bailian-cli packages/commands/src/commands/text/chat.ts at commit 678f60b. 本适配器的部分逻辑复制并改编自 bailian-cli 固定提交 678f60b 中的 packages/commands/src/commands/text/chat.ts。 The copied scope is the documented enable_thinking and thinking_budget behavior; credential and routing ownership remain native Vulcan design. 复制范围为文档化的 enable_thinking 与 thinking_budget 行为;凭据和路由所有权仍采用 Vulcan 原生设计。

Package alibaba contains Alibaba Cloud Model Studio provider-specific execution behavior. Package alibaba 包含阿里云百炼供应商专属执行行为。

Index

Constants

View Source
const (
	// ReasoningProfileIDSuffix identifies Alibaba execution profiles whose provider-default mode is thinking enabled.
	// ReasoningProfileIDSuffix 标识供应商默认开启思考模式的 Alibaba 执行规格。
	ReasoningProfileIDSuffix = "_reasoning"
	// ReasoningEnabledParameterID identifies exact enable_thinking support in an Alibaba execution profile.
	// ReasoningEnabledParameterID 标识 Alibaba 执行规格对 enable_thinking 的精确支持。
	ReasoningEnabledParameterID = "reasoning_enabled"
	// ReasoningBudgetParameterID identifies an exact model-specific thinking_budget range.
	// ReasoningBudgetParameterID 标识模型专属的精确 thinking_budget 范围。
	ReasoningBudgetParameterID = "reasoning_budget_tokens"
)
View Source
const (
	// CosyVoiceSynthesizeActionBindingID identifies non-realtime CosyVoice synthesis.
	// CosyVoiceSynthesizeActionBindingID 标识非实时 CosyVoice 语音合成。
	CosyVoiceSynthesizeActionBindingID = "action_alibaba_cosyvoice_synthesize"
	// CosyVoiceSynthesizeProtocolProfileID identifies the closed CosyVoice HTTP and SSE contract.
	// CosyVoiceSynthesizeProtocolProfileID 标识封闭的 CosyVoice HTTP 与 SSE 合同。
	CosyVoiceSynthesizeProtocolProfileID = "alibaba.cosyvoice.synthesize.v1"
)
View Source
const (
	// EmbeddingActionBindingID identifies Alibaba Model Studio compatible embedding execution.
	// EmbeddingActionBindingID 标识阿里云百炼兼容 Embedding 执行。
	EmbeddingActionBindingID = "action_alibaba_embedding_create"
	// EmbeddingProtocolProfileID identifies Alibaba's documented OpenAI-compatible embedding contract.
	// EmbeddingProtocolProfileID 标识阿里云已记录的 OpenAI 兼容 Embedding 合同。
	EmbeddingProtocolProfileID = "alibaba.model_studio.embeddings.v1"
)
View Source
const (
	// HappyHorseVideoGenerateActionBindingID identifies the verified t2v, i2v, and r2v family.
	// HappyHorseVideoGenerateActionBindingID 标识已验证的 t2v、i2v 与 r2v 系列。
	HappyHorseVideoGenerateActionBindingID = "action_alibaba_happyhorse_video_generate"
	// HappyHorseVideoEditActionBindingID identifies the verified video-edit family.
	// HappyHorseVideoEditActionBindingID 标识已验证的视频编辑系列。
	HappyHorseVideoEditActionBindingID = "action_alibaba_happyhorse_video_edit"
	// HappyHorseVideoGenerateProtocolProfileID identifies the HappyHorse generation wire contract.
	// HappyHorseVideoGenerateProtocolProfileID 标识 HappyHorse 生成 Wire 合同。
	HappyHorseVideoGenerateProtocolProfileID = "alibaba.happyhorse.video.generate.v1"
	// HappyHorseVideoEditProtocolProfileID identifies the HappyHorse editing wire contract.
	// HappyHorseVideoEditProtocolProfileID 标识 HappyHorse 编辑 Wire 合同。
	HappyHorseVideoEditProtocolProfileID = "alibaba.happyhorse.video.edit.v1"
)
View Source
const (
	// ImageGenerateActionBindingID identifies the synchronous Qwen image generation action.
	// ImageGenerateActionBindingID 标识同步 Qwen 图片生成动作。
	ImageGenerateActionBindingID = "action_alibaba_qwen_image_generate"
	// ImageEditActionBindingID identifies the synchronous Qwen image editing action.
	// ImageEditActionBindingID 标识同步 Qwen 图片编辑动作。
	ImageEditActionBindingID = "action_alibaba_qwen_image_edit"
	// ImageGenerateProtocolProfileID identifies the closed Qwen image generation profile.
	// ImageGenerateProtocolProfileID 标识封闭的 Qwen 图片生成 Profile。
	ImageGenerateProtocolProfileID = "alibaba.qwen-image.generate.v1"
	// ImageEditProtocolProfileID identifies the closed Qwen image editing profile.
	// ImageEditProtocolProfileID 标识封闭的 Qwen 图片编辑 Profile。
	ImageEditProtocolProfileID = "alibaba.qwen-image.edit.v1"
)
View Source
const (
	// MediaAnalyzeActionBindingID identifies the dedicated non-realtime Qwen Omni analysis action.
	// MediaAnalyzeActionBindingID 标识专用非实时 Qwen Omni 分析动作。
	MediaAnalyzeActionBindingID = "action_alibaba_qwen_omni_media_analyze"
	// MediaAnalyzeProtocolProfileID identifies the Router-versioned analysis projection layered on Alibaba Chat.
	// MediaAnalyzeProtocolProfileID 标识叠加在 Alibaba Chat 上且由 Router 版本化的分析投影。
	MediaAnalyzeProtocolProfileID = "alibaba.qwen_omni.media_analyze.v1"
	// MediaAnalyzePromptRevision freezes the Router-owned task instruction semantics.
	// MediaAnalyzePromptRevision 冻结 Router 所有任务指令语义。
	MediaAnalyzePromptRevision uint64 = 1
)
View Source
const (
	// RerankActionBindingID identifies Alibaba's OpenAI-compatible qwen3-rerank action.
	// RerankActionBindingID 标识 Alibaba OpenAI 兼容 qwen3-rerank 动作。
	RerankActionBindingID = "action_alibaba_rerank_documents"
	// RerankProtocolProfileID identifies the exact flat qwen3-rerank request and response contract.
	// RerankProtocolProfileID 标识精确的扁平 qwen3-rerank 请求与响应合同。
	RerankProtocolProfileID = "alibaba.qwen3-rerank.v1"
)
View Source
const (
	// SpeechSynthesizeActionBindingID identifies the synchronous Qwen3-TTS action.
	// SpeechSynthesizeActionBindingID 标识同步 Qwen3-TTS 动作。
	SpeechSynthesizeActionBindingID = "action_alibaba_qwen3_tts_synthesize"
	// SpeechTranscribeActionBindingID identifies the synchronous Qwen3-ASR action.
	// SpeechTranscribeActionBindingID 标识同步 Qwen3-ASR 动作。
	SpeechTranscribeActionBindingID = "action_alibaba_qwen3_asr_transcribe"
	// SpeechSynthesizeProtocolProfileID identifies the closed Qwen3-TTS HTTP profile.
	// SpeechSynthesizeProtocolProfileID 标识封闭的 Qwen3-TTS HTTP Profile。
	SpeechSynthesizeProtocolProfileID = "alibaba.qwen3-tts.synthesize.v1"
	// SpeechTranscribeProtocolProfileID identifies the closed Qwen3-ASR synchronous profile.
	// SpeechTranscribeProtocolProfileID 标识封闭的 Qwen3-ASR 同步 Profile。
	SpeechTranscribeProtocolProfileID = "alibaba.qwen3-asr.transcribe.v1"
)
View Source
const (
	// SpeechTranscribeAsyncActionBindingID identifies Fun-ASR offline transcription.
	// SpeechTranscribeAsyncActionBindingID 标识 Fun-ASR 离线转写。
	SpeechTranscribeAsyncActionBindingID = "action_alibaba_fun_asr_transcribe"
	// SpeechTranscribeAsyncProtocolProfileID identifies the closed Fun-ASR task contract.
	// SpeechTranscribeAsyncProtocolProfileID 标识封闭的 Fun-ASR 任务合同。
	SpeechTranscribeAsyncProtocolProfileID = "alibaba.fun-asr.transcribe.v1"
)
View Source
const (
	// WanImageGenerateActionBindingID identifies the synchronous Wan 2.7 image generation action.
	// WanImageGenerateActionBindingID 标识同步 Wan 2.7 图片生成动作。
	WanImageGenerateActionBindingID = "action_alibaba_wan_image_generate"
	// WanImageEditActionBindingID identifies the synchronous Wan 2.7 image editing action.
	// WanImageEditActionBindingID 标识同步 Wan 2.7 图片编辑动作。
	WanImageEditActionBindingID = "action_alibaba_wan_image_edit"
	// WanImageGenerateProtocolProfileID identifies the closed Wan 2.7 generation profile.
	// WanImageGenerateProtocolProfileID 标识封闭的 Wan 2.7 生成 Profile。
	WanImageGenerateProtocolProfileID = "alibaba.wan-image.generate.v1"
	// WanImageEditProtocolProfileID identifies the closed Wan 2.7 editing profile.
	// WanImageEditProtocolProfileID 标识封闭的 Wan 2.7 编辑 Profile。
	WanImageEditProtocolProfileID = "alibaba.wan-image.edit.v1"
)
View Source
const (
	// WanVideoGenerateActionBindingID identifies workspace-scoped Wan 2.7 text-to-video.
	// WanVideoGenerateActionBindingID 标识工作空间作用域的 Wan 2.7 文生视频动作。
	WanVideoGenerateActionBindingID = "action_alibaba_wan_video_generate"
	// WanVideoGenerateProtocolProfileID identifies the Wan 2.7 video wire contract.
	// WanVideoGenerateProtocolProfileID 标识 Wan 2.7 视频 Wire 合同。
	WanVideoGenerateProtocolProfileID = "alibaba.wan.video.generate.v2.7"
)
View Source
const (
	// SearchWebActionBindingID identifies the Alibaba Model Studio WebSearch MCP action.
	// SearchWebActionBindingID 标识 Alibaba Model Studio WebSearch MCP 动作。
	SearchWebActionBindingID = "action_alibaba_search_web"
	// SearchWebProtocolProfileID identifies the copied Alibaba WebSearch MCP wire contract.
	// SearchWebProtocolProfileID 标识复制的 Alibaba WebSearch MCP 线协议合同。
	SearchWebProtocolProfileID = "alibaba.web_search_mcp.v1"
)
View Source
const (
	// TokenPlanHarnessConversationActionBindingID identifies the exact Responses side-request action proven by Qwen Code.
	// TokenPlanHarnessConversationActionBindingID 标识由 Qwen Code 证实的精确 Responses 旁路请求动作。
	TokenPlanHarnessConversationActionBindingID = "action_alibaba_token_plan_harness_respond"
)

Variables

View Source
var (
	// ErrInvalidHappyHorseVideoDriver reports an unsupported HappyHorse request.
	// ErrInvalidHappyHorseVideoDriver 表示不受支持的 HappyHorse 请求。
	ErrInvalidHappyHorseVideoDriver = errors.New("invalid Alibaba HappyHorse video driver")
	// ErrInvalidHappyHorseVideoResponse reports malformed HappyHorse task output.
	// ErrInvalidHappyHorseVideoResponse 表示格式错误的 HappyHorse 任务输出。
	ErrInvalidHappyHorseVideoResponse = errors.New("invalid Alibaba HappyHorse video response")
)
View Source
var (
	// ErrInvalidImageDriver reports an incomplete or unsupported Qwen image request.
	// ErrInvalidImageDriver 表示不完整或不受支持的 Qwen 图片请求。
	ErrInvalidImageDriver = errors.New("invalid Alibaba Qwen image driver")
	// ErrInvalidImageResponse reports a malformed Qwen image response.
	// ErrInvalidImageResponse 表示格式错误的 Qwen 图片响应。
	ErrInvalidImageResponse = errors.New("invalid Alibaba Qwen image response")
)
View Source
var (
	// ErrInvalidMediaAnalyzeDriver reports an incomplete Alibaba Omni analysis driver.
	// ErrInvalidMediaAnalyzeDriver 表示不完整的 Alibaba Omni 分析 Driver。
	ErrInvalidMediaAnalyzeDriver = errors.New("invalid Alibaba media analysis driver")
	// ErrUnsupportedMediaAnalyzeInput reports a task or input outside the evidence-closed Omni contract.
	// ErrUnsupportedMediaAnalyzeInput 表示任务或输入超出证据封闭的 Omni 合同。
	ErrUnsupportedMediaAnalyzeInput = errors.New("unsupported Alibaba media analysis input")
)
View Source
var (
	// ErrInvalidRerankDriver reports an incomplete or unsupported qwen3-rerank execution.
	// ErrInvalidRerankDriver 表示不完整或不受支持的 qwen3-rerank 执行。
	ErrInvalidRerankDriver = errors.New("invalid Alibaba rerank driver")
	// ErrInvalidRerankResponse reports a malformed qwen3-rerank result.
	// ErrInvalidRerankResponse 表示格式错误的 qwen3-rerank 结果。
	ErrInvalidRerankResponse = errors.New("invalid Alibaba rerank response")
)
View Source
var (
	// ErrInvalidSpeechDriver reports an incomplete or unsupported Alibaba speech request.
	// ErrInvalidSpeechDriver 表示不完整或不受支持的阿里云语音请求。
	ErrInvalidSpeechDriver = errors.New("invalid Alibaba speech driver")
	// ErrInvalidSpeechResponse reports malformed Alibaba speech output.
	// ErrInvalidSpeechResponse 表示格式错误的阿里云语音输出。
	ErrInvalidSpeechResponse = errors.New("invalid Alibaba speech response")
)
View Source
var (
	// ErrInvalidWanVideoDriver reports an unsupported Wan video request.
	// ErrInvalidWanVideoDriver 表示不受支持的 Wan 视频请求。
	ErrInvalidWanVideoDriver = errors.New("invalid Alibaba Wan video driver")
	// ErrInvalidWanVideoResponse reports malformed Wan task output.
	// ErrInvalidWanVideoResponse 表示格式错误的 Wan 任务输出。
	ErrInvalidWanVideoResponse = errors.New("invalid Alibaba Wan video response")
)
View Source
var (
	// ErrInvalidWebSearchDriver reports an incomplete Alibaba WebSearch MCP driver or response.
	// ErrInvalidWebSearchDriver 表示不完整的 Alibaba WebSearch MCP 驱动或响应。
	ErrInvalidWebSearchDriver = errors.New("invalid Alibaba WebSearch driver")
	// ErrUnsupportedWebSearchInput reports VCP filters that Alibaba WebSearch MCP cannot carry.
	// ErrUnsupportedWebSearchInput 表示 Alibaba WebSearch MCP 无法承载的 VCP 过滤条件。
	ErrUnsupportedWebSearchInput = errors.New("unsupported Alibaba WebSearch input")
)
View Source
var (
	// ErrInvalidChatAdapter reports an incomplete Alibaba Chat request adaptation.
	// ErrInvalidChatAdapter 表示 Alibaba Chat 请求适配不完整。
	ErrInvalidChatAdapter = errors.New("invalid Alibaba Chat adapter")
)
View Source
var (
	// ErrInvalidOSSUploader reports incomplete dependencies, scope drift, or an invalid upload response.
	// ErrInvalidOSSUploader 表示依赖不完整、作用域漂移或上传响应无效。
	ErrInvalidOSSUploader = errors.New("invalid Alibaba OSS uploader")
)
View Source
var (
	// ErrInvalidTokenPlanHarnessRequest reports a request outside the exact Qwen Code Responses tool contract.
	// ErrInvalidTokenPlanHarnessRequest 表示请求超出 Qwen Code 的精确 Responses 工具合同。
	ErrInvalidTokenPlanHarnessRequest = errors.New("invalid Alibaba Token Plan Harness request")
)
View Source
var (
	// ErrInvalidWanImageDriver reports an incomplete or unsupported Wan image request.
	// ErrInvalidWanImageDriver 表示不完整或不受支持的 Wan 图片请求。
	ErrInvalidWanImageDriver = errors.New("invalid Alibaba Wan image driver")
)

Functions

func NewEmbeddingDriver

func NewEmbeddingDriver(definitionID string, client *transport.Client) (*provideropenai.EmbeddingActionDriver, error)

NewEmbeddingDriver creates an Alibaba-owned driver over the exact documented compatible contract. NewEmbeddingDriver 基于精确记录的兼容合同创建阿里云拥有的 Driver。

Types

type ChatAdapter

type ChatAdapter struct{}

ChatAdapter maps canonical VCP reasoning intent to Alibaba's typed OpenAI-compatible extension. ChatAdapter 将规范 VCP 推理意图映射到 Alibaba 类型化 OpenAI 兼容扩展。

func NewChatAdapter

func NewChatAdapter() *ChatAdapter

NewChatAdapter creates one stateless Alibaba Chat request adapter. NewChatAdapter 创建一个无状态的 Alibaba Chat 请求适配器。

func (*ChatAdapter) Adapt

Adapt applies Alibaba's exact thinking defaults and removes the incompatible generic reasoning_effort carrier. Adapt 应用 Alibaba 精确的思考默认值,并移除不兼容的通用 reasoning_effort 载体。

type CosyVoiceActionDriver

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

CosyVoiceActionDriver executes one immutable Alibaba CosyVoice action. CosyVoiceActionDriver 执行一个不可变的阿里 CosyVoice 动作。

func NewCosyVoiceActionDriver

func NewCosyVoiceActionDriver(definitionID string, client *transport.Client) (*CosyVoiceActionDriver, error)

NewCosyVoiceActionDriver creates one exact CosyVoice synthesis driver. NewCosyVoiceActionDriver 创建一个精确的 CosyVoice 合成 Driver。

func (*CosyVoiceActionDriver) ActionBindingID

func (d *CosyVoiceActionDriver) ActionBindingID() string

ActionBindingID returns the exact CosyVoice action binding. ActionBindingID 返回精确的 CosyVoice 动作绑定。

func (*CosyVoiceActionDriver) Execute

Execute projects and executes one official non-realtime CosyVoice request. Execute 投影并执行一个官方非实时 CosyVoice 请求。

func (*CosyVoiceActionDriver) ProviderDefinitionID

func (d *CosyVoiceActionDriver) ProviderDefinitionID() string

ProviderDefinitionID returns the sole provider definition owned by this driver. ProviderDefinitionID 返回此 Driver 唯一所属的供应商 Definition。

type HappyHorseVideoTaskDriver

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

HappyHorseVideoTaskDriver owns one exact HappyHorse asynchronous action for one CN definition. HappyHorseVideoTaskDriver 为一个 CN Definition 拥有一个精确的 HappyHorse 异步动作。

func NewHappyHorseVideoTaskDriver

func NewHappyHorseVideoTaskDriver(definitionID string, actionBindingID string, client *transport.Client) (*HappyHorseVideoTaskDriver, error)

NewHappyHorseVideoTaskDriver creates one action-specific HappyHorse task driver. NewHappyHorseVideoTaskDriver 创建一个动作专属 HappyHorse 任务 Driver。

func (*HappyHorseVideoTaskDriver) ActionBindingID

func (d *HappyHorseVideoTaskDriver) ActionBindingID() string

ActionBindingID returns the sole action binding owned by this driver. ActionBindingID 返回此 Driver 唯一拥有的动作绑定。

func (*HappyHorseVideoTaskDriver) Cancel

func (d *HappyHorseVideoTaskDriver) Cancel(ctx context.Context, execution provider.ExecutionRequest, providerTaskID string) (provider.TaskResult, error)

Cancel requests cancellation of the same HappyHorse task. Cancel 请求取消同一个 HappyHorse 任务。

func (*HappyHorseVideoTaskDriver) Poll

Poll observes one HappyHorse task through the same immutable action binding. Poll 通过同一不可变动作绑定观察一个 HappyHorse 任务。

func (*HappyHorseVideoTaskDriver) ProviderDefinitionID

func (d *HappyHorseVideoTaskDriver) ProviderDefinitionID() string

ProviderDefinitionID returns the sole provider definition owned by this driver. ProviderDefinitionID 返回此 Driver 唯一拥有的供应商 Definition。

func (*HappyHorseVideoTaskDriver) Start

Start submits one HappyHorse task and preserves its private provider identifier. Start 提交一个 HappyHorse 任务并保留其私有供应商标识。

type ImageActionDriver

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

ImageActionDriver executes one synchronous Qwen image action for one immutable provider definition. ImageActionDriver 为一个不可变供应商 Definition 执行一个同步 Qwen 图片动作。

func NewImageActionDriver

func NewImageActionDriver(definitionID string, actionBindingID string, client *transport.Client) (*ImageActionDriver, error)

NewImageActionDriver creates one Alibaba Qwen image generation or edit driver. NewImageActionDriver 创建一个 Alibaba Qwen 图片生成或编辑 Driver。

func (*ImageActionDriver) ActionBindingID

func (d *ImageActionDriver) ActionBindingID() string

ActionBindingID returns the sole action binding owned by this driver. ActionBindingID 返回此 Driver 拥有的唯一动作绑定。

func (*ImageActionDriver) Execute

Execute projects and executes one official synchronous Qwen image request. Execute 投影并执行一个官方同步 Qwen 图片请求。

func (*ImageActionDriver) ProviderDefinitionID

func (d *ImageActionDriver) ProviderDefinitionID() string

ProviderDefinitionID returns the sole provider definition owned by this driver. ProviderDefinitionID 返回此 Driver 拥有的唯一供应商 Definition。

type MediaAnalyzeActionDriver

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

MediaAnalyzeActionDriver executes one streaming Qwen Omni analysis through the already verified Alibaba Chat transport. MediaAnalyzeActionDriver 通过已验证的 Alibaba Chat 传输执行一条流式 Qwen Omni 分析。

func NewMediaAnalyzeActionDriver

func NewMediaAnalyzeActionDriver(definitionID string, chatDriver *provideropenai.ChatDriver) (*MediaAnalyzeActionDriver, error)

NewMediaAnalyzeActionDriver creates one definition-bound Qwen Omni analysis driver. NewMediaAnalyzeActionDriver 创建一个绑定 Definition 的 Qwen Omni 分析 Driver。

func (*MediaAnalyzeActionDriver) ActionBindingID

func (d *MediaAnalyzeActionDriver) ActionBindingID() string

ActionBindingID returns the exact Alibaba Omni media-analysis action. ActionBindingID 返回精确的 Alibaba Omni 媒体分析动作。

func (*MediaAnalyzeActionDriver) Execute

Execute converts a closed media task into one frozen user instruction plus ordered media blocks and delegates only transport mechanics to Chat. Execute 将封闭媒体任务转换为一条固定用户指令与有序媒体块,并仅把传输机制委托给 Chat。

func (*MediaAnalyzeActionDriver) ProviderDefinitionID

func (d *MediaAnalyzeActionDriver) ProviderDefinitionID() string

ProviderDefinitionID returns the sole provider definition owned by this driver. ProviderDefinitionID 返回此 Driver 唯一拥有的供应商 Definition。

type MessagesDriver

type MessagesDriver struct {
	// Driver owns the shared translated-response execution mechanics.
	// Driver 管理共享的转换响应执行机制。
	*translateddriver.Driver
}

MessagesDriver executes one Alibaba plan definition through its Anthropic-compatible Messages endpoint. MessagesDriver 通过阿里云 Anthropic 兼容 Messages 端点执行一个套餐定义。

func NewMessagesDriver

func NewMessagesDriver(definitionID string, client *transport.Client, capabilities openairesponses.ProfileCapabilities) (*MessagesDriver, error)

NewMessagesDriver constructs an Alibaba Messages driver without Claude-specific headers or endpoint behavior. NewMessagesDriver 构造不携带 Claude 专属 Header 或端点行为的阿里云 Messages 驱动。

type OSSUploader

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

OSSUploader creates temporary Alibaba OSS objects for explicitly verified CN definitions. OSSUploader 为显式验证的 CN 定义创建临时 Alibaba OSS 对象。

func NewOSSUploader

func NewOSSUploader(configurations providerconfig.Store, secrets secret.Store, client *http.Client, definitionIDs []string, options OSSUploaderOptions) (*OSSUploader, error)

NewOSSUploader creates one exact-target temporary OSS uploader from a closed definition set. NewOSSUploader 从封闭定义集合创建一个精确 Target 临时 OSS 上传器。

func (*OSSUploader) Delete

Delete validates a temporary OSS handle; DashScope exposes no delete API and expiry performs cleanup. Delete 校验临时 OSS 句柄;DashScope 未提供删除 API,由到期机制执行清理。

func (*OSSUploader) Upload

Upload copies bailian-cli's getPolicy and multipart OSS flow for one exact Alibaba target. Upload 为一个精确 Alibaba Target 复制 bailian-cli 的 getPolicy 与 Multipart OSS 流程。

type OSSUploaderOptions

type OSSUploaderOptions struct {
	// Now returns current time for the authoritative 48-hour expiry.
	// Now 为权威 48 小时到期时间返回当前时间。
	Now func() time.Time
	// PolicyBaseURL overrides the fixed CN policy origin only for isolated tests.
	// PolicyBaseURL 仅为隔离测试覆盖固定 CN 策略来源。
	PolicyBaseURL string
}

OSSUploaderOptions configures deterministic time and the copied policy origin. OSSUploaderOptions 配置确定性时间与复制的策略来源。

type RerankActionDriver

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

RerankActionDriver executes the text-only qwen3-rerank compatible contract for one immutable provider definition. RerankActionDriver 为一个不可变供应商 Definition 执行纯文本 qwen3-rerank 兼容合同。

func NewRerankActionDriver

func NewRerankActionDriver(definitionID string, client *transport.Client) (*RerankActionDriver, error)

NewRerankActionDriver creates one Alibaba qwen3-rerank driver. NewRerankActionDriver 创建一个 Alibaba qwen3-rerank Driver。

func (*RerankActionDriver) ActionBindingID

func (d *RerankActionDriver) ActionBindingID() string

ActionBindingID returns the exact qwen3-rerank action binding. ActionBindingID 返回精确的 qwen3-rerank 动作绑定。

func (*RerankActionDriver) Execute

Execute projects one text-only VCP rerank operation and preserves provider order and scores. Execute 投影一次纯文本 VCP 重排操作,并保留供应商顺序与分数。

func (*RerankActionDriver) ProviderDefinitionID

func (d *RerankActionDriver) ProviderDefinitionID() string

ProviderDefinitionID returns the sole provider definition owned by this driver. ProviderDefinitionID 返回此 Driver 拥有的唯一供应商 Definition。

type SpeechActionDriver

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

SpeechActionDriver executes one exact synchronous Alibaba speech action for one immutable definition. SpeechActionDriver 为一个不可变 Definition 执行一个精确的同步阿里云语音动作。

func NewSpeechActionDriver

func NewSpeechActionDriver(definitionID string, actionBindingID string, client *transport.Client) (*SpeechActionDriver, error)

NewSpeechActionDriver creates one exact synchronous Alibaba speech driver. NewSpeechActionDriver 创建一个精确的同步阿里云语音 Driver。

func (*SpeechActionDriver) ActionBindingID

func (d *SpeechActionDriver) ActionBindingID() string

ActionBindingID returns the exact speech action owned by this driver. ActionBindingID 返回此 Driver 拥有的精确语音动作。

func (*SpeechActionDriver) Execute

Execute projects and executes one official synchronous Alibaba speech request. Execute 投影并执行一个官方同步阿里云语音请求。

func (*SpeechActionDriver) ProviderDefinitionID

func (d *SpeechActionDriver) ProviderDefinitionID() string

ProviderDefinitionID returns the sole provider definition owned by this driver. ProviderDefinitionID 返回此 Driver 唯一所属的供应商 Definition。

type SpeechTaskDriver

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

SpeechTaskDriver executes one immutable Fun-ASR asynchronous transcription action. SpeechTaskDriver 执行一个不可变的 Fun-ASR 异步转写动作。

func NewSpeechTaskDriver

func NewSpeechTaskDriver(definitionID string, client *transport.Client, resultFetcher resource.PublicDocumentFetcher) (*SpeechTaskDriver, error)

NewSpeechTaskDriver creates one Fun-ASR asynchronous transcription driver. NewSpeechTaskDriver 创建一个 Fun-ASR 异步转写 Driver。

func (*SpeechTaskDriver) ActionBindingID

func (d *SpeechTaskDriver) ActionBindingID() string

ActionBindingID returns the exact Fun-ASR task action. ActionBindingID 返回精确的 Fun-ASR 任务动作。

func (*SpeechTaskDriver) Cancel

Cancel reports the documented lack of a Fun-ASR cancellation endpoint. Cancel 报告 Fun-ASR 缺少文档化取消端点。

func (*SpeechTaskDriver) Poll

func (d *SpeechTaskDriver) Poll(ctx context.Context, execution provider.ExecutionRequest, providerTaskID string) (provider.TaskResult, error)

Poll observes one exact provider task and securely converts its JSON sidecar to VCP Transcript. Poll 观察一个精确供应商任务并安全地将其 JSON Sidecar 转换为 VCP Transcript。

func (*SpeechTaskDriver) ProviderDefinitionID

func (d *SpeechTaskDriver) ProviderDefinitionID() string

ProviderDefinitionID returns the sole provider definition owned by this driver. ProviderDefinitionID 返回此 Driver 唯一所属的供应商 Definition。

func (*SpeechTaskDriver) Start

Start submits one ordered public audio or video batch to Fun-ASR. Start 将一个有序公网音频或视频批次提交给 Fun-ASR。

type TokenPlanHarnessResponsesAdapter

type TokenPlanHarnessResponsesAdapter struct{}

TokenPlanHarnessResponsesAdapter applies the retention and closed-tool contract proven by the official Qwen Code client. TokenPlanHarnessResponsesAdapter 应用官方 Qwen Code 客户端证实的留存与封闭工具合同。

func NewTokenPlanHarnessResponsesAdapter

func NewTokenPlanHarnessResponsesAdapter() *TokenPlanHarnessResponsesAdapter

NewTokenPlanHarnessResponsesAdapter creates one stateless Token Plan Responses adapter. NewTokenPlanHarnessResponsesAdapter 创建一个无状态 Token Plan Responses 适配器。

func (*TokenPlanHarnessResponsesAdapter) Adapt

Adapt disables provider retention and rejects every unverified Responses tool shape. Adapt 禁用供应商留存并拒绝所有未经验证的 Responses 工具形态。

type WanImageActionDriver

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

WanImageActionDriver executes one synchronous Wan 2.7 action for one immutable Alibaba product definition. WanImageActionDriver 为一个不可变 Alibaba 产品 Definition 执行一个同步 Wan 2.7 动作。

func NewWanImageActionDriver

func NewWanImageActionDriver(definitionID string, actionBindingID string, client *transport.Client) (*WanImageActionDriver, error)

NewWanImageActionDriver creates one synchronous Wan 2.7 generation or edit driver. NewWanImageActionDriver 创建一个同步 Wan 2.7 生成或编辑 Driver。

func (*WanImageActionDriver) ActionBindingID

func (d *WanImageActionDriver) ActionBindingID() string

ActionBindingID returns the sole action binding owned by this driver. ActionBindingID 返回此 Driver 拥有的唯一动作绑定。

func (*WanImageActionDriver) Execute

Execute projects and executes one official synchronous Wan 2.7 image request. Execute 投影并执行一个官方同步 Wan 2.7 图片请求。

func (*WanImageActionDriver) ProviderDefinitionID

func (d *WanImageActionDriver) ProviderDefinitionID() string

ProviderDefinitionID returns the sole provider definition owned by this driver. ProviderDefinitionID 返回此 Driver 拥有的唯一供应商 Definition。

type WanVideoTaskDriver

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

WanVideoTaskDriver owns the complete Wan asynchronous lifecycle for one workspace definition. WanVideoTaskDriver 为一个工作空间 Definition 拥有完整的 Wan 异步生命周期。

func NewWanVideoTaskDriver

func NewWanVideoTaskDriver(definitionID string, client *transport.Client) (*WanVideoTaskDriver, error)

NewWanVideoTaskDriver creates a workspace-scoped Wan 2.7 video driver. NewWanVideoTaskDriver 创建工作空间作用域的 Wan 2.7 视频 Driver。

func (*WanVideoTaskDriver) ActionBindingID

func (d *WanVideoTaskDriver) ActionBindingID() string

ActionBindingID returns the sole action binding owned by this driver. ActionBindingID 返回此 Driver 唯一拥有的动作绑定。

func (*WanVideoTaskDriver) Cancel

func (d *WanVideoTaskDriver) Cancel(ctx context.Context, execution provider.ExecutionRequest, providerTaskID string) (provider.TaskResult, error)

Cancel cancels a provider-confirmed queued Wan task. Cancel 取消供应商确认仍在排队的 Wan 任务。

func (*WanVideoTaskDriver) Poll

func (d *WanVideoTaskDriver) Poll(ctx context.Context, execution provider.ExecutionRequest, providerTaskID string) (provider.TaskResult, error)

Poll observes one Wan task through the same immutable target binding. Poll 通过同一不可变 Target Binding 观察一个 Wan 任务。

func (*WanVideoTaskDriver) ProviderDefinitionID

func (d *WanVideoTaskDriver) ProviderDefinitionID() string

ProviderDefinitionID returns the sole provider definition owned by this driver. ProviderDefinitionID 返回此 Driver 唯一拥有的供应商 Definition。

func (*WanVideoTaskDriver) Start

Start submits one Wan task and preserves the private provider task identifier. Start 提交一个 Wan 任务并保留私有供应商任务标识。

type WebSearchActionDriver

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

WebSearchActionDriver executes Alibaba Model Studio's MCP WebSearch service. WebSearchActionDriver 执行 Alibaba Model Studio 的 MCP WebSearch 服务。

func NewWebSearchActionDriver

func NewWebSearchActionDriver(definitionID string, client *transport.Client) (*WebSearchActionDriver, error)

NewWebSearchActionDriver creates one region-fixed Alibaba WebSearch MCP driver. NewWebSearchActionDriver 创建一个区域固定的 Alibaba WebSearch MCP 驱动。

func (*WebSearchActionDriver) ActionBindingID

func (d *WebSearchActionDriver) ActionBindingID() string

ActionBindingID returns the exact WebSearch action. ActionBindingID 返回精确 WebSearch 动作。

func (*WebSearchActionDriver) Execute

Execute maps one filter-free VCP search through Alibaba's copied MCP session flow. Execute 将一次无过滤 VCP 搜索映射到复制的 Alibaba MCP 会话流程。

func (*WebSearchActionDriver) ProviderDefinitionID

func (d *WebSearchActionDriver) ProviderDefinitionID() string

ProviderDefinitionID returns the sole owning definition. ProviderDefinitionID 返回唯一归属定义。

Directories

Path Synopsis
Package catalogdata owns versioned, credential-free Alibaba catalog facts.
Package catalogdata owns versioned, credential-free Alibaba catalog facts.

Jump to

Keyboard shortcuts

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