核心類型
type ChatMode =
| "auto" | "fast" | "think" | "image" | "video"
| "code" | "research" | "roast" | "genui"
| "data_extraction";
type PersonaInput = "theo" | "none" | { system_prompt: string };
type CompletionAttachment =
| { type: "image_url"; url: string }
| { type: "image_base64"; data: string; mime_type: "image/png" | "image/jpeg" | "image/webp" | "image/gif" };
type TheoImageEngine =
| "auto" | "theo-1-create" | "theo-1-photo" | "theo-1-rapid"
| "theo-1-design" | "theo-1-studio" | "theo-1-type";
type TheoImageQuality = "draft" | "standard" | "hd";
type TheoStealthAspect = "square" | "portrait" | "landscape" | "wide";
type TheoStealthDuration = "5s" | "6s" | "10s";
針對特定場景,還提供了更多領域專用模式。請聯繫我們或查閱 API 以獲取完整列表。
補全請求 / 響應類型
| 類型 | 使用方 | 說明 |
|---|---|---|
CompletionRequest | theo.complete()、theo.stream() | 請求體 — 支持 conversation、personality_config、response_style、theo_branding、brand_soul、attachments、隱身固定參數 |
CompletionResponse | theo.complete() | 響應 — 包含 request_id、conversation_id、完整的 usage |
CompletionUsage | CompletionResponse、StreamDoneData | { cost_cents, prompt_tokens, completion_tokens, total_tokens, cached? } |
GenUICompletionResponse | 當 mode === "genui" 時用於 theo.complete() | 新增 genui_code 字段 |
PersonalityConfigInput | CompletionRequest.personality_config | 單次請求級別的特質與無審查模式覆蓋 |
ResponseStyleInput | CompletionRequest.response_style | 單次請求級別的格式/精確度/意圖覆蓋 |
InlineConversation、InlineConversationMessage | CompletionRequest.conversation | 供無狀態調用方使用的內聯歷史信封 |
流式類型
| 類型 | 說明 |
|---|---|
TheoStream | theo.stream() 返回的類 — 可異步迭代,提供 cancel()、conversationId、usage、model、requestId、content、isCancelled |
StreamEvent | 基於 meta | token | tool | artifact | genui_meta | skills | done | error 的可辨識聯合類型 |
StreamMetaData | meta 事件的負載 |
StreamTokenData | { token: string } |
StreamToolData | { name, status, description? } |
StreamSkillsData | { active: [...] } |
StreamDoneData | done 事件的負載(完整內容 + 用量 + 各類 ID) |
StreamErrorData | error 事件的負載 — 與 REST 錯誤信封保持一致 |
GenUIMetaEvent | genui_meta 事件的負載 |
診斷類型
| 類型 | 使用方 | 說明 |
|---|---|---|
VerifyResult | theo.verify() | { healthy, authenticated, baseUrl, latencyMs, modelCount?, version?, error?, hint? } |
媒體與音頻類型
| 類型 | 使用方 | 說明 |
|---|---|---|
ImageRequest、ImageResponse | theo.images() | 圖像請求/響應 |
VideoRequest | theo.video() | 視頻生成請求 |
CodeRequest、CodeResponse | theo.code() | 代碼請求/響應 |
ResearchRequest | theo.research() | 研究請求 |
DocumentRequest、DocumentResponse | theo.documents() | 文檔請求/響應 |
TtsRequest | theo.tts() | TTS(文本轉語音)請求 |
SttResponse | theo.stt() | STT(語音轉文本)響應 |
AsyncJobResponse | theo.video()、theo.research() | 異步任務創建響應 |
JobStatus | theo.job()、theo.waitForJob() | 任務輪詢響應 |
資源記錄類型
| 類型 | 使用方 | 說明 |
|---|---|---|
ConversationSummary | theo.conversations() | 精簡的會話元數據 |
ConversationDetail | theo.conversation(id) | 摘要信息加完整消息歷史 |
ConversationMessage | ConversationDetail.messages[] | 單條消息記錄 |
SkillSummary | theo.skills()、theo.createSkill() | 技能列表條目結構 |
SdkToolDefinition | theo.tools() | 工具定義 — name, description, inputSchema, outputSchema?, permissionLevel, requiresApproval, skillId?, category? |
WorkflowRecord | theo.workflows()、theo.createWorkflow() | 工作流結構 |
WorkflowRunRecord | theo.triggerWorkflow() | 工作流運行記錄結構 |
SubmissionRecord | theo.submitSkill()、theo.submissions() | 技能市場提交記錄 |
SkillVersion | theo.skillVersions() | 版本歷史條目 |
WebhookRecord、WebhookDelivery | Webhook 相關方法 | Webhook 端點 + 投遞嘗試記錄 |
HookRecord、HookExecution | Hook 相關方法 | Hook 及其執行歷史 |
EventAck | theo.publishEvent() | 發佈確認回執 |
UsageReport | theo.usage() | 聚合用量總計,以及按模式/按模型的明細 |
HealthResponse | theo.health() | 系統健康狀態響應 |
ModelInfo | theo.models() | 模型註冊表條目 |
瀏覽器會話類型
| 類型 | 使用方 | 說明 |
|---|---|---|
BrowserRegion | BrowserCreateRequest.region | 數據中心區域 |
BrowserCreateRequest | theo.browser.create() | 會話啓動選項 |
BrowserSessionHandle、BrowserSessionSnapshot | theo.browser.create() / list() / get() | 會話元數據 |
BrowserLiveView | theo.browser.live() | 實時查看 URL + 頁面 + 版本 |
BrowserEndResult | theo.browser.end() | 時長 + 計費字節數 |
技能編寫類型
| 類型 | 說明 |
|---|---|
SkillManifestInput | defineSkill() 的輸入 |
SkillManifest | defineSkill() 校驗後的輸出 |
SkillCategory | "productivity"、"domain"、"integration"、"automation"、"creative" |
SkillPermission | "read:conversations"、"read:artifacts"、"write:artifacts" 等 |
SkillTriggerType | "manual"、"keyword"、"event"、"schedule" |
SkillToolInput | 技能清單中的工具定義 |
SkillTriggerInput | 觸發器配置 |
E.V.I. 類型
| 類型 | 說明 |
|---|---|
EviConfig | theo.evi() 的配置 |
CanvasVisibility、CanvasStatus | 畫布可見性 + 生命週期狀態 |
CanvasRecord | API 返回的畫布記錄行 |
CreateCanvasInput、UpdateCanvasInput、PublishCanvasInput | 畫布變更操作的輸入 |
CanvasCompileResult、CanvasTestResult、CanvasPublishResult | 編譯 / 測試 / 發佈結果 |
TheoProjectConfig | theo.config.ts 的配置 |
TheoConfig | 客戶端構造函數選項 |
