parameters:- name: added_label label: en_US: Added Label zh_Hans: 添加的标签 ja_JP: 追加されたラベル type: string required: false description: en_US: "Only trigger if these specific labels were added (e.g., critical, priority-high, security, comma-separated). Leave empty to trigger for any label addition." zh_Hans: "仅当添加了这些特定标签时触发(例如:critical, priority-high, security,逗号分隔)。留空则对任何标签添加触发。" ja_JP: "これらの特定のラベルが追加された場合のみトリガー(例: critical, priority-high, security,カンマ区切り)。空の場合は任意のラベル追加でトリガー。"
def _check_added_label(self, payload: Mapping[str, Any], added_label_param: str | None) -> None: """Check if the added label matches the allowed labels""" if not added_label_param: return allowed_labels = [label.strip() for label in added_label_param.split(",") if label.strip()] if not allowed_labels: return # The payload contains the label that was added label = payload.get("label", {}) label_name = label.get("name", "") if label_name not in allowed_labels: raise EventIgnoreError()def _on_event(self, request: Request, parameters: Mapping[str, Any], payload: Mapping[str, Any]) -> Variables: # ... # Apply all filters self._check_added_label(payload, parameters.get("added_label")) return Variables(variables={**payload})
class Trigger(ABC): @abstractmethod def _dispatch_event(self, subscription: Subscription, request: Request) -> EventDispatch: """ Internal method to implement event dispatch logic. Subclasses must override this method to handle incoming webhook events. Implementation checklist: 1. Validate the webhook request: - Check the signature/HMAC using the properties stored in subscription.properties when the subscription was created - Verify the request is from the expected source 2. Extract event information: - Parse event type from headers or body - Extract relevant payload data 3. Return EventDispatch with: - events: List of Event names to invoke (can be single or multiple) - response: Appropriate HTTP response for the webhook Args: subscription: The Subscription object with endpoint and properties fields request: Incoming webhook HTTP request Returns: EventDispatch: Event dispatch routing information Raises: TriggerValidationError: For security validation failures TriggerDispatchError: For parsing or routing errors """ raise NotImplementedError("This plugin should implement `_dispatch_event` method to enable event dispatch")
class TriggerSubscriptionConstructor(ABC, OAuthProviderProtocol): # OPTIONAL def _validate_api_key(self, credentials: Mapping[str, Any]) -> None: raise NotImplementedError( "This plugin should implement `_validate_api_key` method to enable credentials validation" ) # OPTIONAL def _oauth_get_authorization_url(self, redirect_uri: str, system_credentials: Mapping[str, Any]) -> str: raise NotImplementedError( "The trigger you are using does not support OAuth, please implement `_oauth_get_authorization_url` method" ) # OPTIONAL def _oauth_get_credentials( self, redirect_uri: str, system_credentials: Mapping[str, Any], request: Request ) -> TriggerOAuthCredentials: raise NotImplementedError( "The trigger you are using does not support OAuth, please implement `_oauth_get_credentials` method" ) # OPTIONAL def _oauth_refresh_credentials( self, redirect_uri: str, system_credentials: Mapping[str, Any], credentials: Mapping[str, Any] ) -> OAuthCredentials: raise NotImplementedError( "The trigger you are using does not support OAuth, please implement `_oauth_refresh_credentials` method" ) @abstractmethod def _create_subscription( self, endpoint: str, parameters: Mapping[str, Any], credentials: Mapping[str, Any], credential_type: CredentialType, ) -> Subscription: """ Internal method to implement subscription logic. Subclasses must override this method to handle subscription creation. Implementation checklist: 1. Use the endpoint parameter provided by Dify 2. Register webhook with external service using their API 3. Store all necessary information in Subscription.properties for future operations (e.g., dispatch_event) 4. Return Subscription with: - expires_at: Set appropriate expiration time - endpoint: The webhook endpoint URL allocated by Dify for receiving events, same as the endpoint parameter - parameters: The parameters of the subscription - properties: All configuration and external IDs Args: endpoint: The webhook endpoint URL allocated by Dify for receiving events parameters: Subscription creation parameters credentials: Authentication credentials credential_type: The type of the credentials, e.g., "api-key", "oauth2", "unauthorized" Returns: Subscription: Subscription details with metadata for future operations Raises: SubscriptionError: For operational failures (API errors, invalid credentials) ValueError: For programming errors (missing required params) """ raise NotImplementedError( "This plugin should implement `_create_subscription` method to enable event subscription" ) @abstractmethod def _delete_subscription( self, subscription: Subscription, credentials: Mapping[str, Any], credential_type: CredentialType ) -> UnsubscribeResult: """ Internal method to implement unsubscription logic. Subclasses must override this method to handle subscription removal. Implementation guidelines: 1. Extract necessary IDs from subscription.properties (e.g., external_id) 2. Use credentials and credential_type to call external service API to delete the webhook 3. Handle common errors (not found, unauthorized, etc.) 4. Always return UnsubscribeResult with detailed status 5. Never raise exceptions for operational failures - use UnsubscribeResult.success=False Args: subscription: The Subscription object with endpoint and properties fields Returns: UnsubscribeResult: Always returns result, never raises for operational failures """ raise NotImplementedError( "This plugin should implement `_delete_subscription` method to enable event unsubscription" ) @abstractmethod def _refresh_subscription( self, subscription: Subscription, credentials: Mapping[str, Any], credential_type: CredentialType ) -> Subscription: """ Internal method to implement subscription refresh logic. Subclasses must override this method to handle simple expiration extension. Implementation patterns: 1. For webhooks without expiration (e.g., GitHub): - Update the Subscription.expires_at=-1 then Dify will never call this method again 2. For lease-based subscriptions (e.g., Microsoft Graph): - Use the information in Subscription.properties to call service's lease renewal API if available - Handle renewal limits (some services limit renewal count) - Update Subscription.properties and Subscription.expires_at for the next renewal if needed Args: subscription: Current subscription with properties credential_type: The type of the credentials, e.g., "api-key", "oauth2", "unauthorized" credentials: Current authentication credentials from credentials_schema. For API key auth, according to `credentials_schema` defined in the YAML. For OAuth auth, according to `oauth_schema.credentials_schema` defined in the YAML. For unauthorized auth, there is no credentials. Returns: Subscription: Same subscription with extended expiration or new properties and expires_at for the next renewal Raises: SubscriptionError: For operational failures (API errors, invalid credentials) """ raise NotImplementedError("This plugin should implement `_refresh` method to enable subscription refresh") # OPTIONAL def _fetch_parameter_options( self, parameter: str, credentials: Mapping[str, Any], credential_type: CredentialType ) -> list[ParameterOption]: """ Fetch the parameter options of the trigger. Implementation guidelines: When you need to fetch parameter options from an external service, use the credentials and credential_type to call the external service API, then return the options to Dify for user selection. Args: parameter: The parameter name for which to fetch options credentials: Authentication credentials for the external service credential_type: The type of credentials (e.g., "api-key", "oauth2", "unauthorized") Returns: list[ParameterOption]: A list of available options for the parameter Examples: GitHub Repositories: >>> result = provider.fetch_parameter_options(parameter="repository") >>> print(result) # [ParameterOption(label="owner/repo", value="owner/repo")] Slack Channels: >>> result = provider.fetch_parameter_options(parameter="channel") >>> print(result)
class Event(ABC): @abstractmethod def _on_event(self, request: Request, parameters: Mapping[str, Any], payload: Mapping[str, Any]) -> Variables: """ Transform the incoming webhook request into structured Variables. This method should: 1. Parse the webhook payload from the request 2. Apply filtering logic based on parameters 3. Extract relevant data matching the output_schema 4. Return a structured Variables object Args: request: The incoming webhook HTTP request containing the raw payload. Use request.get_json() to parse JSON body. parameters: User-configured parameters for filtering and transformation (e.g., label filters, regex patterns, threshold values). These come from the subscription configuration. payload: The decoded payload from previous step `Trigger.dispatch_event`. It will be delivered into `_on_event` method. Returns: Variables: Structured variables matching the output_schema defined in the event's YAML configuration. Raises: EventIgnoreError: When the event should be filtered out based on parameters ValueError: When the payload is invalid or missing required fields Example: >>> def _on_event(self, request, parameters): ... payload = request.get_json() ... ... # Apply filters ... if not self._matches_filters(payload, parameters): ... raise EventIgnoreError() ... ... # Transform data ... return Variables(variables={ ... "title": payload["issue"]["title"], ... "author": payload["issue"]["user"]["login"], ... "url": payload["issue"]["html_url"], ... }) """ def _fetch_parameter_options(self, parameter: str) -> list[ParameterOption]: """ Fetch the parameter options of the trigger. To be implemented by subclasses. Implementing it is optional, which is why it's not an abstract method. """ raise NotImplementedError( "This plugin should implement `_fetch_parameter_options` method to enable dynamic select parameter" )
Last modified on October 9, 2026
Was this page helpful?
⌘I
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Dify Docs","description":"Dify is an open-source platform for building AI applications. It provides a comprehensive set of tools and features to help you build, deploy, and manage your AI applications.","colors":{"primary":"#0060FF","light":"#688FE8","dark":"#0034FF"},"logo":{"light":"https://assets-docs.dify.ai/2025/05/d05cfc6ebe48f725d171dc71c64a5d16.svg","dark":"https://assets-docs.dify.ai/2025/05/c51f1cda47c1d9a4a162d7736f6e4c53.svg","href":"https://docs.dify.ai"},"favicon":"https://mintcdn.com/dify-6c0370d8/7ofzWAXbPyxqXN2g/logo/dify-logo.png?fit=max\u0026auto=format\u0026n=7ofzWAXbPyxqXN2g\u0026q=85\u0026s=1ff6cbe1000cf72c39ff756308a85823","navbar":{"links":[{"href":"https://github.com/langgenius/dify","label":"GitHub"}],"primary":{"type":"button","label":"Try Dify","href":"https://cloud.dify.ai"}},"footer":{"socials":{"x":"https://x.com/dify_ai","github":"https://github.com/langgenius/dify-docs","linkedin":"https://www.linkedin.com/company/langgenius"}},"integrations":{"ga4":{"measurementId":"G-HHGQ6GKNCE"}},"contextual":{"options":["copy","view","download-spec","claude","chatgpt","perplexity","mcp","add-mcp","cursor","vscode","devin-mcp"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"en/cloud/use-dify/getting-started/introduction"},{"language":"zh","href":"zh/cloud/use-dify/getting-started/introduction"},{"language":"ja","href":"ja/cloud/use-dify/getting-started/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dify-6c0370d8","hasAudioNarration":false,"actualSubdomain":"dify-6c0370d8","customDomains":["docs.dify.ai"],"gitSource":{"type":"github","owner":"langgenius","repo":"dify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adecd5412d8b1b7b9f21af4","collectionId":"cf836dea-4deb-4e31-9b1a-af0d8253a989","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adecd5412d8b1b7b9f21af4"},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6adecd5412d8b1b7b9f21af4","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"en","tag":"Self-Host","count":267},{"language":"ja","tag":"セルフホスト","count":267},{"language":"zh","tag":"自部署","count":267},{"language":"en","tag":"Use","count":183},{"language":"ja","tag":"使い方","count":183},{"language":"zh","tag":"使用","count":183},{"language":"en","tag":"Developer Resources","count":165},{"language":"ja","tag":"開発者リソース","count":165},{"language":"zh","tag":"开发者资源","count":165},{"language":"en","tag":"Cloud","count":112},{"language":"ja","tag":"Cloud","count":112},{"language":"zh","tag":"Cloud","count":112},{"language":"en","tag":"API","count":93},{"language":"ja","tag":"API","count":93},{"language":"zh","tag":"API","count":93},{"language":"en","tag":"Orchestrate","count":80},{"language":"ja","tag":"オーケストレーション","count":80},{"language":"zh","tag":"编排","count":80},{"language":"en","tag":"Workflow \u0026 Chatflow","count":65},{"language":"ja","tag":"Workflow と Chatflow","count":65},{"language":"zh","tag":"Workflow 与 Chatflow","count":65},{"language":"zh","tag":"知识库","count":50},{"language":"en","tag":"Knowledge APIs","count":46},{"language":"ja","tag":"ナレッジ API","count":46},{"language":"zh","tag":"知识库 API","count":46},{"language":"en","tag":"Knowledge","count":44},{"language":"en","tag":"Nodes","count":44},{"language":"ja","tag":"ナレッジ","count":44},{"language":"ja","tag":"ノード","count":44},{"language":"zh","tag":"节点","count":44}],"searchSettings":{"maxResults":12}},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"body{text-autospace:normal}html[data-current-path=\"/\"] .nav-tabs,html[data-current-path=\"/en/home\"] .nav-tabs,html[data-current-path=\"/ja/home\"] .nav-tabs,html[data-current-path=\"/zh/home\"] .nav-tabs{display:none}#sidebar-content :has(>a[href=\"/en/home\"]),#sidebar-content :has(>a[href=\"/ja/home\"]),#sidebar-content :has(>a[href=\"/zh/home\"]),#sidebar-content a[href=\"/en/home\"],#sidebar-content a[href=\"/ja/home\"],#sidebar-content a[href=\"/zh/home\"]{display:none}.uo-wrap{max-width:64rem;margin:0 auto;padding:2.5rem 2rem 4rem}.uo-hero{display:flex;gap:40px;align-items:center;margin:0 0 48px}.uo-hero-text{flex:1 1 100%}.uo-actions{display:flex;flex-wrap:wrap;align-items:center;gap:20px;margin-top:24px}.uo-cta{display:inline-flex;align-items:center;gap:6px;background:#0060ff;color:#fff!important;padding:8px 18px;border-radius:8px;font-weight:600;text-decoration:none!important;border:0!important}.uo-cta:hover{background:#0034ff}.uo-secondary{font-weight:500}.uo-secondary a{text-decoration:none!important}.uo-secondary a:hover{color:#0060ff}.uo-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}.uo-grid>*{grid-column:span 2;margin:0}.uo-grid>:nth-child(4):nth-last-child(2){grid-column:2/span 2}.uo-help-links{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin-top:10px;font-weight:500}@media (max-width:900px){.uo-grid{grid-template-columns:1fr}.uo-grid>*,.uo-grid>:nth-child(4):nth-last-child(2){grid-column:auto}}"}],"page":{"pagePath":"zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin","slug":"/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin","pageMetadata":{"title":"触发器插件","description":"构建 Dify 1.10.0+ 触发器插件,将第三方 webhook 事件转换为工作流启动信号","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"构建 Dify 1.10.0+ 触发器插件,将第三方 webhook 事件转换为工作流启动信号\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,blockquote:`blockquote`,code:`code`,em:`em`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,Note,OptimizedImage,Tab,Tabs,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[`本文档由 AI 自动翻译。如有任何不准确之处,请参考 `,_jsx(_components.a,{href:`/en/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin`,children:`英文原版`}),`。`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`什么是触发器插件?`,children:`什么是触发器插件?`}),`\n`,_jsxs(_components.p,{children:[`触发器是 Dify v1.10.0 版本中引入的一种新型起始节点。与代码、工具或知识库检索等功能节点不同,触发器 `,_jsx(_components.strong,{children:`将第三方事件转换为 Dify 可以识别和处理的输入格式`}),`。`]}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-intro.png?fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=09e7b4e548c510c1a3889ec64d7569b8`,alt:`触发器插件介绍`,\"data-og-width\":`1280`,width:`1280`,\"data-og-height\":`742`,height:`742`,\"data-path\":`images/develop-plugin/dev-guide/trigger-plugin-intro.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-intro.png?w=280\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=4981b35701ff00fba38082c16a445dcb 280w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-intro.png?w=560\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=8aed677d92dead7422e0b4ecd3faed58 560w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-intro.png?w=840\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=157ee85b95c49f46b8635c2357107bb0 840w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-intro.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=c0f017982bbeb4b702633d844ebd59bc 1100w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-intro.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=afb83896c0b76611b61ab5a1cc2073b4 1650w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-intro.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=7458d859b1921cc6487abd9d8e1912d7 2500w`})}),`\n`,_jsxs(_components.p,{children:[`例如,如果你在 Gmail 中将 Dify 配置为 `,_jsx(_components.code,{children:`new email`}),` 事件接收器,每当收到新邮件时,Gmail 会自动向 Dify 发送一个事件,该事件可用于触发工作流。然而:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Gmail 的原始事件格式与 Dify 的输入格式不兼容。`}),`\n`,_jsx(_components.li,{children:`全球有数千个平台,每个平台都有其独特的事件格式。`}),`\n`]}),`\n`,_jsx(_components.p,{children:`触发器插件填补了这一空缺:它们定义和解析来自不同平台的事件,并将其统一为 Dify 可以接受的输入格式。`}),`\n`,_jsx(Heading,{level:`2`,id:`技术概述`,children:`技术概述`}),`\n`,_jsx(_components.p,{children:`Dify 触发器基于 webhook 构建,这是一种在网络上被广泛采用的机制。GitHub、Slack、Linear 等主流 SaaS 平台都支持 webhook,并提供完善的文档。`}),`\n`,_jsx(_components.p,{children:`Webhook 是一种基于 HTTP 的事件分发器:一旦配置了事件接收地址,平台会在订阅的事件发生时自动将事件数据推送到该地址。`}),`\n`,_jsxs(_components.p,{children:[`为了以统一的方式处理来自不同平台的 webhook 事件,Dify 定义了两个核心概念:`,_jsx(_components.strong,{children:`订阅(Subscription)`}),` 和 `,_jsx(_components.strong,{children:`事件(Event)`}),`。`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`订阅(Subscription)`}),`:在第三方平台的开发者控制台中将 Dify 的网络地址注册为目标服务器的配置。`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`事件(Event)`}),`:一个平台可能发送多种类型的事件(例如`,_jsx(_components.em,{children:`收到邮件`}),`、`,_jsx(_components.em,{children:`删除邮件`}),`或`,_jsx(_components.em,{children:`标记邮件为已读`}),`),所有这些都会推送到注册的地址。触发器插件可以处理多种事件类型,每个事件对应 Dify 工作流中的一个集成触发器节点。`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`插件开发`,children:`插件开发`}),`\n`,_jsx(_components.p,{children:`触发器插件的开发流程与其他插件类型(工具、数据源、模型等)相同。`}),`\n`,_jsxs(_components.p,{children:[`使用 `,_jsx(_components.code,{children:`dify plugin init`}),` 命令创建开发模板。生成的文件结构遵循标准的插件格式规范。`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── _assets`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ └── icon.svg`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── events`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ └── star`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ ├── star_created.py`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ └── star_created.yaml`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── main.py`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── manifest.yaml`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── provider`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ ├── github.py`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ └── github.yaml`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── README.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── PRIVACY.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`└── requirements.txt`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`manifest.yaml`}),`:描述插件的基本元数据。`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`provider`}),` 目录:包含提供者的元数据、创建订阅的代码,以及接收 webhook 请求后对事件进行分类的代码。`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`events`}),` 目录:包含事件处理和过滤的代码,支持在节点级别进行本地事件过滤。你可以创建子目录来分组相关事件。`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`对于触发器插件,将 Dify 最低版本设置为 `,_jsx(_components.code,{children:`1.10.0`}),`,SDK 版本设置为 `,_jsx(_components.code,{children:`>= 0.6.0`}),`。`]})}),`\n`,_jsx(_components.p,{children:`以下各节以 GitHub 为例,逐步介绍开发流程。`}),`\n`,_jsx(Heading,{level:`3`,id:`创建订阅`,children:`创建订阅`}),`\n`,_jsx(_components.p,{children:`主流 SaaS 平台的 Webhook 配置方式差异很大:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`一些平台(如 GitHub)支持基于 API 的 webhook 配置。对于这些平台,一旦完成 OAuth 认证,Dify 可以自动设置 webhook。`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`其他平台(如 Notion)不提供 webhook 配置 API,可能需要用户手动进行认证。`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`为了适应这些差异,我们将订阅过程分为两部分:**订阅构造器(Subscription Constructor)`,_jsx(_components.strong,{children:`和`}),`订阅(Subscription)**本身。`]}),`\n`,_jsxs(_components.p,{children:[`对于像 Notion 这样的平台,创建订阅需要用户手动复制 Dify 提供的回调 URL,并将其粘贴到他们的 Notion 工作区以完成 webhook 设置。这个过程对应 Dify 界面中的`,_jsx(_components.strong,{children:`粘贴 URL 创建新订阅`}),`选项。`]}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup.png?fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=243211fd8729b1e26fdf989d38b2193e`,alt:`粘贴 URL 创建新订阅`,\"data-og-width\":`834`,width:`834`,\"data-og-height\":`566`,height:`566`,\"data-path\":`images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup.png?w=280\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=68fe8d0c9849ef92f1b389bcc3242bf4 280w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup.png?w=560\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=2a57fa9a538d7f0a721be8bfa3520e24 560w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup.png?w=840\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=c19ec0ca04f5d364c7a3f619040a669d 840w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=d79283389b898f76d757c035965ddfd7 1100w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=1fd469d26651711cfbdb78725719db33 1650w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=37eae4c207fbd90e4edb3500cdce5ec4 2500w`})}),`\n`,_jsxs(_components.p,{children:[`要支持通过手动粘贴 URL 创建订阅,需修改两个文件:`,_jsx(_components.code,{children:`github.yaml`}),` 和 `,_jsx(_components.code,{children:`github.py`}),`。`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`github.yaml`,id:`github-yaml`,children:[_jsxs(_components.p,{children:[`GitHub webhook 使用加密机制,因此需要一个密钥来解密和验证传入的请求。在 `,_jsx(_components.code,{children:`github.yaml`}),` 中声明 `,_jsx(_components.code,{children:`webhook_secret`}),`。`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`subscription_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"webhook_secret\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"secret-input\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` required`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Webhook Secret\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Webhook Secret\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Webhookシークレット\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` help`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Optional webhook secret for validating GitHub webhook requests\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GitHub Webhookリクエストの検証用のオプションのWebhookシークレット\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"可选的用于验证 GitHub webhook 请求的 webhook 密钥\"`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`github.py`,id:`github-py`,children:[_jsxs(_components.p,{children:[`首先,实现 `,_jsx(_components.code,{children:`dispatch_event`}),` 接口。所有发送到回调 URL 的请求都由这个接口处理,处理后的事件会显示在 `,_jsx(_components.strong,{children:`请求日志`}),` 部分,用于调试和验证。`]}),_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup-config.png?fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=ae6fbf487ed8340c0226c340f2178475`,alt:`手动设置`,\"data-og-width\":`1254`,width:`1254`,\"data-og-height\":`1084`,height:`1084`,\"data-path\":`images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup-config.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup-config.png?w=280\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=5532ea78412303820625fcf1364dd75f 280w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup-config.png?w=560\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=2384c8ccc304960baad9635c4146d13a 560w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup-config.png?w=840\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=c1f2f612a40c9b4546075d62a331955f 840w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup-config.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=ae4e25c5acf10dd5a8366eec44f4f23c 1100w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup-config.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=44eb0acfa49085b26675efe4f6653a9c 1650w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-manual-webhook-setup-config.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=7d12bc97db64abecb14f7e49c51d5b16 2500w`})}),_jsxs(_components.p,{children:[`在代码中,你可以通过 `,_jsx(_components.code,{children:`subscription.properties`}),` 获取在 `,_jsx(_components.code,{children:`github.yaml`}),` 中声明的 `,_jsx(_components.code,{children:`webhook_secret`}),`。`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`dispatch_event`}),` 方法根据请求内容确定事件类型。在下面的示例中,事件提取由 `,_jsx(_components.code,{children:`_dispatch_trigger_event`}),` 方法处理。`]}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`完整代码示例,请参阅 `,_jsx(_components.a,{href:`https://github.com/langgenius/dify-official-plugins/tree/main/triggers/github_trigger`,children:`Dify 的 GitHub 触发器插件`}),`。`]})}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GithubTrigger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Trigger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Handle GitHub webhook event dispatch.\"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _dispatch_event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subscription`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Subscription, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Request) -> EventDispatch:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` webhook_secret `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` subscription.properties.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"webhook_secret\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` webhook_secret:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`._validate_signature(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`request, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`webhook_secret`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`webhook_secret)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event_type: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` request.headers.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-GitHub-Event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event_type:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TriggerDispatchError(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Missing GitHub event type header\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`._validate_payload(request)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Response(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{\"status\": \"ok\"}'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`mimetype`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`._dispatch_trigger_event(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event_type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`event_type, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`payload)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` EventDispatch(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`events`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[event] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [], `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response)`})]}),`\n`]})})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`事件处理`,children:`事件处理`}),`\n`,_jsx(_components.p,{children:`一旦提取了事件,相应的实现必须过滤原始 HTTP 请求并将其转换为 Dify 工作流可以接受的输入格式。`}),`\n`,_jsxs(_components.p,{children:[`以 Issue 事件为例,在 `,_jsx(_components.code,{children:`events/issues/issues.yaml`}),` 中定义事件,在 `,_jsx(_components.code,{children:`events/issues/issues.py`}),` 中定义其实现。在 `,_jsx(_components.code,{children:`issues.yaml`}),` 的 `,_jsx(_components.code,{children:`output_schema`}),` 部分定义事件的输出,它遵循与工具插件相同的 JSON Schema 规范。`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`issues.yaml`,id:`issues-yaml`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`identity`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`issues`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` author`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`langgenius`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Issues`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`议题`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`イシュー`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`description`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Unified issues event with actions filter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`带 actions 过滤的统一 issues 事件`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`アクションフィルタ付きの統合イシューイベント`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`output_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`object`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` properties`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` action`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` issue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`object`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` description`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`The issue itself`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`extra`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` python`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`events/issues/issues.py`})]}),`\n`]})})})}),_jsx(Tab,{title:`issues.py`,id:`issues-py`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`27`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`27`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` collections.abc `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Mapping`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` typing `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Any`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` werkzeug `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Request`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dify_plugin.entities.trigger `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Variables`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dify_plugin.errors.trigger `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` EventIgnoreError`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dify_plugin.interfaces.trigger `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Event`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` IssuesUnifiedEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Unified Issues event. Filters by actions and common issue attributes.\"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _on_event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Request, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parameters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any]) -> Variables:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` request.get_json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"No payload received\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` allowed_actions `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` parameters.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"actions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`or`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` []`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` action `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"action\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` allowed_actions `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`and`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` action `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`not`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` allowed_actions:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` EventIgnoreError()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` issue `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"issue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` isinstance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(issue, Mapping):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"No issue in payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Variables(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`variables`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`**`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`payload})`})]}),`\n`]})})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`事件过滤`,children:`事件过滤`}),`\n`,_jsxs(_components.p,{children:[`要过滤掉某些事件(例如,只关注具有特定标签的 Issue 事件),在 `,_jsx(_components.code,{children:`issues.yaml`}),` 的事件定义中添加 `,_jsx(_components.code,{children:`parameters`}),`。然后,在 `,_jsx(_components.code,{children:`_on_event`}),` 方法中,对不符合配置条件的事件抛出 `,_jsx(_components.code,{children:`EventIgnoreError`}),` 异常。`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`issues.yaml`,id:`issues-yaml-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`parameters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`added_label`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Added Label`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`添加的标签`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`追加されたラベル`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` required`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` description`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Only trigger if these specific labels were added (e.g., critical, priority-high, security, comma-separated). Leave empty to trigger for any label addition.\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"仅当添加了这些特定标签时触发(例如:critical, priority-high, security,逗号分隔)。留空则对任何标签添加触发。\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"これらの特定のラベルが追加された場合のみトリガー(例: critical, priority-high, security,カンマ区切り)。空の場合は任意のラベル追加でトリガー。\"`})]}),`\n`]})})})}),_jsx(Tab,{title:`issues.py`,id:`issues-py-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _check_added_label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`added_label_param`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Check if the added label matches the allowed labels\"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` added_label_param:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` allowed_labels `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [label.strip() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` label `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` added_label_param.split(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\",\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` label.strip()]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` allowed_labels:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # The payload contains the label that was added`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` label `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {})`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` label_name `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` label.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` label_name `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`not`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` allowed_labels:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` EventIgnoreError()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _on_event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Request, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parameters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any]) -> Variables:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Apply all filters`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`._check_added_label(payload, parameters.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"added_label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Variables(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`variables`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`**`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`payload})`})]}),`\n`]})})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`通过-oauth-或-api-密钥创建订阅`,children:`通过 OAuth 或 API 密钥创建订阅`}),`\n`,_jsxs(_components.p,{children:[`要启用通过 OAuth 或 API 密钥自动创建订阅,需修改 `,_jsx(_components.code,{children:`github.yaml`}),` 和 `,_jsx(_components.code,{children:`github.py`}),` 文件。`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`github.yaml`,id:`github-yaml-2`,children:[_jsxs(_components.p,{children:[`在 `,_jsx(_components.code,{children:`github.yaml`}),` 中,添加以下字段。`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`37`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`37`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`subscription_constructor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` parameters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"repository\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Repository\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"仓库\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"リポジトリ\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dynamic-select\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` required`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` placeholder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"owner/repo\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"owner/repo\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"owner/repo\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` help`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GitHub repository in format owner/repo (e.g., microsoft/vscode)\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GitHub 仓库,格式为 owner/repo(例如:microsoft/vscode)\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GitHubリポジトリは owner/repo 形式で入力してください(例: microsoft/vscode)\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` credentials_schema`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` access_tokens`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` help`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Get your Access Tokens from GitHub`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`GitHub からアクセストークンを取得してください`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`从 GitHub 获取您的 Access Tokens`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Access Tokens`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`アクセストークン`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Access Tokens`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` placeholder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` en_US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Please input your GitHub Access Tokens`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` ja_JP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`GitHub のアクセストークンを入力してください`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` zh_Hans`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`请输入你的 GitHub Access Tokens`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` required`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`secret-input`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`https://github.com/settings/tokens?type=beta`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` extra`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` python`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`provider/github.py`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`subscription_constructor`}),` 是 Dify 抽象出来的一个概念,用于定义如何构造订阅。它包含以下字段:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`parameters`}),`(可选):定义创建订阅所需的参数,例如要订阅的事件类型或目标 GitHub 仓库。`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`credentials_schema`}),`(可选):声明使用 API 密钥或访问令牌创建订阅所需的凭据,例如 GitHub 的 `,_jsx(_components.code,{children:`access_tokens`}),`。`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`oauth_schema`}),`(可选):通过 OAuth 创建订阅时需要。有关定义方法的详细信息,参见 `,_jsx(_components.a,{href:`/zh/develop-plugin/dev-guides-and-walkthroughs/tool-oauth`,children:`为你的工具插件添加 OAuth 支持`}),`。`]}),`\n`]})]}),_jsxs(Tab,{title:`github.py`,id:`github-py-2`,children:[_jsxs(_components.p,{children:[`在 `,_jsx(_components.code,{children:`github.py`}),` 中,创建一个 `,_jsx(_components.code,{children:`Constructor`}),` 类来实现自动订阅逻辑。`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`68`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`68`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GithubSubscriptionConstructor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`TriggerSubscriptionConstructor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Manage GitHub trigger subscriptions.\"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _validate_api_key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any]) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # ...`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _create_subscription`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` endpoint`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parameters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` credential_type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: CredentialType,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) -> Subscription:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` repository `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` parameters.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"repository\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` repository:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"repository is required (format: owner/repo)\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` owner, repo `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` repository.split(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"repository must be in format 'owner/repo'\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` events: list[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` parameters.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"events\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` webhook_secret `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` uuid.uuid4().hex`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` url `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.github.com/repos/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`owner`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`repo`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/hooks\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`credentials.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'access_tokens'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/vnd.github+json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` webhook_data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"web\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"events\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: events,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"config\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: endpoint, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"insecure_ssl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"secret\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: webhook_secret},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(url, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`webhook_data, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.RequestException `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` exc:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SubscriptionError(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Network error while creating webhook: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`exc`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`error_code`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NETWORK_ERROR\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` exc`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.status_code `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 201`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` webhook `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Subscription(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` expires_at`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(time.time()) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`_WEBHOOK_TTL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` endpoint`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`endpoint,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` parameters`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`parameters,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` properties`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"external_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(webhook[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"repository\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: repository,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"events\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: events,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"webhook_secret\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: webhook_secret,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: webhook.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response_data: dict[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.content `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error_msg `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response_data.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Unknown error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error_details `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response_data.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"errors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` detailed_error `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Failed to create GitHub webhook: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`error_msg`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error_details:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` detailed_error `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" Details: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`error_details`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SubscriptionError(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` detailed_error,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` error_code`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"WEBHOOK_CREATION_FAILED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` external_response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response_data,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`]})})})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(_components.p,{children:[`修改完这两个文件后,你将在 Dify 界面中看到`,_jsx(_components.strong,{children:`使用 API 密钥创建`}),`选项。`]}),`\n`,_jsxs(_components.p,{children:[`同一个 `,_jsx(_components.code,{children:`Constructor`}),` 类也支持通过 OAuth 自动创建订阅:在 `,_jsx(_components.code,{children:`subscription_constructor`}),` 下添加 `,_jsx(_components.code,{children:`oauth_schema`}),` 字段即可启用 OAuth 认证。`]}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-oauth-apikey.png?fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=208cfd860cceeb8c6579bd23897fbdbc`,alt:`OAuth 和 API 密钥选项`,\"data-og-width\":`880`,width:`880`,\"data-og-height\":`558`,height:`558`,\"data-path\":`images/develop-plugin/dev-guide/trigger-plugin-oauth-apikey.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-oauth-apikey.png?w=280\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=689623b64c0334139d52790c2657981d 280w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-oauth-apikey.png?w=560\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=389cf8b2d47babd029bb41e577cc5306 560w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-oauth-apikey.png?w=840\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=bea82963b1899e2ca7fd26f918f27272 840w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-oauth-apikey.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=20deb51bcc2f4323fc619d7cca236939 1100w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-oauth-apikey.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=ede4cce8bb44e3b3499132f2704ec521 1650w, https://mintcdn.com/dify-6c0370d8/Z6MqdkI3dck9_1H6/images/develop-plugin/dev-guide/trigger-plugin-oauth-apikey.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Z6MqdkI3dck9_1H6\u0026q=85\u0026s=7ed6f994dca19b8222555dea28962a84 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`深入探索`,children:`深入探索`}),`\n`,_jsx(_components.p,{children:`触发器插件开发中核心类的接口定义如下。`}),`\n`,_jsx(Heading,{level:`3`,id:`trigger`,children:`Trigger`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`32`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`32`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Trigger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ABC`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` @abstractmethod`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _dispatch_event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subscription`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Subscription, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Request) -> EventDispatch:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Internal method to implement event dispatch logic.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Subclasses must override this method to handle incoming webhook events.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Implementation checklist:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 1. Validate the webhook request:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Check the signature/HMAC using the properties stored in subscription.properties when the subscription was created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Verify the request is from the expected source`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2. Extract event information:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Parse event type from headers or body`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Extract relevant payload data`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 3. Return EventDispatch with:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - events: List of Event names to invoke (can be single or multiple)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - response: Appropriate HTTP response for the webhook`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Args:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` subscription: The Subscription object with endpoint and properties fields`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` request: Incoming webhook HTTP request`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Returns:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` EventDispatch: Event dispatch routing information`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Raises:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` TriggerValidationError: For security validation failures`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` TriggerDispatchError: For parsing or routing errors`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` NotImplementedError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:'\"This plugin should implement `_dispatch_event` method to enable event dispatch\"'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`triggersubscriptionconstructor`,children:`TriggerSubscriptionConstructor`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`158`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`158`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TriggerSubscriptionConstructor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ABC`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`OAuthProviderProtocol`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # OPTIONAL`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _validate_api_key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any]) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` NotImplementedError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"This plugin should implement `_validate_api_key` method to enable credentials validation\"'})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # OPTIONAL`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _oauth_get_authorization_url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`redirect_uri`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`system_credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any]) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` NotImplementedError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"The trigger you are using does not support OAuth, please implement `_oauth_get_authorization_url` method\"'})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # OPTIONAL`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _oauth_get_credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`redirect_uri`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`system_credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Request`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) -> TriggerOAuthCredentials:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` NotImplementedError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"The trigger you are using does not support OAuth, please implement `_oauth_get_credentials` method\"'})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # OPTIONAL`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _oauth_refresh_credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`redirect_uri`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`system_credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) -> OAuthCredentials:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` NotImplementedError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"The trigger you are using does not support OAuth, please implement `_oauth_refresh_credentials` method\"'})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` @abstractmethod`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _create_subscription`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` endpoint`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parameters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` credential_type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: CredentialType,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) -> Subscription:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Internal method to implement subscription logic.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Subclasses must override this method to handle subscription creation.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Implementation checklist:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 1. Use the endpoint parameter provided by Dify`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2. Register webhook with external service using their API`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 3. Store all necessary information in Subscription.properties for future operations (e.g., dispatch_event)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 4. Return Subscription with:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - expires_at: Set appropriate expiration time`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - endpoint: The webhook endpoint URL allocated by Dify for receiving events, same as the endpoint parameter`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - parameters: The parameters of the subscription`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - properties: All configuration and external IDs`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Args:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` endpoint: The webhook endpoint URL allocated by Dify for receiving events`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` parameters: Subscription creation parameters`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` credentials: Authentication credentials`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` credential_type: The type of the credentials, e.g., \"api-key\", \"oauth2\", \"unauthorized\"`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Returns:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Subscription: Subscription details with metadata for future operations`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Raises:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` SubscriptionError: For operational failures (API errors, invalid credentials)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ValueError: For programming errors (missing required params)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` NotImplementedError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"This plugin should implement `_create_subscription` method to enable event subscription\"'})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` @abstractmethod`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _delete_subscription`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subscription`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Subscription, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`credential_type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: CredentialType`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) -> UnsubscribeResult:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Internal method to implement unsubscription logic.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Subclasses must override this method to handle subscription removal.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Implementation guidelines:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 1. Extract necessary IDs from subscription.properties (e.g., external_id)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2. Use credentials and credential_type to call external service API to delete the webhook`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 3. Handle common errors (not found, unauthorized, etc.)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 4. Always return UnsubscribeResult with detailed status`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 5. Never raise exceptions for operational failures - use UnsubscribeResult.success=False`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Args:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` subscription: The Subscription object with endpoint and properties fields`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Returns:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` UnsubscribeResult: Always returns result, never raises for operational failures`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` NotImplementedError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"This plugin should implement `_delete_subscription` method to enable event unsubscription\"'})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` @abstractmethod`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _refresh_subscription`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subscription`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Subscription, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`credential_type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: CredentialType`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) -> Subscription:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Internal method to implement subscription refresh logic.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Subclasses must override this method to handle simple expiration extension.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Implementation patterns:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 1. For webhooks without expiration (e.g., GitHub):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Update the Subscription.expires_at=-1 then Dify will never call this method again`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2. For lease-based subscriptions (e.g., Microsoft Graph):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Use the information in Subscription.properties to call service's lease renewal API if available`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Handle renewal limits (some services limit renewal count)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` - Update Subscription.properties and Subscription.expires_at for the next renewal if needed`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Args:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` subscription: Current subscription with properties`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` credential_type: The type of the credentials, e.g., \"api-key\", \"oauth2\", \"unauthorized\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` credentials: Current authentication credentials from credentials_schema.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" For API key auth, according to `credentials_schema` defined in the YAML.\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" For OAuth auth, according to `oauth_schema.credentials_schema` defined in the YAML.\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` For unauthorized auth, there is no credentials.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Returns:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Subscription: Same subscription with extended expiration`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` or new properties and expires_at for the next renewal`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Raises:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` SubscriptionError: For operational failures (API errors, invalid credentials)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` NotImplementedError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:'\"This plugin should implement `_refresh` method to enable subscription refresh\"'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # OPTIONAL`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _fetch_parameter_options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`credential_type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: CredentialType`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) -> list[ParameterOption]:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Fetch the parameter options of the trigger.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Implementation guidelines:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` When you need to fetch parameter options from an external service, use the credentials`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` and credential_type to call the external service API, then return the options to Dify`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` for user selection.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Args:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` parameter: The parameter name for which to fetch options`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` credentials: Authentication credentials for the external service`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` credential_type: The type of credentials (e.g., \"api-key\", \"oauth2\", \"unauthorized\")`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Returns:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list[ParameterOption]: A list of available options for the parameter`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Examples:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GitHub Repositories:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` >>> `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`result = provider.fetch_parameter_options(parameter=\"repository\")`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` >>> `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`print(result) # [ParameterOption(label=\"owner/repo\", value=\"owner/repo\")]`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Slack Channels:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` >>> `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`result = provider.fetch_parameter_options(parameter=\"channel\")`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` >>> `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`print(result)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`event`,children:`Event`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`55`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`55`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ABC`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` @abstractmethod`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _on_event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Request, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parameters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Mapping[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any]) -> Variables:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Transform the incoming webhook request into structured Variables.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` This method should:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 1. Parse the webhook payload from the request`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2. Apply filtering logic based on parameters`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 3. Extract relevant data matching the output_schema`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 4. Return a structured Variables object`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Args:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` request: The incoming webhook HTTP request containing the raw payload.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Use request.get_json() to parse JSON body.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` parameters: User-configured parameters for filtering and transformation`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` (e.g., label filters, regex patterns, threshold values).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` These come from the subscription configuration.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" payload: The decoded payload from previous step `Trigger.dispatch_event`.\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" It will be delivered into `_on_event` method.\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Returns:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Variables: Structured variables matching the output_schema`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` defined in the event's YAML configuration.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Raises:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` EventIgnoreError: When the event should be filtered out based on parameters`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ValueError: When the payload is invalid or missing required fields`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Example:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` >>> `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`def _on_event(self, request, parameters):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` ... `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` payload = request.get_json()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` ... `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` # Apply filters`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` ... `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` if not self._matches_filters(payload, parameters):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` ... `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` raise EventIgnoreError()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` ... `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` # Transform data`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` ... `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` return Variables(variables={`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` ... `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"title\": payload[\"issue\"][\"title\"],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` ... `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"author\": payload[\"issue\"][\"user\"][\"login\"],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` ... `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\": payload[\"issue\"][\"html_url\"],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` ... `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` })`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _fetch_parameter_options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> list[ParameterOption]:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Fetch the parameter options of the trigger.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` To be implemented by subclasses.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Implementing it is optional, which is why it's not an abstract method.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` NotImplementedError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"This plugin should implement `_fetch_parameter_options` method to enable dynamic select parameter\"'})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"触发器插件","description":"构建 Dify 1.10.0+ 触发器插件,将第三方 webhook 事件转换为工作流启动信号","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"什么是触发器插件?","slug":"什么是触发器插件?","depth":2,"children":[]},{"title":"技术概述","slug":"技术概述","depth":2,"children":[]},{"title":"插件开发","slug":"插件开发","depth":2,"children":[{"title":"创建订阅","slug":"创建订阅","depth":3,"children":[]},{"title":"事件处理","slug":"事件处理","depth":3,"children":[]},{"title":"事件过滤","slug":"事件过滤","depth":3,"children":[]},{"title":"通过 OAuth 或 API 密钥创建订阅","slug":"通过-oauth-或-api-密钥创建订阅","depth":3,"children":[]}]},{"title":"深入探索","slug":"深入探索","depth":2,"children":[{"title":"Trigger","slug":"trigger","depth":3,"children":[]},{"title":"TriggerSubscriptionConstructor","slug":"triggersubscriptionconstructor","depth":3,"children":[]},{"title":"Event","slug":"event","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/dify-6c0370d8/90066d529e522771/contributing-footer.js"],"subdomain":"dify-6c0370d8","siteName":"Dify Docs","title":"触发器插件 - Dify Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-09T02:21:32.228Z","gitLastModified":"2026-10-09T02:21:15.000Z","originalFileLocation":"zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"构建 Dify 1.10.0+ 触发器插件,将第三方 webhook 事件转换为工作流启动信号\">\u003cmeta data-mint-head name=\"application-name\" content=\"Dify Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dify-6c0370d8/tWYYD8GkT0MUJV0z/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/dify-6c0370d8/tWYYD8GkT0MUJV0z/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dify-6c0370d8/tWYYD8GkT0MUJV0z/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dify-6c0370d8/tWYYD8GkT0MUJV0z/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dify-6c0370d8/tWYYD8GkT0MUJV0z/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dify-6c0370d8/tWYYD8GkT0MUJV0z/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dify-6c0370d8/tWYYD8GkT0MUJV0z/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dify-6c0370d8/tWYYD8GkT0MUJV0z/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dify-6c0370d8/tWYYD8GkT0MUJV0z/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"触发器插件 - Dify Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"构建 Dify 1.10.0+ 触发器插件,将第三方 webhook 事件转换为工作流启动信号\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Dify Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dify-6c0370d8.mintlify.app/_mintlify/api/og/v2?division=%E6%8C%89%E6%8F%92%E4%BB%B6%E7%B1%BB%E5%9E%8B\u0026amp;title=%E8%A7%A6%E5%8F%91%E5%99%A8%E6%8F%92%E4%BB%B6\u0026amp;description=%E6%9E%84%E5%BB%BA+Dify+1.10.0%2B+%E8%A7%A6%E5%8F%91%E5%99%A8%E6%8F%92%E4%BB%B6%EF%BC%8C%E5%B0%86%E7%AC%AC%E4%B8%89%E6%96%B9+webhook+%E4%BA%8B%E4%BB%B6%E8%BD%AC%E6%8D%A2%E4%B8%BA%E5%B7%A5%E4%BD%9C%E6%B5%81%E5%90%AF%E5%8A%A8%E4%BF%A1%E5%8F%B7\u0026amp;theme=fc270d2c96587e5833522f0e\u0026amp;signature=f6d9b84f13eeaf9cda17c2a79cccdb25df92406a47e4db206f2503a3300f08b2\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"触发器插件 - Dify Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"构建 Dify 1.10.0+ 触发器插件,将第三方 webhook 事件转换为工作流启动信号\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dify-6c0370d8.mintlify.app/_mintlify/api/og/v2?division=%E6%8C%89%E6%8F%92%E4%BB%B6%E7%B1%BB%E5%9E%8B\u0026amp;title=%E8%A7%A6%E5%8F%91%E5%99%A8%E6%8F%92%E4%BB%B6\u0026amp;description=%E6%9E%84%E5%BB%BA+Dify+1.10.0%2B+%E8%A7%A6%E5%8F%91%E5%99%A8%E6%8F%92%E4%BB%B6%EF%BC%8C%E5%B0%86%E7%AC%AC%E4%B8%89%E6%96%B9+webhook+%E4%BA%8B%E4%BB%B6%E8%BD%AC%E6%8D%A2%E4%B8%BA%E5%B7%A5%E4%BD%9C%E6%B5%81%E5%90%AF%E5%8A%A8%E4%BF%A1%E5%8F%B7\u0026amp;theme=fc270d2c96587e5833522f0e\u0026amp;signature=f6d9b84f13eeaf9cda17c2a79cccdb25df92406a47e4db206f2503a3300f08b2\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/dify-6c0370d8/tWYYD8GkT0MUJV0z/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Dify Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0060FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.dify.ai/#organization\",\"name\":\"Dify Docs\",\"url\":\"https://docs.dify.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://assets-docs.dify.ai/2025/05/d05cfc6ebe48f725d171dc71c64a5d16.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.dify.ai#website\",\"name\":\"Dify Docs\",\"url\":\"https://docs.dify.ai\",\"publisher\":{\"@id\":\"https://docs.dify.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin#webpage\",\"url\":\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin\",\"name\":\"触发器插件\",\"description\":\"构建 Dify 1.10.0+ 触发器插件,将第三方 webhook 事件转换为工作流启动信号\",\"dateModified\":\"2026-10-09T02:21:15.000Z\",\"isPartOf\":{\"@id\":\"https://docs.dify.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"开发指南与示例\",\"item\":\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/cheatsheet\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"按插件类型\",\"item\":\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/tool-plugin\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"触发器插件\",\"item\":\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin#article\",\"headline\":\"触发器插件\",\"name\":\"触发器插件\",\"description\":\"构建 Dify 1.10.0+ 触发器插件,将第三方 webhook 事件转换为工作流启动信号\",\"url\":\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin\",\"mainEntityOfPage\":{\"@id\":\"https://docs.dify.ai/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin#webpage\"},\"dateModified\":\"2026-10-09T02:21:15.000Z\",\"publisher\":{\"@id\":\"https://docs.dify.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.dify.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Dify Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Dify Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"products":[{"product":"Cloud","icon":"cloud","tabs":[{"tab":"Use","icon":"book-open","pages":[{"title":"Use Dify","sidebarTitle":"Overview","mode":"frame","href":"/en/cloud/use-dify/getting-started/introduction"},{"title":"Dify Documentation","mode":"custom","hidden":true,"href":"/en/home"},{"group":"Orchestrate","icon":"hammer","pages":[{"group":"Workflow \u0026 Chatflow","expanded":false,"pages":[{"title":"Workflow \u0026 Chatflow","sidebarTitle":"Overview","href":"/en/cloud/use-dify/build/workflow-chatflow"},{"title":"Orchestration Logic","href":"/en/cloud/use-dify/build/orchestrate-node"},{"group":"Nodes","expanded":false,"pages":[{"group":"Start","root":{"title":"Start Node","href":"/en/cloud/use-dify/nodes/start"},"pages":[{"title":"User Input","href":"/en/cloud/use-dify/nodes/user-input"},{"group":"Trigger","root":{"title":"Trigger","sidebarTitle":"Overview","href":"/en/cloud/use-dify/nodes/trigger/overview"},"pages":[{"title":"Schedule Trigger","href":"/en/cloud/use-dify/nodes/trigger/schedule-trigger"},{"title":"Integration Trigger","href":"/en/cloud/use-dify/nodes/trigger/plugin-trigger"},{"title":"Webhook Trigger","href":"/en/cloud/use-dify/nodes/trigger/webhook-trigger"}]}]},{"title":"LLM","href":"/en/cloud/use-dify/nodes/llm"},{"title":"Knowledge Retrieval","href":"/en/cloud/use-dify/nodes/knowledge-retrieval"},{"title":"Answer","href":"/en/cloud/use-dify/nodes/answer"},{"title":"Output","href":"/en/cloud/use-dify/nodes/output"},{"title":"Agent","href":"/en/cloud/use-dify/nodes/agent"},{"title":"Question Classifier","href":"/en/cloud/use-dify/nodes/question-classifier"},{"title":"If-Else","href":"/en/cloud/use-dify/nodes/ifelse"},{"group":"Human Input","root":{"title":"Human Input","href":"/en/cloud/use-dify/nodes/human-input"},"expanded":false,"pages":[]},{"title":"Iteration","href":"/en/cloud/use-dify/nodes/iteration"},{"title":"Loop","href":"/en/cloud/use-dify/nodes/loop"},{"title":"Code","href":"/en/cloud/use-dify/nodes/code"},{"title":"Template","href":"/en/cloud/use-dify/nodes/template"},{"title":"Variable Aggregator","href":"/en/cloud/use-dify/nodes/variable-aggregator"},{"title":"Document Extractor","href":"/en/cloud/use-dify/nodes/doc-extractor"},{"title":"Variable Assigner","href":"/en/cloud/use-dify/nodes/variable-assigner"},{"title":"Parameter Extractor","href":"/en/cloud/use-dify/nodes/parameter-extractor"},{"title":"HTTP Request","href":"/en/cloud/use-dify/nodes/http-request"},{"title":"List Operator","href":"/en/cloud/use-dify/nodes/list-operator"},{"title":"Tool Node","sidebarTitle":"Tool","href":"/en/cloud/use-dify/nodes/tools"}]},{"title":"Hotkeys","href":"/en/cloud/use-dify/build/shortcut-key"},{"title":"Version Control","href":"/en/cloud/use-dify/build/version-control"},{"title":"Snippets","sidebarTitle":"Snippets","href":"/en/cloud/use-dify/build/snippet"},{"group":"Debug","expanded":false,"pages":[{"title":"Handle Errors","href":"/en/cloud/use-dify/build/predefined-error-handling-logic"},{"title":"Single Node","href":"/en/cloud/use-dify/debug/step-run"},{"title":"Variable Inspector","href":"/en/cloud/use-dify/debug/variable-inspect"},{"title":"Run History","href":"/en/cloud/use-dify/debug/history-and-logs"},{"title":"Error Types","href":"/en/cloud/use-dify/debug/error-type"}]}]},{"group":"Agent","tag":"New","expanded":false,"pages":[{"title":"Agent","sidebarTitle":"Overview","href":"/en/cloud/use-dify/build/new-agent/overview"},{"title":"Build an Agent","sidebarTitle":"Build","href":"/en/cloud/use-dify/build/new-agent/build"}]},{"group":"Basic Apps","expanded":false,"pages":[{"title":"Agent","tag":"Legacy","href":"/en/cloud/use-dify/build/agent"},{"title":"Chatbot","sidebarTitle":"Chatbot","href":"/en/cloud/use-dify/build/chatbot"},{"title":"Text Generator","sidebarTitle":"Text Generator","href":"/en/cloud/use-dify/build/text-generator"}]},{"title":"App Toolkit","href":"/en/cloud/use-dify/build/additional-features"},{"title":"Go to Anything","href":"/en/cloud/use-dify/build/goto-anything"}]},{"group":"Publish","icon":"paper-plane","expanded":false,"pages":[{"title":"Overview","href":"/en/cloud/use-dify/publish/README"},{"group":"Web App","pages":[{"title":"Workflow Web Apps","href":"/en/cloud/use-dify/publish/webapp/workflow-webapp"},{"title":"Chat Web Apps","href":"/en/cloud/use-dify/publish/webapp/chatflow-webapp"},{"title":"Settings","href":"/en/cloud/use-dify/publish/webapp/web-app-settings"},{"title":"Embed Your Web App","sidebarTitle":"Embeds","href":"/en/cloud/use-dify/publish/webapp/embedding-in-websites"}]},{"title":"MCP Server","href":"/en/cloud/use-dify/publish/publish-mcp"},{"title":"Publish Apps to Marketplace","sidebarTitle":"Marketplace","href":"/en/cloud/use-dify/publish/publish-to-marketplace"}]},{"group":"Monitor","icon":"chart-line","expanded":false,"pages":[{"title":"Dashboard","href":"/en/cloud/use-dify/monitor/analysis"},{"title":"Logs","href":"/en/cloud/use-dify/monitor/logs"},{"title":"Annotation System","href":"/en/cloud/use-dify/monitor/annotation-reply"},{"group":"Integrations","pages":[{"title":"Integrate with LangSmith","sidebarTitle":"LangSmith","href":"/en/cloud/use-dify/monitor/integrations/integrate-langsmith"},{"title":"Integrate with Langfuse","sidebarTitle":"Langfuse","href":"/en/cloud/use-dify/monitor/integrations/integrate-langfuse"},{"title":"Integrate with Opik","sidebarTitle":"Opik","href":"/en/cloud/use-dify/monitor/integrations/integrate-opik"},{"title":"Integrate with W\u0026B Weave","sidebarTitle":"W\u0026B Weave","href":"/en/cloud/use-dify/monitor/integrations/integrate-weave"},{"title":"Integrate with Arize","sidebarTitle":"Arize","href":"/en/cloud/use-dify/monitor/integrations/integrate-arize"},{"title":"Integrate with Phoenix","sidebarTitle":"Phoenix","href":"/en/cloud/use-dify/monitor/integrations/integrate-phoenix"},{"title":"Integrate with Alibaba Cloud Monitor","sidebarTitle":"Alibaba Cloud Monitor","href":"/en/cloud/use-dify/monitor/integrations/integrate-aliyun"}]}]},{"group":"Knowledge","icon":"book","expanded":false,"pages":[{"title":"Knowledge","sidebarTitle":"Overview","href":"/en/cloud/use-dify/knowledge/readme"},{"group":"Create","pages":[{"group":"Ready-to-Use Knowledge Base","pages":[{"title":"Create a Ready-to-Use Knowledge Base","sidebarTitle":"Overview","href":"/en/cloud/use-dify/knowledge/create-knowledge/introduction"},{"group":"Import Data","pages":[{"title":"Upload Local Files","href":"/en/cloud/use-dify/knowledge/create-knowledge/import-text-data/readme"},{"title":"Sync Data from Notion","href":"/en/cloud/use-dify/knowledge/create-knowledge/import-text-data/sync-from-notion"},{"title":"Import Data from Website","href":"/en/cloud/use-dify/knowledge/create-knowledge/import-text-data/sync-from-website"}]},{"title":"Configure the Chunk Settings","href":"/en/cloud/use-dify/knowledge/create-knowledge/chunking-and-cleaning-text"},{"title":"Specify the Index Method and Retrieval Settings","href":"/en/cloud/use-dify/knowledge/create-knowledge/setting-indexing-methods"}]},{"group":"Custom Knowledge Base","pages":[{"title":"Build a Custom Knowledge Base","sidebarTitle":"Overview","href":"/en/cloud/use-dify/knowledge/knowledge-pipeline/readme"},{"title":"Step 1: Create Knowledge Pipeline","href":"/en/cloud/use-dify/knowledge/knowledge-pipeline/create-knowledge-pipeline"},{"title":"Step 2: Orchestrate Knowledge Pipeline","href":"/en/cloud/use-dify/knowledge/knowledge-pipeline/knowledge-pipeline-orchestration"},{"title":"Step 3: Publish Knowledge Pipeline","href":"/en/cloud/use-dify/knowledge/knowledge-pipeline/publish-knowledge-pipeline"},{"title":"Step 4: Upload Files","href":"/en/cloud/use-dify/knowledge/knowledge-pipeline/upload-files"},{"title":"Step 5: Manage and Use Knowledge Base","href":"/en/cloud/use-dify/knowledge/knowledge-pipeline/manage-knowledge-base"},{"title":"Authorize Data Source","href":"/en/cloud/use-dify/knowledge/knowledge-pipeline/authorize-data-source"}]},{"group":"Connect to External Knowledge","pages":[{"title":"Connect to External Knowledge Base","sidebarTitle":"Overview","href":"/en/cloud/use-dify/knowledge/connect-external-knowledge-base"},{"title":"External Knowledge API","href":"/en/cloud/use-dify/knowledge/external-knowledge-api"}]}]},{"group":"Manage","pages":[{"title":"Manage Knowledge Content","sidebarTitle":"Documents \u0026 Chunks","href":"/en/cloud/use-dify/knowledge/manage-knowledge/maintain-knowledge-documents"},{"title":"Manage Document Metadata","sidebarTitle":"Metadata","href":"/en/cloud/use-dify/knowledge/metadata"},{"title":"Manage Knowledge Settings","sidebarTitle":"Settings","href":"/en/cloud/use-dify/knowledge/manage-knowledge/introduction"}]},{"title":"Test Knowledge Retrieval","sidebarTitle":"Test Retrieval","href":"/en/cloud/use-dify/knowledge/test-retrieval"},{"title":"Integrate Knowledge within Apps","sidebarTitle":"Integrate in Apps","href":"/en/cloud/use-dify/knowledge/integrate-knowledge-within-application"},{"title":"Knowledge Request Rate Limit","sidebarTitle":"Request Rate Limit","href":"/en/cloud/use-dify/knowledge/knowledge-request-rate-limit"},{"title":"Knowledge Data Storage Limit","sidebarTitle":"Data Storage Limit","href":"/en/cloud/use-dify/knowledge/knowledge-storage-limit"}]},{"group":"Integrations","icon":"plug","expanded":false,"pages":[{"title":"Integrations","sidebarTitle":"Overview","href":"/en/cloud/use-dify/workspace/plugins"},{"title":"Model Providers","href":"/en/cloud/use-dify/workspace/model-providers"},{"title":"Dify Tools","sidebarTitle":"Tools","href":"/en/cloud/use-dify/workspace/tools"},{"group":"Custom Endpoint","pages":[{"title":"Custom Endpoints","sidebarTitle":"Overview","href":"/en/cloud/use-dify/workspace/api-extension/api-extension"},{"title":"External Data Tool","href":"/en/cloud/use-dify/workspace/api-extension/external-data-tool-api-extension"},{"title":"Sensitive Content Moderation","href":"/en/cloud/use-dify/workspace/api-extension/moderation-api-extension"},{"title":"Deploy Custom Endpoints Using Cloudflare Workers","href":"/en/cloud/use-dify/workspace/api-extension/cloudflare-worker"}]}]},{"group":"Workspace","icon":"briefcase","expanded":false,"pages":[{"title":"Overview","href":"/en/cloud/use-dify/workspace/readme"},{"title":"Manage Apps","href":"/en/cloud/use-dify/workspace/app-management"},{"title":"Manage Members","href":"/en/cloud/use-dify/workspace/team-members-management"},{"title":"Personal Settings","href":"/en/cloud/use-dify/workspace/personal-account-management"},{"title":"Billing","href":"/en/cloud/use-dify/workspace/subscription-management"}]}]},{"tab":"Learn","icon":"graduation-cap","pages":[{"title":"Key Concepts","href":"/en/learn/key-concepts"},{"group":"Tutorials","pages":[{"title":"30-Minute Quick Start","href":"/en/quick-start"},{"group":"Workflow 101","pages":[{"title":"Lesson 1: What is a Workflow?","href":"/en/learn/tutorials/workflow-101/lesson-01"},{"title":"Lesson 2: Head and Tail (Start \u0026 Output Node)","sidebarTitle":"Lesson 2: Head and Tail","href":"/en/learn/tutorials/workflow-101/lesson-02"},{"title":"Lesson 3: The Brain of the Workflow (LLM Node)","sidebarTitle":"Lesson 3: The Brain of the Workflow","href":"/en/learn/tutorials/workflow-101/lesson-03"},{"title":"Lesson 4: The Cheat Sheet (Knowledge Retrieval)","sidebarTitle":"Lesson 4: The Cheat Sheet","href":"/en/learn/tutorials/workflow-101/lesson-04"},{"title":"Lesson 5: The Crossroads of Your Workflow (Sorting and Executing)","sidebarTitle":"Lesson 5: The Crossroads of Your Workflow","href":"/en/learn/tutorials/workflow-101/lesson-05"},{"title":"Lesson 6: Handle Multiple Tasks (Parameter Extraction \u0026 Iteration)","sidebarTitle":"Lesson 6: Handle Multiple Tasks","href":"/en/learn/tutorials/workflow-101/lesson-06"},{"title":"Lesson 7: Enhance Workflows (Tools)","sidebarTitle":"Lesson 7: Enhance Workflows","href":"/en/learn/tutorials/workflow-101/lesson-07"},{"title":"Lesson 8: The Agent Node","sidebarTitle":"Lesson 8: The Agent Node","href":"/en/learn/tutorials/workflow-101/lesson-08"},{"title":"Lesson 9: Layout Designer (Template)","sidebarTitle":"Lesson 9: Layout Designer","href":"/en/learn/tutorials/workflow-101/lesson-09"},{"title":"Lesson 10: Publish and Monitor Your AI App","sidebarTitle":"Lesson 10: Publish and Monitor","href":"/en/learn/tutorials/workflow-101/lesson-10"}]},{"title":"Simple Chatbot","href":"/en/learn/tutorials/simple-chatbot"},{"title":"Twitter Account Analyzer","href":"/en/learn/tutorials/twitter-chatflow"},{"title":"Customer Service Bot With Knowledge Base","href":"/en/learn/tutorials/customer-service-bot"},{"title":"AI Image Generation App","href":"/en/learn/tutorials/build-ai-image-generation-app"},{"title":"Article Reader Using File Upload","href":"/en/learn/tutorials/article-reader"}]}]},{"tab":"Developer Resources","icon":"code","menu":[{"item":"API","icon":"code","groups":[{"group":"Guides","pages":[{"title":"Get Started with the Dify API","sidebarTitle":"Get Started","href":"/en/api-reference/guides/get-started"},{"group":"API Overviews","expanded":true,"pages":[{"title":"Chatflow App API","sidebarTitle":"Chatflow","href":"/en/api-reference/guides/chatflow"},{"title":"Workflow App API","sidebarTitle":"Workflow","href":"/en/api-reference/guides/workflow"},{"title":"Agent API","sidebarTitle":"Agent","tag":"New","href":"/en/api-reference/guides/agent"},{"title":"Knowledge API","sidebarTitle":"Knowledge","href":"/en/api-reference/guides/knowledge"},{"title":"Chat App API","sidebarTitle":"Chatbot and Legacy Agent","href":"/en/api-reference/guides/chat"},{"title":"Completion App API","sidebarTitle":"Text Generator","href":"/en/api-reference/guides/completion"}]},{"title":"Consume Streaming Responses","sidebarTitle":"SSE Streaming","href":"/en/api-reference/guides/streaming"},{"title":"Human Input API Integration Flow","sidebarTitle":"Human Input Flow","href":"/en/api-reference/guides/human-input-flow"},{"title":"End User Identity","sidebarTitle":"End User Identity","href":"/en/api-reference/guides/end-user-identity"},{"title":"Handle Errors and Rate Limits","sidebarTitle":"Errors \u0026 Rate Limits","href":"/en/api-reference/guides/errors"}]},{"group":"App APIs","pages":[{"group":"Chat Messages","pages":[{"title":"Send Chat Message","deprecated":null,"version":null,"sidebarTitle":"Send Chat Message","openapi":"/en/api-reference/openapi_service.json post /chat-messages","href":"/en/api-reference/chat-messages/send-chat-message"},{"title":"Stop Chat Message Generation","deprecated":null,"version":null,"sidebarTitle":"Stop Chat Message Generation","openapi":"/en/api-reference/openapi_service.json post /chat-messages/{task_id}/stop","href":"/en/api-reference/chat-messages/stop-chat-message-generation"},{"title":"Get Next Suggested Questions","deprecated":null,"version":null,"sidebarTitle":"Get Next Suggested Questions","openapi":"/en/api-reference/openapi_service.json get /messages/{message_id}/suggested","href":"/en/api-reference/chat-messages/get-next-suggested-questions"}]},{"group":"Completion Messages","pages":[{"title":"Send Completion Message","deprecated":null,"version":null,"sidebarTitle":"Send Completion Message","openapi":"/en/api-reference/openapi_service.json post /completion-messages","href":"/en/api-reference/completion-messages/send-completion-message"},{"title":"Stop Completion Message Generation","deprecated":null,"version":null,"sidebarTitle":"Stop Completion Message Generation","openapi":"/en/api-reference/openapi_service.json post /completion-messages/{task_id}/stop","href":"/en/api-reference/completion-messages/stop-completion-message-generation"}]},{"group":"Workflow Runs","pages":[{"title":"Run Workflow","deprecated":null,"version":null,"sidebarTitle":"Run Workflow","openapi":"/en/api-reference/openapi_service.json post /workflows/run","href":"/en/api-reference/workflow-runs/run-workflow"},{"title":"Run Workflow by ID","deprecated":null,"version":null,"sidebarTitle":"Run Workflow by ID","openapi":"/en/api-reference/openapi_service.json post /workflows/{workflow_id}/run","href":"/en/api-reference/workflow-runs/run-workflow-by-id"},{"title":"Stop Workflow Task","deprecated":null,"version":null,"sidebarTitle":"Stop Workflow Task","openapi":"/en/api-reference/openapi_service.json post /workflows/tasks/{task_id}/stop","href":"/en/api-reference/workflow-runs/stop-workflow-task"},{"title":"Get Workflow Run Detail","deprecated":null,"version":null,"sidebarTitle":"Get Workflow Run Detail","openapi":"/en/api-reference/openapi_service.json get /workflows/run/{workflow_run_id}","href":"/en/api-reference/workflow-runs/get-workflow-run-detail"},{"title":"List Workflow Logs","deprecated":null,"version":null,"sidebarTitle":"List Workflow Logs","openapi":"/en/api-reference/openapi_service.json get /workflows/logs","href":"/en/api-reference/workflow-runs/list-workflow-logs"},{"title":"Stream Workflow Events","deprecated":null,"version":null,"sidebarTitle":"Stream Workflow Events","openapi":"/en/api-reference/openapi_service.json get /workflow/{workflow_run_id}/events","href":"/en/api-reference/workflow-runs/stream-workflow-events"}]},{"group":"Conversations","pages":[{"title":"List Conversations","deprecated":null,"version":null,"sidebarTitle":"List Conversations","openapi":"/en/api-reference/openapi_service.json get /conversations","href":"/en/api-reference/conversations/list-conversations"},{"title":"List Conversation Messages","deprecated":null,"version":null,"sidebarTitle":"List Conversation Messages","openapi":"/en/api-reference/openapi_service.json get /messages","href":"/en/api-reference/conversations/list-conversation-messages"},{"title":"List Conversation Variables","deprecated":null,"version":null,"sidebarTitle":"List Conversation Variables","openapi":"/en/api-reference/openapi_service.json get /conversations/{conversation_id}/variables","href":"/en/api-reference/conversations/list-conversation-variables"},{"title":"Rename Conversation","deprecated":null,"version":null,"sidebarTitle":"Rename Conversation","openapi":"/en/api-reference/openapi_service.json post /conversations/{conversation_id}/name","href":"/en/api-reference/conversations/rename-conversation"},{"title":"Update Conversation Variable","deprecated":null,"version":null,"sidebarTitle":"Update Conversation Variable","openapi":"/en/api-reference/openapi_service.json put /conversations/{conversation_id}/variables/{variable_id}","href":"/en/api-reference/conversations/update-conversation-variable"},{"title":"Delete Conversation","deprecated":null,"version":null,"sidebarTitle":"Delete Conversation","openapi":"/en/api-reference/openapi_service.json delete /conversations/{conversation_id}","href":"/en/api-reference/conversations/delete-conversation"}]},{"group":"Files","pages":[{"title":"Upload File","deprecated":null,"version":null,"sidebarTitle":"Upload File","openapi":"/en/api-reference/openapi_service.json post /files/upload","href":"/en/api-reference/files/upload-file"},{"title":"Download File","deprecated":null,"version":null,"sidebarTitle":"Download File","openapi":"/en/api-reference/openapi_service.json get /files/{file_id}/preview","href":"/en/api-reference/files/download-file"}]},{"group":"Audio","pages":[{"title":"Convert Audio to Text","deprecated":null,"version":null,"sidebarTitle":"Convert Audio to Text","openapi":"/en/api-reference/openapi_service.json post /audio-to-text","href":"/en/api-reference/audio/convert-audio-to-text"},{"title":"Convert Text to Audio","deprecated":null,"version":null,"sidebarTitle":"Convert Text to Audio","openapi":"/en/api-reference/openapi_service.json post /text-to-audio","href":"/en/api-reference/audio/convert-text-to-audio"}]},{"group":"Applications","pages":[{"title":"Get App Info","deprecated":null,"version":null,"sidebarTitle":"Get App Info","openapi":"/en/api-reference/openapi_service.json get /info","href":"/en/api-reference/applications/get-app-info"},{"title":"Get App Parameters","deprecated":null,"version":null,"sidebarTitle":"Get App Parameters","openapi":"/en/api-reference/openapi_service.json get /parameters","href":"/en/api-reference/applications/get-app-parameters"},{"title":"Get App Meta","deprecated":null,"version":null,"sidebarTitle":"Get App Meta","openapi":"/en/api-reference/openapi_service.json get /meta","href":"/en/api-reference/applications/get-app-meta"},{"title":"Get App WebApp Settings","deprecated":null,"version":null,"sidebarTitle":"Get App WebApp Settings","openapi":"/en/api-reference/openapi_service.json get /site","href":"/en/api-reference/applications/get-app-webapp-settings"}]},{"group":"Feedback","pages":[{"title":"Submit Message Feedback","deprecated":null,"version":null,"sidebarTitle":"Submit Message Feedback","openapi":"/en/api-reference/openapi_service.json post /messages/{message_id}/feedbacks","href":"/en/api-reference/feedback/submit-message-feedback"},{"title":"List App Feedbacks","deprecated":null,"version":null,"sidebarTitle":"List App Feedbacks","openapi":"/en/api-reference/openapi_service.json get /app/feedbacks","href":"/en/api-reference/feedback/list-app-feedbacks"}]},{"group":"Annotations","pages":[{"title":"Create Annotation","deprecated":null,"version":null,"sidebarTitle":"Create Annotation","openapi":"/en/api-reference/openapi_service.json post /apps/annotations","href":"/en/api-reference/annotations/create-annotation"},{"title":"List Annotations","deprecated":null,"version":null,"sidebarTitle":"List Annotations","openapi":"/en/api-reference/openapi_service.json get /apps/annotations","href":"/en/api-reference/annotations/list-annotations"},{"title":"Update Annotation","deprecated":null,"version":null,"sidebarTitle":"Update Annotation","openapi":"/en/api-reference/openapi_service.json put /apps/annotations/{annotation_id}","href":"/en/api-reference/annotations/update-annotation"},{"title":"Delete Annotation","deprecated":null,"version":null,"sidebarTitle":"Delete Annotation","openapi":"/en/api-reference/openapi_service.json delete /apps/annotations/{annotation_id}","href":"/en/api-reference/annotations/delete-annotation"},{"title":"Configure Annotation Reply","deprecated":null,"version":null,"sidebarTitle":"Configure Annotation Reply","openapi":"/en/api-reference/openapi_service.json post /apps/annotation-reply/{action}","href":"/en/api-reference/annotations/configure-annotation-reply"},{"title":"Get Annotation Reply Job Status","deprecated":null,"version":null,"sidebarTitle":"Get Annotation Reply Job Status","openapi":"/en/api-reference/openapi_service.json get /apps/annotation-reply/{action}/status/{job_id}","href":"/en/api-reference/annotations/get-annotation-reply-job-status"}]},{"group":"End Users","pages":[{"title":"Get End User Info","deprecated":null,"version":null,"sidebarTitle":"Get End User Info","openapi":"/en/api-reference/openapi_service.json get /end-users/{end_user_id}","href":"/en/api-reference/end-users/get-end-user-info"}]},{"group":"Human Input","pages":[{"title":"Get Human Input Form","deprecated":null,"version":null,"sidebarTitle":"Get Human Input Form","openapi":"/en/api-reference/openapi_service.json get /form/human_input/{form_token}","href":"/en/api-reference/human-input/get-human-input-form"},{"title":"Submit Human Input Form","deprecated":null,"version":null,"sidebarTitle":"Submit Human Input Form","openapi":"/en/api-reference/openapi_service.json post /form/human_input/{form_token}","href":"/en/api-reference/human-input/submit-human-input-form"}]}]},{"group":"Knowledge APIs","pages":[{"group":"Knowledge Bases","pages":[{"title":"Create an Empty Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Create an Empty Knowledge Base","openapi":"/en/api-reference/openapi_service.json post /datasets","href":"/en/api-reference/knowledge-bases/create-an-empty-knowledge-base"},{"title":"List Knowledge Bases","deprecated":null,"version":null,"sidebarTitle":"List Knowledge Bases","openapi":"/en/api-reference/openapi_service.json get /datasets","href":"/en/api-reference/knowledge-bases/list-knowledge-bases"},{"title":"Get Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Get Knowledge Base","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}","href":"/en/api-reference/knowledge-bases/get-knowledge-base"},{"title":"Update Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Update Knowledge Base","openapi":"/en/api-reference/openapi_service.json patch /datasets/{dataset_id}","href":"/en/api-reference/knowledge-bases/update-knowledge-base"},{"title":"Delete Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Delete Knowledge Base","openapi":"/en/api-reference/openapi_service.json delete /datasets/{dataset_id}","href":"/en/api-reference/knowledge-bases/delete-knowledge-base"},{"title":"Retrieve Chunks from a Knowledge Base / Test Retrieval","deprecated":null,"version":null,"sidebarTitle":"Retrieve Chunks from a Knowledge Base / Test Retrieval","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/retrieve","href":"/en/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval"}]},{"group":"Documents","pages":[{"title":"Create Document by Text","deprecated":null,"version":null,"sidebarTitle":"Create Document by Text","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/document/create-by-text","href":"/en/api-reference/documents/create-document-by-text"},{"title":"Create Document by File","deprecated":null,"version":null,"sidebarTitle":"Create Document by File","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/document/create-by-file","href":"/en/api-reference/documents/create-document-by-file"},{"title":"List Documents","deprecated":null,"version":null,"sidebarTitle":"List Documents","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents","href":"/en/api-reference/documents/list-documents"},{"title":"Get Document","deprecated":null,"version":null,"sidebarTitle":"Get Document","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}","href":"/en/api-reference/documents/get-document"},{"title":"Delete Document","deprecated":null,"version":null,"sidebarTitle":"Delete Document","openapi":"/en/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}","href":"/en/api-reference/documents/delete-document"},{"title":"Update Document","deprecated":null,"version":null,"sidebarTitle":"Update Document","openapi":"/en/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/{document_id}","href":"/en/api-reference/documents/update-document"},{"title":"Download Document","deprecated":null,"version":null,"sidebarTitle":"Download Document","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/download","href":"/en/api-reference/documents/download-document"},{"title":"Get Document Indexing Status","deprecated":null,"version":null,"sidebarTitle":"Get Document Indexing Status","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{batch}/indexing-status","href":"/en/api-reference/documents/get-document-indexing-status"},{"title":"Update Document by Text","deprecated":null,"version":null,"sidebarTitle":"Update Document by Text","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-text","href":"/en/api-reference/documents/update-document-by-text"},{"title":"Update Document by File","deprecated":true,"version":null,"sidebarTitle":"Update Document by File","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-file","href":"/en/api-reference/documents/update-document-by-file"},{"title":"Download Documents as ZIP","deprecated":null,"version":null,"sidebarTitle":"Download Documents as ZIP","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/download-zip","href":"/en/api-reference/documents/download-documents-as-zip"},{"title":"Update Document Status in Batch","deprecated":null,"version":null,"sidebarTitle":"Update Document Status in Batch","openapi":"/en/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/status/{action}","href":"/en/api-reference/documents/update-document-status-in-batch"}]},{"group":"Chunks","pages":[{"title":"Create Chunks","deprecated":null,"version":null,"sidebarTitle":"Create Chunks","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments","href":"/en/api-reference/chunks/create-chunks"},{"title":"List Chunks","deprecated":null,"version":null,"sidebarTitle":"List Chunks","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments","href":"/en/api-reference/chunks/list-chunks"},{"title":"Get Chunk","deprecated":null,"version":null,"sidebarTitle":"Get Chunk","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/en/api-reference/chunks/get-chunk"},{"title":"Update Chunk","deprecated":null,"version":null,"sidebarTitle":"Update Chunk","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/en/api-reference/chunks/update-chunk"},{"title":"Delete Chunk","deprecated":null,"version":null,"sidebarTitle":"Delete Chunk","openapi":"/en/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/en/api-reference/chunks/delete-chunk"},{"title":"Create Child Chunk","deprecated":null,"version":null,"sidebarTitle":"Create Child Chunk","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks","href":"/en/api-reference/chunks/create-child-chunk"},{"title":"List Child Chunks","deprecated":null,"version":null,"sidebarTitle":"List Child Chunks","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks","href":"/en/api-reference/chunks/list-child-chunks"},{"title":"Update Child Chunk","deprecated":null,"version":null,"sidebarTitle":"Update Child Chunk","openapi":"/en/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}","href":"/en/api-reference/chunks/update-child-chunk"},{"title":"Delete Child Chunk","deprecated":null,"version":null,"sidebarTitle":"Delete Child Chunk","openapi":"/en/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}","href":"/en/api-reference/chunks/delete-child-chunk"}]},{"group":"Metadata","pages":[{"title":"Create Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Create Metadata Field","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/metadata","href":"/en/api-reference/metadata/create-metadata-field"},{"title":"List Metadata Fields","deprecated":null,"version":null,"sidebarTitle":"List Metadata Fields","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/metadata","href":"/en/api-reference/metadata/list-metadata-fields"},{"title":"Update Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Update Metadata Field","openapi":"/en/api-reference/openapi_service.json patch /datasets/{dataset_id}/metadata/{metadata_id}","href":"/en/api-reference/metadata/update-metadata-field"},{"title":"Delete Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Delete Metadata Field","openapi":"/en/api-reference/openapi_service.json delete /datasets/{dataset_id}/metadata/{metadata_id}","href":"/en/api-reference/metadata/delete-metadata-field"},{"title":"Get Built-in Metadata Fields","deprecated":null,"version":null,"sidebarTitle":"Get Built-in Metadata Fields","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/metadata/built-in","href":"/en/api-reference/metadata/get-built-in-metadata-fields"},{"title":"Update Built-in Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Update Built-in Metadata Field","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/metadata/built-in/{action}","href":"/en/api-reference/metadata/update-built-in-metadata-field"},{"title":"Update Document Metadata in Batch","deprecated":null,"version":null,"sidebarTitle":"Update Document Metadata in Batch","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/metadata","href":"/en/api-reference/metadata/update-document-metadata-in-batch"}]},{"group":"Tags","pages":[{"title":"Create Knowledge Tag","deprecated":null,"version":null,"sidebarTitle":"Create Knowledge Tag","openapi":"/en/api-reference/openapi_service.json post /datasets/tags","href":"/en/api-reference/tags/create-knowledge-tag"},{"title":"List Knowledge Tags","deprecated":null,"version":null,"sidebarTitle":"List Knowledge Tags","openapi":"/en/api-reference/openapi_service.json get /datasets/tags","href":"/en/api-reference/tags/list-knowledge-tags"},{"title":"Update Knowledge Tag","deprecated":null,"version":null,"sidebarTitle":"Update Knowledge Tag","openapi":"/en/api-reference/openapi_service.json patch /datasets/tags","href":"/en/api-reference/tags/update-knowledge-tag"},{"title":"Delete Knowledge Tag","deprecated":null,"version":null,"sidebarTitle":"Delete Knowledge Tag","openapi":"/en/api-reference/openapi_service.json delete /datasets/tags","href":"/en/api-reference/tags/delete-knowledge-tag"},{"title":"Create Tag Binding","deprecated":null,"version":null,"sidebarTitle":"Create Tag Binding","openapi":"/en/api-reference/openapi_service.json post /datasets/tags/binding","href":"/en/api-reference/tags/create-tag-binding"},{"title":"Delete Tag Binding","deprecated":null,"version":null,"sidebarTitle":"Delete Tag Binding","openapi":"/en/api-reference/openapi_service.json post /datasets/tags/unbinding","href":"/en/api-reference/tags/delete-tag-binding"},{"title":"Get Knowledge Base Tags","deprecated":null,"version":null,"sidebarTitle":"Get Knowledge Base Tags","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/tags","href":"/en/api-reference/tags/get-knowledge-base-tags"}]},{"group":"Models","pages":[{"title":"Get Available Models","deprecated":null,"version":null,"sidebarTitle":"Get Available Models","openapi":"/en/api-reference/openapi_service.json get /workspaces/current/models/model-types/{model_type}","href":"/en/api-reference/models/get-available-models"}]},{"group":"Knowledge Pipeline","pages":[{"title":"Upload Pipeline File","deprecated":null,"version":null,"sidebarTitle":"Upload Pipeline File","openapi":"/en/api-reference/openapi_service.json post /datasets/pipeline/file-upload","href":"/en/api-reference/knowledge-pipeline/upload-pipeline-file"},{"title":"List Datasource Plugins","deprecated":null,"version":null,"sidebarTitle":"List Datasource Plugins","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/pipeline/datasource-plugins","href":"/en/api-reference/knowledge-pipeline/list-datasource-plugins"},{"title":"Run Datasource Node","deprecated":null,"version":null,"sidebarTitle":"Run Datasource Node","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run","href":"/en/api-reference/knowledge-pipeline/run-datasource-node"},{"title":"Run Pipeline","deprecated":null,"version":null,"sidebarTitle":"Run Pipeline","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/pipeline/run","href":"/en/api-reference/knowledge-pipeline/run-pipeline"}]}]}]},{"item":"CLI","icon":"terminal","groups":[{"group":" ","expanded":true,"pages":[{"title":"Overview","href":"/en/cloud/cli/overview"},{"title":"Install difyctl","sidebarTitle":"Install","href":"/en/cloud/cli/install"},{"title":"Quick Start","href":"/en/cloud/cli/quick-start"},{"title":"Authenticate","href":"/en/cloud/cli/authenticate"},{"title":"Common Tasks","href":"/en/cloud/cli/common-tasks"},{"group":"Integrate Your Agents","pages":[{"title":"Integrate Your Agents with Dify Apps","sidebarTitle":"Overview","href":"/en/cloud/cli/integrate-agents/overview"},{"title":"Authenticate Where Your Agent Runs","sidebarTitle":"Authenticate","href":"/en/cloud/cli/integrate-agents/auth-for-agent-deployments"},{"title":"Install the difyctl Skill","href":"/en/cloud/cli/integrate-agents/install-the-difyctl-skill"},{"title":"Handle Errors and Retries","href":"/en/cloud/cli/integrate-agents/error-handling-and-retries-for-agents"}]},{"group":"CLI Reference","pages":[{"title":"Command Index","href":"/en/cloud/cli/reference/command-index"},{"title":"Global Flags","href":"/en/cloud/cli/reference/global-flags"},{"title":"Output Formats and Exit Codes","href":"/en/cloud/cli/reference/output-formats-and-exit-codes"},{"title":"Environment Variables","href":"/en/cloud/cli/reference/environment-variables"},{"group":"Commands","expanded":true,"pages":[{"title":"Apps","href":"/en/cloud/cli/reference/apps"},{"title":"Auth and Contexts","href":"/en/cloud/cli/reference/auth-and-contexts"},{"title":"Workspaces","href":"/en/cloud/cli/reference/workspaces"},{"title":"Help","href":"/en/cloud/cli/reference/help"},{"title":"Skills","href":"/en/cloud/cli/reference/skills"},{"title":"Version","href":"/en/cloud/cli/reference/version"}]}]},{"title":"Troubleshooting","href":"/en/cloud/cli/troubleshooting"}]}]},{"item":"Plugins","icon":"code-pull-request","groups":[{"group":"Getting Started","icon":"rocket","pages":[{"title":"Dify Plugin","href":"/en/develop-plugin/getting-started/getting-started-dify-plugin"},{"title":"Choose a Plugin Type","href":"/en/develop-plugin/getting-started/choose-plugin-type"},{"title":"Dify Plugin CLI","href":"/en/develop-plugin/getting-started/cli"}]},{"group":"Features \u0026 Specs","icon":"list-check","pages":[{"group":"Plugin Types","pages":[{"title":"General Specs","href":"/en/develop-plugin/features-and-specs/plugin-types/general-specifications"},{"title":"Model Specs","href":"/en/develop-plugin/features-and-specs/plugin-types/model-designing-rules"},{"title":"Model API Interface","href":"/en/develop-plugin/features-and-specs/plugin-types/model-schema"},{"title":"Persistent Storage","href":"/en/develop-plugin/features-and-specs/plugin-types/persistent-storage-kv"},{"title":"Tool Return","href":"/en/develop-plugin/features-and-specs/plugin-types/tool"},{"title":"Manifest","href":"/en/develop-plugin/features-and-specs/plugin-types/plugin-info-by-manifest"},{"title":"Multilingual README","href":"/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme"},{"title":"Plugin Debugging","href":"/en/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin"},{"title":"Plugin Logging","href":"/en/develop-plugin/features-and-specs/plugin-types/plugin-logging"}]},{"group":"Advanced Development","pages":[{"group":"Reverse Calling","pages":[{"title":"Bundle Plugin Package","href":"/en/develop-plugin/features-and-specs/advanced-development/bundle"},{"title":"Reverse Invocation of Dify Services","href":"/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation"},{"title":"App","href":"/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation-app"},{"title":"Reverse Invocation Model","href":"/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation-model"},{"title":"Tool","href":"/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation-tool"},{"title":"Integrate Custom Models","href":"/en/develop-plugin/features-and-specs/advanced-development/customizable-model"},{"title":"Node","href":"/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation-node"}]}]}]},{"group":"Development Guides \u0026 Walkthroughs","icon":"code","pages":[{"title":"Cheatsheet","href":"/en/develop-plugin/dev-guides-and-walkthroughs/cheatsheet"},{"group":"By Plugin Type","pages":[{"title":"Tool Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/tool-plugin"},{"title":"Tool OAuth","href":"/en/develop-plugin/dev-guides-and-walkthroughs/tool-oauth"},{"title":"Model Provider Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/creating-new-model-provider"},{"title":"Agent Strategy Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/agent-strategy-plugin"},{"title":"Data Source Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/datasource-plugin"},{"title":"Trigger Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin"},{"title":"Endpoint Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/endpoint"}]},{"group":"Full Walkthroughs","pages":[{"title":"Flomo Tool (10-min)","href":"/en/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin"},{"title":"Slack Bot","href":"/en/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin"},{"title":"Markdown Exporter","href":"/en/develop-plugin/dev-guides-and-walkthroughs/develop-md-exporter"},{"title":"Multimodal Tool","href":"/en/develop-plugin/dev-guides-and-walkthroughs/develop-multimodal-data-processing-tool"}]}]},{"group":"Publishing","icon":"upload","pages":[{"title":"Publish Plugins","href":"/en/develop-plugin/publishing/marketplace-listing/release-overview"},{"group":"Standards","pages":[{"title":"Plugin Development Guidelines","href":"/en/develop-plugin/publishing/standards/contributor-covenant-code-of-conduct"},{"title":"Privacy Guidelines","href":"/en/develop-plugin/publishing/standards/privacy-protection-guidelines"}]},{"title":"Publish a Plugin to Marketplace","sidebarTitle":"Marketplace","href":"/en/develop-plugin/publishing/marketplace-listing/submit-plugin-to-marketplace"},{"group":"GitHub Repository","pages":[{"title":"Publish to Individual GitHub Repository","href":"/en/develop-plugin/publishing/marketplace-listing/release-to-individual-github-repo"}]},{"group":"Local File","pages":[{"title":"Package as Local File and Share","href":"/en/develop-plugin/publishing/marketplace-listing/release-by-file"},{"title":"Sign Plugins for Third-Party Signature Verification","href":"/en/develop-plugin/publishing/standards/third-party-signature-verification"}]},{"title":"Frequently Asked Questions","sidebarTitle":"FAQ","href":"/en/develop-plugin/publishing/faq/faq"}]}]}]}]},{"product":"Self-Host","icon":"server","tabs":[{"tab":"Deploy","icon":"server","pages":[{"title":"Deploy Dify","sidebarTitle":"Overview","mode":"frame","href":"/en/self-host/deploy/overview"},{"group":"Quick Start","icon":"rocket","pages":[{"title":"Deploy Dify with Docker Compose","sidebarTitle":"Docker Compose","href":"/en/self-host/deploy/quick-start/docker-compose"},{"title":"FAQs","href":"/en/self-host/deploy/quick-start/faqs"}]},{"group":"Advanced Deployments","icon":"server","pages":[{"title":"Local Source Code Start","href":"/en/self-host/deploy/advanced-deployments/local-source-code"},{"title":"Start Frontend Docker Container Separately","href":"/en/self-host/deploy/advanced-deployments/start-the-frontend-docker-container"}]},{"group":"Configuration","icon":"gear","pages":[{"title":"Environment Variables","href":"/en/self-host/deploy/configuration/environments"}]},{"group":"Platform Guides","icon":"map","pages":[{"title":"Deploy with aaPanel","href":"/en/self-host/deploy/platform-guides/bt-panel"},{"title":"Dify Premium on AWS","href":"/en/self-host/deploy/platform-guides/dify-premium"}]},{"group":"Troubleshooting","icon":"wrench","pages":[{"title":"Common Issues","href":"/en/self-host/deploy/troubleshooting/common-issues"},{"title":"Docker Issues","href":"/en/self-host/deploy/troubleshooting/docker-issues"},{"title":"Third-Party Integrations","href":"/en/self-host/deploy/troubleshooting/integrations"},{"title":"Storage \u0026 Migration","href":"/en/self-host/deploy/troubleshooting/storage-and-migration"},{"title":"Weaviate Migration Guide upgrading to Client v4 and Server 1.27+","href":"/en/self-host/deploy/troubleshooting/weaviate-v4-migration"},{"title":"Weaviate Server Upgrade Path","href":"/en/self-host/deploy/troubleshooting/weaviate-server-migration-path"}]}]},{"tab":"Use","icon":"book-open","pages":[{"title":"Use Dify","sidebarTitle":"Overview","mode":"frame","href":"/en/self-host/use-dify/getting-started/introduction"},{"group":"Orchestrate","icon":"hammer","pages":[{"group":"Workflow \u0026 Chatflow","expanded":false,"pages":[{"title":"Workflow \u0026 Chatflow","sidebarTitle":"Overview","href":"/en/self-host/use-dify/build/workflow-chatflow"},{"title":"Orchestration Logic","href":"/en/self-host/use-dify/build/orchestrate-node"},{"group":"Nodes","expanded":false,"pages":[{"group":"Start","root":{"title":"Start Node","href":"/en/self-host/use-dify/nodes/start"},"pages":[{"title":"User Input","href":"/en/self-host/use-dify/nodes/user-input"},{"group":"Trigger","root":{"title":"Trigger","sidebarTitle":"Overview","href":"/en/self-host/use-dify/nodes/trigger/overview"},"pages":[{"title":"Schedule Trigger","href":"/en/self-host/use-dify/nodes/trigger/schedule-trigger"},{"title":"Integration Trigger","href":"/en/self-host/use-dify/nodes/trigger/plugin-trigger"},{"title":"Webhook Trigger","href":"/en/self-host/use-dify/nodes/trigger/webhook-trigger"}]}]},{"title":"LLM","href":"/en/self-host/use-dify/nodes/llm"},{"title":"Knowledge Retrieval","href":"/en/self-host/use-dify/nodes/knowledge-retrieval"},{"title":"Answer","href":"/en/self-host/use-dify/nodes/answer"},{"title":"Output","href":"/en/self-host/use-dify/nodes/output"},{"title":"Agent","href":"/en/self-host/use-dify/nodes/agent"},{"title":"Question Classifier","href":"/en/self-host/use-dify/nodes/question-classifier"},{"title":"If-Else","href":"/en/self-host/use-dify/nodes/ifelse"},{"group":"Human Input","root":{"title":"Human Input","href":"/en/self-host/use-dify/nodes/human-input"},"expanded":false,"pages":[]},{"title":"Iteration","href":"/en/self-host/use-dify/nodes/iteration"},{"title":"Loop","href":"/en/self-host/use-dify/nodes/loop"},{"title":"Code","href":"/en/self-host/use-dify/nodes/code"},{"title":"Template","href":"/en/self-host/use-dify/nodes/template"},{"title":"Variable Aggregator","href":"/en/self-host/use-dify/nodes/variable-aggregator"},{"title":"Document Extractor","href":"/en/self-host/use-dify/nodes/doc-extractor"},{"title":"Variable Assigner","href":"/en/self-host/use-dify/nodes/variable-assigner"},{"title":"Parameter Extractor","href":"/en/self-host/use-dify/nodes/parameter-extractor"},{"title":"HTTP Request","href":"/en/self-host/use-dify/nodes/http-request"},{"title":"List Operator","href":"/en/self-host/use-dify/nodes/list-operator"},{"title":"Tool Node","sidebarTitle":"Tool","href":"/en/self-host/use-dify/nodes/tools"}]},{"title":"Hotkeys","href":"/en/self-host/use-dify/build/shortcut-key"},{"title":"Version Control","href":"/en/self-host/use-dify/build/version-control"},{"title":"Snippets","sidebarTitle":"Snippets","href":"/en/self-host/use-dify/build/snippet"},{"title":"Collaborate with Teammates","sidebarTitle":"Collaboration","href":"/en/self-host/use-dify/build/workflow-collaboration"},{"group":"Debug","expanded":false,"pages":[{"title":"Handle Errors","href":"/en/self-host/use-dify/build/predefined-error-handling-logic"},{"title":"Single Node","href":"/en/self-host/use-dify/debug/step-run"},{"title":"Variable Inspector","href":"/en/self-host/use-dify/debug/variable-inspect"},{"title":"Run History","href":"/en/self-host/use-dify/debug/history-and-logs"},{"title":"Error Types","href":"/en/self-host/use-dify/debug/error-type"}]}]},{"group":"Agent","tag":"New","expanded":false,"pages":[{"title":"Agent","sidebarTitle":"Overview","href":"/en/self-host/use-dify/build/new-agent/overview"},{"title":"Build an Agent","sidebarTitle":"Build","href":"/en/self-host/use-dify/build/new-agent/build"}]},{"title":"Skills","sidebarTitle":"Skills","href":"/en/self-host/use-dify/build/skills"},{"group":"Basic Apps","expanded":false,"pages":[{"title":"Agent","tag":"Legacy","href":"/en/self-host/use-dify/build/agent"},{"title":"Chatbot","sidebarTitle":"Chatbot","href":"/en/self-host/use-dify/build/chatbot"},{"title":"Text Generator","sidebarTitle":"Text Generator","href":"/en/self-host/use-dify/build/text-generator"}]},{"title":"App Toolkit","href":"/en/self-host/use-dify/build/additional-features"},{"title":"Go to Anything","href":"/en/self-host/use-dify/build/goto-anything"}]},{"group":"Publish","icon":"paper-plane","expanded":false,"pages":[{"title":"Overview","href":"/en/self-host/use-dify/publish/README"},{"group":"Web App","pages":[{"title":"Workflow Web Apps","href":"/en/self-host/use-dify/publish/webapp/workflow-webapp"},{"title":"Chat Web Apps","href":"/en/self-host/use-dify/publish/webapp/chatflow-webapp"},{"title":"Settings","href":"/en/self-host/use-dify/publish/webapp/web-app-settings"},{"title":"Embed Your Web App","sidebarTitle":"Embeds","href":"/en/self-host/use-dify/publish/webapp/embedding-in-websites"}]},{"title":"MCP Server","href":"/en/self-host/use-dify/publish/publish-mcp"},{"title":"Publish Apps to Marketplace","sidebarTitle":"Marketplace","href":"/en/self-host/use-dify/publish/publish-to-marketplace"}]},{"group":"Monitor","icon":"chart-line","expanded":false,"pages":[{"title":"Dashboard","href":"/en/self-host/use-dify/monitor/analysis"},{"title":"Logs","href":"/en/self-host/use-dify/monitor/logs"},{"title":"Annotation System","href":"/en/self-host/use-dify/monitor/annotation-reply"},{"group":"Integrations","pages":[{"title":"Integrate with LangSmith","sidebarTitle":"LangSmith","href":"/en/self-host/use-dify/monitor/integrations/integrate-langsmith"},{"title":"Integrate with Langfuse","sidebarTitle":"Langfuse","href":"/en/self-host/use-dify/monitor/integrations/integrate-langfuse"},{"title":"Integrate with Opik","sidebarTitle":"Opik","href":"/en/self-host/use-dify/monitor/integrations/integrate-opik"},{"title":"Integrate with W\u0026B Weave","sidebarTitle":"W\u0026B Weave","href":"/en/self-host/use-dify/monitor/integrations/integrate-weave"},{"title":"Integrate with Arize","sidebarTitle":"Arize","href":"/en/self-host/use-dify/monitor/integrations/integrate-arize"},{"title":"Integrate with Phoenix","sidebarTitle":"Phoenix","href":"/en/self-host/use-dify/monitor/integrations/integrate-phoenix"},{"title":"Integrate with Alibaba Cloud Monitor","sidebarTitle":"Alibaba Cloud Monitor","href":"/en/self-host/use-dify/monitor/integrations/integrate-aliyun"}]}]},{"group":"Knowledge","icon":"book","expanded":false,"pages":[{"title":"Knowledge","sidebarTitle":"Overview","href":"/en/self-host/use-dify/knowledge/readme"},{"group":"Create","pages":[{"group":"Ready-to-Use Knowledge Base","pages":[{"title":"Create a Ready-to-Use Knowledge Base","sidebarTitle":"Overview","href":"/en/self-host/use-dify/knowledge/create-knowledge/introduction"},{"group":"Import Data","pages":[{"title":"Upload Local Files","href":"/en/self-host/use-dify/knowledge/create-knowledge/import-text-data/readme"},{"title":"Sync Data from Notion","href":"/en/self-host/use-dify/knowledge/create-knowledge/import-text-data/sync-from-notion"},{"title":"Import Data from Website","href":"/en/self-host/use-dify/knowledge/create-knowledge/import-text-data/sync-from-website"}]},{"title":"Configure the Chunk Settings","href":"/en/self-host/use-dify/knowledge/create-knowledge/chunking-and-cleaning-text"},{"title":"Specify the Index Method and Retrieval Settings","href":"/en/self-host/use-dify/knowledge/create-knowledge/setting-indexing-methods"}]},{"group":"Custom Knowledge Base","pages":[{"title":"Build a Custom Knowledge Base","sidebarTitle":"Overview","href":"/en/self-host/use-dify/knowledge/knowledge-pipeline/readme"},{"title":"Step 1: Create Knowledge Pipeline","href":"/en/self-host/use-dify/knowledge/knowledge-pipeline/create-knowledge-pipeline"},{"title":"Step 2: Orchestrate Knowledge Pipeline","href":"/en/self-host/use-dify/knowledge/knowledge-pipeline/knowledge-pipeline-orchestration"},{"title":"Step 3: Publish Knowledge Pipeline","href":"/en/self-host/use-dify/knowledge/knowledge-pipeline/publish-knowledge-pipeline"},{"title":"Step 4: Upload Files","href":"/en/self-host/use-dify/knowledge/knowledge-pipeline/upload-files"},{"title":"Step 5: Manage and Use Knowledge Base","href":"/en/self-host/use-dify/knowledge/knowledge-pipeline/manage-knowledge-base"},{"title":"Authorize Data Source","href":"/en/self-host/use-dify/knowledge/knowledge-pipeline/authorize-data-source"}]},{"group":"Connect to External Knowledge","pages":[{"title":"Connect to External Knowledge Base","sidebarTitle":"Overview","href":"/en/self-host/use-dify/knowledge/connect-external-knowledge-base"},{"title":"External Knowledge API","href":"/en/self-host/use-dify/knowledge/external-knowledge-api"}]}]},{"group":"Manage","pages":[{"title":"Manage Knowledge Content","sidebarTitle":"Documents \u0026 Chunks","href":"/en/self-host/use-dify/knowledge/manage-knowledge/maintain-knowledge-documents"},{"title":"Manage Document Metadata","sidebarTitle":"Metadata","href":"/en/self-host/use-dify/knowledge/metadata"},{"title":"Manage Knowledge Settings","sidebarTitle":"Settings","href":"/en/self-host/use-dify/knowledge/manage-knowledge/introduction"}]},{"title":"Test Knowledge Retrieval","sidebarTitle":"Test Retrieval","href":"/en/self-host/use-dify/knowledge/test-retrieval"},{"title":"Integrate Knowledge within Apps","sidebarTitle":"Integrate in Apps","href":"/en/self-host/use-dify/knowledge/integrate-knowledge-within-application"}]},{"group":"Integrations","icon":"plug","expanded":false,"pages":[{"title":"Integrations","sidebarTitle":"Overview","href":"/en/self-host/use-dify/workspace/plugins"},{"title":"Model Providers","href":"/en/self-host/use-dify/workspace/model-providers"},{"title":"Dify Tools","sidebarTitle":"Tools","href":"/en/self-host/use-dify/workspace/tools"},{"group":"Custom Endpoint","pages":[{"title":"Custom Endpoints","sidebarTitle":"Overview","href":"/en/self-host/use-dify/workspace/api-extension/api-extension"},{"title":"External Data Tool","href":"/en/self-host/use-dify/workspace/api-extension/external-data-tool-api-extension"},{"title":"Sensitive Content Moderation","href":"/en/self-host/use-dify/workspace/api-extension/moderation-api-extension"},{"title":"Deploy Custom Endpoints Using Cloudflare Workers","href":"/en/self-host/use-dify/workspace/api-extension/cloudflare-worker"}]}]},{"group":"Workspace","icon":"briefcase","expanded":false,"pages":[{"title":"Overview","href":"/en/self-host/use-dify/workspace/readme"},{"title":"Export and Import Apps","sidebarTitle":"Export and Import","href":"/en/self-host/use-dify/workspace/export-import-apps"},{"title":"Manage Members","href":"/en/self-host/use-dify/workspace/team-members-management"},{"title":"Personal Settings","href":"/en/self-host/use-dify/workspace/personal-account-management"}]}]},{"tab":"Learn","icon":"graduation-cap","pages":[{"title":"Key Concepts","href":"/en/learn/key-concepts"},{"group":"Tutorials","pages":[{"title":"30-Minute Quick Start","href":"/en/quick-start"},{"group":"Workflow 101","pages":[{"title":"Lesson 1: What is a Workflow?","href":"/en/learn/tutorials/workflow-101/lesson-01"},{"title":"Lesson 2: Head and Tail (Start \u0026 Output Node)","sidebarTitle":"Lesson 2: Head and Tail","href":"/en/learn/tutorials/workflow-101/lesson-02"},{"title":"Lesson 3: The Brain of the Workflow (LLM Node)","sidebarTitle":"Lesson 3: The Brain of the Workflow","href":"/en/learn/tutorials/workflow-101/lesson-03"},{"title":"Lesson 4: The Cheat Sheet (Knowledge Retrieval)","sidebarTitle":"Lesson 4: The Cheat Sheet","href":"/en/learn/tutorials/workflow-101/lesson-04"},{"title":"Lesson 5: The Crossroads of Your Workflow (Sorting and Executing)","sidebarTitle":"Lesson 5: The Crossroads of Your Workflow","href":"/en/learn/tutorials/workflow-101/lesson-05"},{"title":"Lesson 6: Handle Multiple Tasks (Parameter Extraction \u0026 Iteration)","sidebarTitle":"Lesson 6: Handle Multiple Tasks","href":"/en/learn/tutorials/workflow-101/lesson-06"},{"title":"Lesson 7: Enhance Workflows (Tools)","sidebarTitle":"Lesson 7: Enhance Workflows","href":"/en/learn/tutorials/workflow-101/lesson-07"},{"title":"Lesson 8: The Agent Node","sidebarTitle":"Lesson 8: The Agent Node","href":"/en/learn/tutorials/workflow-101/lesson-08"},{"title":"Lesson 9: Layout Designer (Template)","sidebarTitle":"Lesson 9: Layout Designer","href":"/en/learn/tutorials/workflow-101/lesson-09"},{"title":"Lesson 10: Publish and Monitor Your AI App","sidebarTitle":"Lesson 10: Publish and Monitor","href":"/en/learn/tutorials/workflow-101/lesson-10"}]},{"title":"Simple Chatbot","href":"/en/learn/tutorials/simple-chatbot"},{"title":"Twitter Account Analyzer","href":"/en/learn/tutorials/twitter-chatflow"},{"title":"Customer Service Bot With Knowledge Base","href":"/en/learn/tutorials/customer-service-bot"},{"title":"AI Image Generation App","href":"/en/learn/tutorials/build-ai-image-generation-app"},{"title":"Article Reader Using File Upload","href":"/en/learn/tutorials/article-reader"}]}]},{"tab":"Developer Resources","icon":"code","menu":[{"item":"API","icon":"code","groups":[{"group":"Guides","pages":[{"title":"Get Started with the Dify API","sidebarTitle":"Get Started","href":"/en/api-reference/guides/get-started"},{"group":"API Overviews","expanded":true,"pages":[{"title":"Chatflow App API","sidebarTitle":"Chatflow","href":"/en/api-reference/guides/chatflow"},{"title":"Workflow App API","sidebarTitle":"Workflow","href":"/en/api-reference/guides/workflow"},{"title":"Agent API","sidebarTitle":"Agent","tag":"New","href":"/en/api-reference/guides/agent"},{"title":"Knowledge API","sidebarTitle":"Knowledge","href":"/en/api-reference/guides/knowledge"},{"title":"Chat App API","sidebarTitle":"Chatbot and Legacy Agent","href":"/en/api-reference/guides/chat"},{"title":"Completion App API","sidebarTitle":"Text Generator","href":"/en/api-reference/guides/completion"}]},{"title":"Consume Streaming Responses","sidebarTitle":"SSE Streaming","href":"/en/api-reference/guides/streaming"},{"title":"Human Input API Integration Flow","sidebarTitle":"Human Input Flow","href":"/en/api-reference/guides/human-input-flow"},{"title":"End User Identity","sidebarTitle":"End User Identity","href":"/en/api-reference/guides/end-user-identity"},{"title":"Handle Errors and Rate Limits","sidebarTitle":"Errors \u0026 Rate Limits","href":"/en/api-reference/guides/errors"}]},{"group":"App APIs","pages":[{"group":"Chat Messages","pages":[{"title":"Send Chat Message","deprecated":null,"version":null,"sidebarTitle":"Send Chat Message","openapi":"/en/api-reference/openapi_service.json post /chat-messages","href":"/en/api-reference/chat-messages/send-chat-message"},{"title":"Stop Chat Message Generation","deprecated":null,"version":null,"sidebarTitle":"Stop Chat Message Generation","openapi":"/en/api-reference/openapi_service.json post /chat-messages/{task_id}/stop","href":"/en/api-reference/chat-messages/stop-chat-message-generation"},{"title":"Get Next Suggested Questions","deprecated":null,"version":null,"sidebarTitle":"Get Next Suggested Questions","openapi":"/en/api-reference/openapi_service.json get /messages/{message_id}/suggested","href":"/en/api-reference/chat-messages/get-next-suggested-questions"}]},{"group":"Completion Messages","pages":[{"title":"Send Completion Message","deprecated":null,"version":null,"sidebarTitle":"Send Completion Message","openapi":"/en/api-reference/openapi_service.json post /completion-messages","href":"/en/api-reference/completion-messages/send-completion-message"},{"title":"Stop Completion Message Generation","deprecated":null,"version":null,"sidebarTitle":"Stop Completion Message Generation","openapi":"/en/api-reference/openapi_service.json post /completion-messages/{task_id}/stop","href":"/en/api-reference/completion-messages/stop-completion-message-generation"}]},{"group":"Workflow Runs","pages":[{"title":"Run Workflow","deprecated":null,"version":null,"sidebarTitle":"Run Workflow","openapi":"/en/api-reference/openapi_service.json post /workflows/run","href":"/en/api-reference/workflow-runs/run-workflow"},{"title":"Run Workflow by ID","deprecated":null,"version":null,"sidebarTitle":"Run Workflow by ID","openapi":"/en/api-reference/openapi_service.json post /workflows/{workflow_id}/run","href":"/en/api-reference/workflow-runs/run-workflow-by-id"},{"title":"Stop Workflow Task","deprecated":null,"version":null,"sidebarTitle":"Stop Workflow Task","openapi":"/en/api-reference/openapi_service.json post /workflows/tasks/{task_id}/stop","href":"/en/api-reference/workflow-runs/stop-workflow-task"},{"title":"Get Workflow Run Detail","deprecated":null,"version":null,"sidebarTitle":"Get Workflow Run Detail","openapi":"/en/api-reference/openapi_service.json get /workflows/run/{workflow_run_id}","href":"/en/api-reference/workflow-runs/get-workflow-run-detail"},{"title":"List Workflow Logs","deprecated":null,"version":null,"sidebarTitle":"List Workflow Logs","openapi":"/en/api-reference/openapi_service.json get /workflows/logs","href":"/en/api-reference/workflow-runs/list-workflow-logs"},{"title":"Stream Workflow Events","deprecated":null,"version":null,"sidebarTitle":"Stream Workflow Events","openapi":"/en/api-reference/openapi_service.json get /workflow/{workflow_run_id}/events","href":"/en/api-reference/workflow-runs/stream-workflow-events"}]},{"group":"Conversations","pages":[{"title":"List Conversations","deprecated":null,"version":null,"sidebarTitle":"List Conversations","openapi":"/en/api-reference/openapi_service.json get /conversations","href":"/en/api-reference/conversations/list-conversations"},{"title":"List Conversation Messages","deprecated":null,"version":null,"sidebarTitle":"List Conversation Messages","openapi":"/en/api-reference/openapi_service.json get /messages","href":"/en/api-reference/conversations/list-conversation-messages"},{"title":"List Conversation Variables","deprecated":null,"version":null,"sidebarTitle":"List Conversation Variables","openapi":"/en/api-reference/openapi_service.json get /conversations/{conversation_id}/variables","href":"/en/api-reference/conversations/list-conversation-variables"},{"title":"Rename Conversation","deprecated":null,"version":null,"sidebarTitle":"Rename Conversation","openapi":"/en/api-reference/openapi_service.json post /conversations/{conversation_id}/name","href":"/en/api-reference/conversations/rename-conversation"},{"title":"Update Conversation Variable","deprecated":null,"version":null,"sidebarTitle":"Update Conversation Variable","openapi":"/en/api-reference/openapi_service.json put /conversations/{conversation_id}/variables/{variable_id}","href":"/en/api-reference/conversations/update-conversation-variable"},{"title":"Delete Conversation","deprecated":null,"version":null,"sidebarTitle":"Delete Conversation","openapi":"/en/api-reference/openapi_service.json delete /conversations/{conversation_id}","href":"/en/api-reference/conversations/delete-conversation"}]},{"group":"Files","pages":[{"title":"Upload File","deprecated":null,"version":null,"sidebarTitle":"Upload File","openapi":"/en/api-reference/openapi_service.json post /files/upload","href":"/en/api-reference/files/upload-file"},{"title":"Download File","deprecated":null,"version":null,"sidebarTitle":"Download File","openapi":"/en/api-reference/openapi_service.json get /files/{file_id}/preview","href":"/en/api-reference/files/download-file"}]},{"group":"Audio","pages":[{"title":"Convert Audio to Text","deprecated":null,"version":null,"sidebarTitle":"Convert Audio to Text","openapi":"/en/api-reference/openapi_service.json post /audio-to-text","href":"/en/api-reference/audio/convert-audio-to-text"},{"title":"Convert Text to Audio","deprecated":null,"version":null,"sidebarTitle":"Convert Text to Audio","openapi":"/en/api-reference/openapi_service.json post /text-to-audio","href":"/en/api-reference/audio/convert-text-to-audio"}]},{"group":"Applications","pages":[{"title":"Get App Info","deprecated":null,"version":null,"sidebarTitle":"Get App Info","openapi":"/en/api-reference/openapi_service.json get /info","href":"/en/api-reference/applications/get-app-info"},{"title":"Get App Parameters","deprecated":null,"version":null,"sidebarTitle":"Get App Parameters","openapi":"/en/api-reference/openapi_service.json get /parameters","href":"/en/api-reference/applications/get-app-parameters"},{"title":"Get App Meta","deprecated":null,"version":null,"sidebarTitle":"Get App Meta","openapi":"/en/api-reference/openapi_service.json get /meta","href":"/en/api-reference/applications/get-app-meta"},{"title":"Get App WebApp Settings","deprecated":null,"version":null,"sidebarTitle":"Get App WebApp Settings","openapi":"/en/api-reference/openapi_service.json get /site","href":"/en/api-reference/applications/get-app-webapp-settings"}]},{"group":"Feedback","pages":[{"title":"Submit Message Feedback","deprecated":null,"version":null,"sidebarTitle":"Submit Message Feedback","openapi":"/en/api-reference/openapi_service.json post /messages/{message_id}/feedbacks","href":"/en/api-reference/feedback/submit-message-feedback"},{"title":"List App Feedbacks","deprecated":null,"version":null,"sidebarTitle":"List App Feedbacks","openapi":"/en/api-reference/openapi_service.json get /app/feedbacks","href":"/en/api-reference/feedback/list-app-feedbacks"}]},{"group":"Annotations","pages":[{"title":"Create Annotation","deprecated":null,"version":null,"sidebarTitle":"Create Annotation","openapi":"/en/api-reference/openapi_service.json post /apps/annotations","href":"/en/api-reference/annotations/create-annotation"},{"title":"List Annotations","deprecated":null,"version":null,"sidebarTitle":"List Annotations","openapi":"/en/api-reference/openapi_service.json get /apps/annotations","href":"/en/api-reference/annotations/list-annotations"},{"title":"Update Annotation","deprecated":null,"version":null,"sidebarTitle":"Update Annotation","openapi":"/en/api-reference/openapi_service.json put /apps/annotations/{annotation_id}","href":"/en/api-reference/annotations/update-annotation"},{"title":"Delete Annotation","deprecated":null,"version":null,"sidebarTitle":"Delete Annotation","openapi":"/en/api-reference/openapi_service.json delete /apps/annotations/{annotation_id}","href":"/en/api-reference/annotations/delete-annotation"},{"title":"Configure Annotation Reply","deprecated":null,"version":null,"sidebarTitle":"Configure Annotation Reply","openapi":"/en/api-reference/openapi_service.json post /apps/annotation-reply/{action}","href":"/en/api-reference/annotations/configure-annotation-reply"},{"title":"Get Annotation Reply Job Status","deprecated":null,"version":null,"sidebarTitle":"Get Annotation Reply Job Status","openapi":"/en/api-reference/openapi_service.json get /apps/annotation-reply/{action}/status/{job_id}","href":"/en/api-reference/annotations/get-annotation-reply-job-status"}]},{"group":"End Users","pages":[{"title":"Get End User Info","deprecated":null,"version":null,"sidebarTitle":"Get End User Info","openapi":"/en/api-reference/openapi_service.json get /end-users/{end_user_id}","href":"/en/api-reference/end-users/get-end-user-info"}]},{"group":"Human Input","pages":[{"title":"Get Human Input Form","deprecated":null,"version":null,"sidebarTitle":"Get Human Input Form","openapi":"/en/api-reference/openapi_service.json get /form/human_input/{form_token}","href":"/en/api-reference/human-input/get-human-input-form"},{"title":"Submit Human Input Form","deprecated":null,"version":null,"sidebarTitle":"Submit Human Input Form","openapi":"/en/api-reference/openapi_service.json post /form/human_input/{form_token}","href":"/en/api-reference/human-input/submit-human-input-form"}]}]},{"group":"Knowledge APIs","pages":[{"group":"Knowledge Bases","pages":[{"title":"Create an Empty Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Create an Empty Knowledge Base","openapi":"/en/api-reference/openapi_service.json post /datasets","href":"/en/api-reference/knowledge-bases/create-an-empty-knowledge-base"},{"title":"List Knowledge Bases","deprecated":null,"version":null,"sidebarTitle":"List Knowledge Bases","openapi":"/en/api-reference/openapi_service.json get /datasets","href":"/en/api-reference/knowledge-bases/list-knowledge-bases"},{"title":"Get Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Get Knowledge Base","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}","href":"/en/api-reference/knowledge-bases/get-knowledge-base"},{"title":"Update Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Update Knowledge Base","openapi":"/en/api-reference/openapi_service.json patch /datasets/{dataset_id}","href":"/en/api-reference/knowledge-bases/update-knowledge-base"},{"title":"Delete Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Delete Knowledge Base","openapi":"/en/api-reference/openapi_service.json delete /datasets/{dataset_id}","href":"/en/api-reference/knowledge-bases/delete-knowledge-base"},{"title":"Retrieve Chunks from a Knowledge Base / Test Retrieval","deprecated":null,"version":null,"sidebarTitle":"Retrieve Chunks from a Knowledge Base / Test Retrieval","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/retrieve","href":"/en/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval"}]},{"group":"Documents","pages":[{"title":"Create Document by Text","deprecated":null,"version":null,"sidebarTitle":"Create Document by Text","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/document/create-by-text","href":"/en/api-reference/documents/create-document-by-text"},{"title":"Create Document by File","deprecated":null,"version":null,"sidebarTitle":"Create Document by File","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/document/create-by-file","href":"/en/api-reference/documents/create-document-by-file"},{"title":"List Documents","deprecated":null,"version":null,"sidebarTitle":"List Documents","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents","href":"/en/api-reference/documents/list-documents"},{"title":"Get Document","deprecated":null,"version":null,"sidebarTitle":"Get Document","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}","href":"/en/api-reference/documents/get-document"},{"title":"Delete Document","deprecated":null,"version":null,"sidebarTitle":"Delete Document","openapi":"/en/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}","href":"/en/api-reference/documents/delete-document"},{"title":"Update Document","deprecated":null,"version":null,"sidebarTitle":"Update Document","openapi":"/en/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/{document_id}","href":"/en/api-reference/documents/update-document"},{"title":"Download Document","deprecated":null,"version":null,"sidebarTitle":"Download Document","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/download","href":"/en/api-reference/documents/download-document"},{"title":"Get Document Indexing Status","deprecated":null,"version":null,"sidebarTitle":"Get Document Indexing Status","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{batch}/indexing-status","href":"/en/api-reference/documents/get-document-indexing-status"},{"title":"Update Document by Text","deprecated":null,"version":null,"sidebarTitle":"Update Document by Text","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-text","href":"/en/api-reference/documents/update-document-by-text"},{"title":"Update Document by File","deprecated":true,"version":null,"sidebarTitle":"Update Document by File","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-file","href":"/en/api-reference/documents/update-document-by-file"},{"title":"Download Documents as ZIP","deprecated":null,"version":null,"sidebarTitle":"Download Documents as ZIP","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/download-zip","href":"/en/api-reference/documents/download-documents-as-zip"},{"title":"Update Document Status in Batch","deprecated":null,"version":null,"sidebarTitle":"Update Document Status in Batch","openapi":"/en/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/status/{action}","href":"/en/api-reference/documents/update-document-status-in-batch"}]},{"group":"Chunks","pages":[{"title":"Create Chunks","deprecated":null,"version":null,"sidebarTitle":"Create Chunks","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments","href":"/en/api-reference/chunks/create-chunks"},{"title":"List Chunks","deprecated":null,"version":null,"sidebarTitle":"List Chunks","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments","href":"/en/api-reference/chunks/list-chunks"},{"title":"Get Chunk","deprecated":null,"version":null,"sidebarTitle":"Get Chunk","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/en/api-reference/chunks/get-chunk"},{"title":"Update Chunk","deprecated":null,"version":null,"sidebarTitle":"Update Chunk","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/en/api-reference/chunks/update-chunk"},{"title":"Delete Chunk","deprecated":null,"version":null,"sidebarTitle":"Delete Chunk","openapi":"/en/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/en/api-reference/chunks/delete-chunk"},{"title":"Create Child Chunk","deprecated":null,"version":null,"sidebarTitle":"Create Child Chunk","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks","href":"/en/api-reference/chunks/create-child-chunk"},{"title":"List Child Chunks","deprecated":null,"version":null,"sidebarTitle":"List Child Chunks","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks","href":"/en/api-reference/chunks/list-child-chunks"},{"title":"Update Child Chunk","deprecated":null,"version":null,"sidebarTitle":"Update Child Chunk","openapi":"/en/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}","href":"/en/api-reference/chunks/update-child-chunk"},{"title":"Delete Child Chunk","deprecated":null,"version":null,"sidebarTitle":"Delete Child Chunk","openapi":"/en/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}","href":"/en/api-reference/chunks/delete-child-chunk"}]},{"group":"Metadata","pages":[{"title":"Create Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Create Metadata Field","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/metadata","href":"/en/api-reference/metadata/create-metadata-field"},{"title":"List Metadata Fields","deprecated":null,"version":null,"sidebarTitle":"List Metadata Fields","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/metadata","href":"/en/api-reference/metadata/list-metadata-fields"},{"title":"Update Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Update Metadata Field","openapi":"/en/api-reference/openapi_service.json patch /datasets/{dataset_id}/metadata/{metadata_id}","href":"/en/api-reference/metadata/update-metadata-field"},{"title":"Delete Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Delete Metadata Field","openapi":"/en/api-reference/openapi_service.json delete /datasets/{dataset_id}/metadata/{metadata_id}","href":"/en/api-reference/metadata/delete-metadata-field"},{"title":"Get Built-in Metadata Fields","deprecated":null,"version":null,"sidebarTitle":"Get Built-in Metadata Fields","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/metadata/built-in","href":"/en/api-reference/metadata/get-built-in-metadata-fields"},{"title":"Update Built-in Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Update Built-in Metadata Field","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/metadata/built-in/{action}","href":"/en/api-reference/metadata/update-built-in-metadata-field"},{"title":"Update Document Metadata in Batch","deprecated":null,"version":null,"sidebarTitle":"Update Document Metadata in Batch","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/metadata","href":"/en/api-reference/metadata/update-document-metadata-in-batch"}]},{"group":"Tags","pages":[{"title":"Create Knowledge Tag","deprecated":null,"version":null,"sidebarTitle":"Create Knowledge Tag","openapi":"/en/api-reference/openapi_service.json post /datasets/tags","href":"/en/api-reference/tags/create-knowledge-tag"},{"title":"List Knowledge Tags","deprecated":null,"version":null,"sidebarTitle":"List Knowledge Tags","openapi":"/en/api-reference/openapi_service.json get /datasets/tags","href":"/en/api-reference/tags/list-knowledge-tags"},{"title":"Update Knowledge Tag","deprecated":null,"version":null,"sidebarTitle":"Update Knowledge Tag","openapi":"/en/api-reference/openapi_service.json patch /datasets/tags","href":"/en/api-reference/tags/update-knowledge-tag"},{"title":"Delete Knowledge Tag","deprecated":null,"version":null,"sidebarTitle":"Delete Knowledge Tag","openapi":"/en/api-reference/openapi_service.json delete /datasets/tags","href":"/en/api-reference/tags/delete-knowledge-tag"},{"title":"Create Tag Binding","deprecated":null,"version":null,"sidebarTitle":"Create Tag Binding","openapi":"/en/api-reference/openapi_service.json post /datasets/tags/binding","href":"/en/api-reference/tags/create-tag-binding"},{"title":"Delete Tag Binding","deprecated":null,"version":null,"sidebarTitle":"Delete Tag Binding","openapi":"/en/api-reference/openapi_service.json post /datasets/tags/unbinding","href":"/en/api-reference/tags/delete-tag-binding"},{"title":"Get Knowledge Base Tags","deprecated":null,"version":null,"sidebarTitle":"Get Knowledge Base Tags","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/tags","href":"/en/api-reference/tags/get-knowledge-base-tags"}]},{"group":"Models","pages":[{"title":"Get Available Models","deprecated":null,"version":null,"sidebarTitle":"Get Available Models","openapi":"/en/api-reference/openapi_service.json get /workspaces/current/models/model-types/{model_type}","href":"/en/api-reference/models/get-available-models"}]},{"group":"Knowledge Pipeline","pages":[{"title":"Upload Pipeline File","deprecated":null,"version":null,"sidebarTitle":"Upload Pipeline File","openapi":"/en/api-reference/openapi_service.json post /datasets/pipeline/file-upload","href":"/en/api-reference/knowledge-pipeline/upload-pipeline-file"},{"title":"List Datasource Plugins","deprecated":null,"version":null,"sidebarTitle":"List Datasource Plugins","openapi":"/en/api-reference/openapi_service.json get /datasets/{dataset_id}/pipeline/datasource-plugins","href":"/en/api-reference/knowledge-pipeline/list-datasource-plugins"},{"title":"Run Datasource Node","deprecated":null,"version":null,"sidebarTitle":"Run Datasource Node","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run","href":"/en/api-reference/knowledge-pipeline/run-datasource-node"},{"title":"Run Pipeline","deprecated":null,"version":null,"sidebarTitle":"Run Pipeline","openapi":"/en/api-reference/openapi_service.json post /datasets/{dataset_id}/pipeline/run","href":"/en/api-reference/knowledge-pipeline/run-pipeline"}]}]}]},{"item":"CLI","icon":"terminal","groups":[{"group":" ","expanded":true,"pages":[{"title":"Overview","href":"/en/cli/overview"},{"title":"Get Started","href":"/en/cli/get-started"},{"title":"Find and Run Commands","href":"/en/cli/find-and-run-commands"},{"group":"Work with Apps","expanded":true,"pages":[{"title":"Build Apps","sidebarTitle":"Build","href":"/en/cli/build-apps"},{"title":"Run Apps","sidebarTitle":"Run","href":"/en/cli/run-apps"},{"title":"Create and Update Apps from DSL Files","sidebarTitle":"Create or Update from DSL","href":"/en/cli/create-and-update-apps-from-dsl-files"},{"title":"Use `difyctl` in CI and Automation","sidebarTitle":"CI and Automation","href":"/en/cli/scripts-and-ci"}]},{"group":"Manage difyctl","expanded":true,"pages":[{"title":"Manage Your Sign-In","sidebarTitle":"Sign-In and Sessions","href":"/en/cli/manage-sign-in"},{"title":"Update or Uninstall difyctl","sidebarTitle":"Update or Uninstall","href":"/en/cli/update-or-uninstall"},{"title":"Upgrade Across Dify 1.18.0","sidebarTitle":"Upgrade Across 1.18.0","href":"/en/cli/upgrade-across-1-18"}]},{"group":"Reference","expanded":true,"pages":[{"title":"Command Index","href":"/en/cli/reference/command-index"},{"title":"Results, Errors, and Exit Codes","sidebarTitle":"Results and Errors","href":"/en/cli/reference/results-errors-and-exit-codes"},{"title":"Configuration","href":"/en/cli/reference/configuration"}]}]}]},{"item":"Plugins","icon":"code-pull-request","groups":[{"group":"Getting Started","icon":"rocket","pages":[{"title":"Dify Plugin","href":"/en/develop-plugin/getting-started/getting-started-dify-plugin"},{"title":"Choose a Plugin Type","href":"/en/develop-plugin/getting-started/choose-plugin-type"},{"title":"Dify Plugin CLI","href":"/en/develop-plugin/getting-started/cli"}]},{"group":"Features \u0026 Specs","icon":"list-check","pages":[{"group":"Plugin Types","pages":[{"title":"General Specs","href":"/en/develop-plugin/features-and-specs/plugin-types/general-specifications"},{"title":"Model Specs","href":"/en/develop-plugin/features-and-specs/plugin-types/model-designing-rules"},{"title":"Model API Interface","href":"/en/develop-plugin/features-and-specs/plugin-types/model-schema"},{"title":"Persistent Storage","href":"/en/develop-plugin/features-and-specs/plugin-types/persistent-storage-kv"},{"title":"Tool Return","href":"/en/develop-plugin/features-and-specs/plugin-types/tool"},{"title":"Manifest","href":"/en/develop-plugin/features-and-specs/plugin-types/plugin-info-by-manifest"},{"title":"Multilingual README","href":"/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme"},{"title":"Plugin Debugging","href":"/en/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin"},{"title":"Plugin Logging","href":"/en/develop-plugin/features-and-specs/plugin-types/plugin-logging"}]},{"group":"Advanced Development","pages":[{"group":"Reverse Calling","pages":[{"title":"Bundle Plugin Package","href":"/en/develop-plugin/features-and-specs/advanced-development/bundle"},{"title":"Reverse Invocation of Dify Services","href":"/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation"},{"title":"App","href":"/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation-app"},{"title":"Reverse Invocation Model","href":"/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation-model"},{"title":"Tool","href":"/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation-tool"},{"title":"Integrate Custom Models","href":"/en/develop-plugin/features-and-specs/advanced-development/customizable-model"},{"title":"Node","href":"/en/develop-plugin/features-and-specs/advanced-development/reverse-invocation-node"}]}]}]},{"group":"Development Guides \u0026 Walkthroughs","icon":"code","pages":[{"title":"Cheatsheet","href":"/en/develop-plugin/dev-guides-and-walkthroughs/cheatsheet"},{"group":"By Plugin Type","pages":[{"title":"Tool Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/tool-plugin"},{"title":"Tool OAuth","href":"/en/develop-plugin/dev-guides-and-walkthroughs/tool-oauth"},{"title":"Model Provider Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/creating-new-model-provider"},{"title":"Agent Strategy Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/agent-strategy-plugin"},{"title":"Data Source Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/datasource-plugin"},{"title":"Trigger Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin"},{"title":"Endpoint Plugin","href":"/en/develop-plugin/dev-guides-and-walkthroughs/endpoint"}]},{"group":"Full Walkthroughs","pages":[{"title":"Flomo Tool (10-min)","href":"/en/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin"},{"title":"Slack Bot","href":"/en/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin"},{"title":"Markdown Exporter","href":"/en/develop-plugin/dev-guides-and-walkthroughs/develop-md-exporter"},{"title":"Multimodal Tool","href":"/en/develop-plugin/dev-guides-and-walkthroughs/develop-multimodal-data-processing-tool"}]}]},{"group":"Publishing","icon":"upload","pages":[{"title":"Publish Plugins","href":"/en/develop-plugin/publishing/marketplace-listing/release-overview"},{"group":"Standards","pages":[{"title":"Plugin Development Guidelines","href":"/en/develop-plugin/publishing/standards/contributor-covenant-code-of-conduct"},{"title":"Privacy Guidelines","href":"/en/develop-plugin/publishing/standards/privacy-protection-guidelines"}]},{"title":"Publish a Plugin to Marketplace","sidebarTitle":"Marketplace","href":"/en/develop-plugin/publishing/marketplace-listing/submit-plugin-to-marketplace"},{"group":"GitHub Repository","pages":[{"title":"Publish to Individual GitHub Repository","href":"/en/develop-plugin/publishing/marketplace-listing/release-to-individual-github-repo"}]},{"group":"Local File","pages":[{"title":"Package as Local File and Share","href":"/en/develop-plugin/publishing/marketplace-listing/release-by-file"},{"title":"Sign Plugins for Third-Party Signature Verification","href":"/en/develop-plugin/publishing/standards/third-party-signature-verification"}]},{"title":"Frequently Asked Questions","sidebarTitle":"FAQ","href":"/en/develop-plugin/publishing/faq/faq"}]}]}]}]}]},{"language":"zh","products":[{"product":"Cloud","icon":"cloud","tabs":[{"tab":"使用","icon":"book-open","pages":[{"title":"使用","href":"/zh/cloud/use-dify/getting-started/introduction"}]},{"tab":"学习","icon":"graduation-cap","pages":[{"title":"学习","href":"/zh/learn/key-concepts"}]},{"tab":"开发者资源","icon":"code","menu":[{"item":"API","icon":"code","pages":[{"title":"API","href":"/zh/api-reference/guides/get-started"}]},{"item":"CLI","icon":"terminal","pages":[{"title":"CLI","href":"/zh/cloud/cli/overview"}]},{"item":"插件开发","icon":"code-pull-request","groups":[{"group":"快速开始","icon":"rocket","pages":[{"title":"Dify 插件","href":"/zh/develop-plugin/getting-started/getting-started-dify-plugin"},{"title":"选择插件类型","href":"/zh/develop-plugin/getting-started/choose-plugin-type"},{"title":"Dify 插件 CLI","href":"/zh/develop-plugin/getting-started/cli"}]},{"group":"特性与规范","icon":"list-check","pages":[{"group":"插件类型","pages":[{"title":"通用规范","href":"/zh/develop-plugin/features-and-specs/plugin-types/general-specifications"},{"title":"模型规范","href":"/zh/develop-plugin/features-and-specs/plugin-types/model-designing-rules"},{"title":"模型 API 接口","href":"/zh/develop-plugin/features-and-specs/plugin-types/model-schema"},{"title":"持久化存储","href":"/zh/develop-plugin/features-and-specs/plugin-types/persistent-storage-kv"},{"title":"工具返回","href":"/zh/develop-plugin/features-and-specs/plugin-types/tool"},{"title":"Manifest","href":"/zh/develop-plugin/features-and-specs/plugin-types/plugin-info-by-manifest"},{"title":"多语言 README","href":"/zh/develop-plugin/features-and-specs/plugin-types/multilingual-readme"},{"title":"插件调试","href":"/zh/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin"},{"title":"输出插件日志","href":"/zh/develop-plugin/features-and-specs/plugin-types/plugin-logging"}]},{"group":"高级开发","pages":[{"group":"反向调用","pages":[{"title":"Bundle 插件包","href":"/zh/develop-plugin/features-and-specs/advanced-development/bundle"},{"title":"Dify 服务的反向调用","href":"/zh/develop-plugin/features-and-specs/advanced-development/reverse-invocation"},{"title":"应用","href":"/zh/develop-plugin/features-and-specs/advanced-development/reverse-invocation-app"},{"title":"反向调用模型","href":"/zh/develop-plugin/features-and-specs/advanced-development/reverse-invocation-model"},{"title":"工具","href":"/zh/develop-plugin/features-and-specs/advanced-development/reverse-invocation-tool"},{"title":"集成自定义模型","href":"/zh/develop-plugin/features-and-specs/advanced-development/customizable-model"},{"title":"节点","href":"/zh/develop-plugin/features-and-specs/advanced-development/reverse-invocation-node"}]}]}]},{"group":"开发指南与示例","icon":"code","pages":[{"title":"速查表","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/cheatsheet"},{"group":"按插件类型","pages":[{"title":"工具插件","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/tool-plugin"},{"title":"Tool OAuth","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/tool-oauth"},{"title":"模型供应商插件","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/creating-new-model-provider"},{"title":"Agent 策略插件","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/agent-strategy-plugin"},{"title":"数据源插件","description":"构建 Dify 1.9.0+ 数据源插件,将文档输入知识库管道","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/datasource-plugin"},{"title":"触发器插件","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin"},{"title":"Endpoint 插件","description":"以 Neko Cat 项目为例,定义、配置并实现 Dify 插件中的 HTTP Endpoint","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/endpoint"}]},{"group":"完整示例","pages":[{"title":"Flomo 工具(10分钟)","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin"},{"title":"Slack Bot","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin"},{"title":"Markdown 导出器","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/develop-md-exporter"},{"title":"多模态工具","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/develop-multimodal-data-processing-tool"}]}]},{"group":"发布","icon":"upload","pages":[{"title":"发布插件","href":"/zh/develop-plugin/publishing/marketplace-listing/release-overview"},{"group":"标准","pages":[{"title":"插件开发指南","href":"/zh/develop-plugin/publishing/standards/contributor-covenant-code-of-conduct"},{"title":"隐私政策指南","href":"/zh/develop-plugin/publishing/standards/privacy-protection-guidelines"}]},{"title":"发布插件到市场","sidebarTitle":"市场","href":"/zh/develop-plugin/publishing/marketplace-listing/submit-plugin-to-marketplace"},{"group":"GitHub 仓库","pages":[{"title":"发布到个人 GitHub 仓库","href":"/zh/develop-plugin/publishing/marketplace-listing/release-to-individual-github-repo"}]},{"group":"本地文件","pages":[{"title":"打包为本地文件并分享","href":"/zh/develop-plugin/publishing/marketplace-listing/release-by-file"},{"title":"为第三方签名验证签署插件","href":"/zh/develop-plugin/publishing/standards/third-party-signature-verification"}]},{"title":"常见问题","sidebarTitle":"常见问题","href":"/zh/develop-plugin/publishing/faq/faq"}]}]}]}]},{"product":"自部署","icon":"server","tabs":[{"tab":"部署","icon":"server","pages":[{"title":"部署","href":"/zh/self-host/deploy/overview"}]},{"tab":"使用","icon":"book-open","pages":[{"title":"使用","href":"/zh/self-host/use-dify/getting-started/introduction"}]},{"tab":"学习","icon":"graduation-cap","pages":[{"title":"学习","href":"/zh/learn/key-concepts"}]},{"tab":"开发者资源","icon":"code","menu":[{"item":"API","icon":"code","pages":[{"title":"API","href":"/zh/api-reference/guides/get-started"}]},{"item":"CLI","icon":"terminal","pages":[{"title":"CLI","href":"/zh/cli/overview"}]},{"item":"插件开发","icon":"code-pull-request","groups":[{"group":"快速开始","icon":"rocket","pages":[{"title":"Dify 插件","href":"/zh/develop-plugin/getting-started/getting-started-dify-plugin"},{"title":"选择插件类型","href":"/zh/develop-plugin/getting-started/choose-plugin-type"},{"title":"Dify 插件 CLI","href":"/zh/develop-plugin/getting-started/cli"}]},{"group":"特性与规范","icon":"list-check","pages":[{"group":"插件类型","pages":[{"title":"通用规范","href":"/zh/develop-plugin/features-and-specs/plugin-types/general-specifications"},{"title":"模型规范","href":"/zh/develop-plugin/features-and-specs/plugin-types/model-designing-rules"},{"title":"模型 API 接口","href":"/zh/develop-plugin/features-and-specs/plugin-types/model-schema"},{"title":"持久化存储","href":"/zh/develop-plugin/features-and-specs/plugin-types/persistent-storage-kv"},{"title":"工具返回","href":"/zh/develop-plugin/features-and-specs/plugin-types/tool"},{"title":"Manifest","href":"/zh/develop-plugin/features-and-specs/plugin-types/plugin-info-by-manifest"},{"title":"多语言 README","href":"/zh/develop-plugin/features-and-specs/plugin-types/multilingual-readme"},{"title":"插件调试","href":"/zh/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin"},{"title":"输出插件日志","href":"/zh/develop-plugin/features-and-specs/plugin-types/plugin-logging"}]},{"group":"高级开发","pages":[{"group":"反向调用","pages":[{"title":"Bundle 插件包","href":"/zh/develop-plugin/features-and-specs/advanced-development/bundle"},{"title":"Dify 服务的反向调用","href":"/zh/develop-plugin/features-and-specs/advanced-development/reverse-invocation"},{"title":"应用","href":"/zh/develop-plugin/features-and-specs/advanced-development/reverse-invocation-app"},{"title":"反向调用模型","href":"/zh/develop-plugin/features-and-specs/advanced-development/reverse-invocation-model"},{"title":"工具","href":"/zh/develop-plugin/features-and-specs/advanced-development/reverse-invocation-tool"},{"title":"集成自定义模型","href":"/zh/develop-plugin/features-and-specs/advanced-development/customizable-model"},{"title":"节点","href":"/zh/develop-plugin/features-and-specs/advanced-development/reverse-invocation-node"}]}]}]},{"group":"开发指南与示例","icon":"code","pages":[{"title":"速查表","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/cheatsheet"},{"group":"按插件类型","pages":[{"title":"工具插件","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/tool-plugin"},{"title":"Tool OAuth","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/tool-oauth"},{"title":"模型供应商插件","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/creating-new-model-provider"},{"title":"Agent 策略插件","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/agent-strategy-plugin"},{"title":"数据源插件","description":"构建 Dify 1.9.0+ 数据源插件,将文档输入知识库管道","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/datasource-plugin"},{"title":"触发器插件","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin"},{"title":"Endpoint 插件","description":"以 Neko Cat 项目为例,定义、配置并实现 Dify 插件中的 HTTP Endpoint","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/endpoint"}]},{"group":"完整示例","pages":[{"title":"Flomo 工具(10分钟)","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin"},{"title":"Slack Bot","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin"},{"title":"Markdown 导出器","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/develop-md-exporter"},{"title":"多模态工具","href":"/zh/develop-plugin/dev-guides-and-walkthroughs/develop-multimodal-data-processing-tool"}]}]},{"group":"发布","icon":"upload","pages":[{"title":"发布插件","href":"/zh/develop-plugin/publishing/marketplace-listing/release-overview"},{"group":"标准","pages":[{"title":"插件开发指南","href":"/zh/develop-plugin/publishing/standards/contributor-covenant-code-of-conduct"},{"title":"隐私政策指南","href":"/zh/develop-plugin/publishing/standards/privacy-protection-guidelines"}]},{"title":"发布插件到市场","sidebarTitle":"市场","href":"/zh/develop-plugin/publishing/marketplace-listing/submit-plugin-to-marketplace"},{"group":"GitHub 仓库","pages":[{"title":"发布到个人 GitHub 仓库","href":"/zh/develop-plugin/publishing/marketplace-listing/release-to-individual-github-repo"}]},{"group":"本地文件","pages":[{"title":"打包为本地文件并分享","href":"/zh/develop-plugin/publishing/marketplace-listing/release-by-file"},{"title":"为第三方签名验证签署插件","href":"/zh/develop-plugin/publishing/standards/third-party-signature-verification"}]},{"title":"常见问题","sidebarTitle":"常见问题","href":"/zh/develop-plugin/publishing/faq/faq"}]}]}]}]}]},{"language":"ja","products":[{"product":"Cloud","icon":"cloud","tabs":[{"tab":"使い方","icon":"book-open","pages":[{"title":"Dify の使い方","sidebarTitle":"概要","mode":"frame","href":"/ja/cloud/use-dify/getting-started/introduction"},{"title":"Dify ドキュメント","mode":"custom","hidden":true,"href":"/ja/home"},{"group":"オーケストレーション","icon":"hammer","pages":[{"group":"Workflow と Chatflow","expanded":false,"pages":[{"title":"Workflow と Chatflow","sidebarTitle":"概要","href":"/ja/cloud/use-dify/build/workflow-chatflow"},{"title":"オーケストレーションロジック","href":"/ja/cloud/use-dify/build/orchestrate-node"},{"group":"ノード","expanded":false,"pages":[{"group":"開始","root":{"title":"開始ノード","href":"/ja/cloud/use-dify/nodes/start"},"pages":[{"title":"ユーザー入力","href":"/ja/cloud/use-dify/nodes/user-input"},{"group":"トリガー","root":{"title":"トリガー","sidebarTitle":"概要","href":"/ja/cloud/use-dify/nodes/trigger/overview"},"pages":[{"title":"スケジュールトリガー","href":"/ja/cloud/use-dify/nodes/trigger/schedule-trigger"},{"title":"インテグレーショントリガー","href":"/ja/cloud/use-dify/nodes/trigger/plugin-trigger"},{"title":"Webhook トリガー","href":"/ja/cloud/use-dify/nodes/trigger/webhook-trigger"}]}]},{"title":"LLM","href":"/ja/cloud/use-dify/nodes/llm"},{"title":"知識検索","href":"/ja/cloud/use-dify/nodes/knowledge-retrieval"},{"title":"答え","href":"/ja/cloud/use-dify/nodes/answer"},{"title":"出力","href":"/ja/cloud/use-dify/nodes/output"},{"title":"Agent","href":"/ja/cloud/use-dify/nodes/agent"},{"title":"質問分類器","href":"/ja/cloud/use-dify/nodes/question-classifier"},{"title":"If-Else","href":"/ja/cloud/use-dify/nodes/ifelse"},{"group":"人間の入力","root":{"title":"人間の入力","href":"/ja/cloud/use-dify/nodes/human-input"},"expanded":false,"pages":[]},{"title":"反復処理","href":"/ja/cloud/use-dify/nodes/iteration"},{"title":"ループ","href":"/ja/cloud/use-dify/nodes/loop"},{"title":"コード","href":"/ja/cloud/use-dify/nodes/code"},{"title":"テンプレート","href":"/ja/cloud/use-dify/nodes/template"},{"title":"変数集約器","href":"/ja/cloud/use-dify/nodes/variable-aggregator"},{"title":"テキスト抽出","href":"/ja/cloud/use-dify/nodes/doc-extractor"},{"title":"変数アサイナー","href":"/ja/cloud/use-dify/nodes/variable-assigner"},{"title":"パラメータ抽出器","href":"/ja/cloud/use-dify/nodes/parameter-extractor"},{"title":"HTTP リクエスト","href":"/ja/cloud/use-dify/nodes/http-request"},{"title":"リスト演算子","href":"/ja/cloud/use-dify/nodes/list-operator"},{"title":"ツールノード","sidebarTitle":"ツール","href":"/ja/cloud/use-dify/nodes/tools"}]},{"title":"ホットキー","href":"/ja/cloud/use-dify/build/shortcut-key"},{"title":"バージョン管理","href":"/ja/cloud/use-dify/build/version-control"},{"title":"スニペット","href":"/ja/cloud/use-dify/build/snippet"},{"group":"デバッグ","expanded":false,"pages":[{"title":"エラーの処理","href":"/ja/cloud/use-dify/build/predefined-error-handling-logic"},{"title":"単一ノード","href":"/ja/cloud/use-dify/debug/step-run"},{"title":"変数インスペクター","href":"/ja/cloud/use-dify/debug/variable-inspect"},{"title":"実行履歴","href":"/ja/cloud/use-dify/debug/history-and-logs"},{"title":"エラータイプ","href":"/ja/cloud/use-dify/debug/error-type"}]}]},{"group":"Agent","tag":"New","expanded":false,"pages":[{"title":"Agent","sidebarTitle":"概要","href":"/ja/cloud/use-dify/build/new-agent/overview"},{"title":"Agent の構築","sidebarTitle":"構築","href":"/ja/cloud/use-dify/build/new-agent/build"}]},{"group":"基本アプリ","expanded":false,"pages":[{"title":"Agent","tag":"Legacy","href":"/ja/cloud/use-dify/build/agent"},{"title":"チャットボット","sidebarTitle":"チャットボット","href":"/ja/cloud/use-dify/build/chatbot"},{"title":"テキストジェネレーター","sidebarTitle":"テキストジェネレーター","href":"/ja/cloud/use-dify/build/text-generator"}]},{"title":"アプリツールキット","href":"/ja/cloud/use-dify/build/additional-features"},{"title":"グローバル検索","href":"/ja/cloud/use-dify/build/goto-anything"}]},{"group":"公開","icon":"paper-plane","expanded":false,"pages":[{"title":"AI アプリの共有","href":"/ja/cloud/use-dify/publish/README"},{"group":"Web アプリ","pages":[{"title":"Workflow Web アプリ","href":"/ja/cloud/use-dify/publish/webapp/workflow-webapp"},{"title":"チャット Web アプリ","href":"/ja/cloud/use-dify/publish/webapp/chatflow-webapp"},{"title":"設定","href":"/ja/cloud/use-dify/publish/webapp/web-app-settings"},{"title":"Web アプリの埋め込み","sidebarTitle":"埋め込み","href":"/ja/cloud/use-dify/publish/webapp/embedding-in-websites"}]},{"title":"MCP サーバー","href":"/ja/cloud/use-dify/publish/publish-mcp"},{"title":"アプリをマーケットプレイスに公開","sidebarTitle":"マーケットプレイス","href":"/ja/cloud/use-dify/publish/publish-to-marketplace"}]},{"group":"モニタリング","icon":"chart-line","expanded":false,"pages":[{"title":"ダッシュボード","href":"/ja/cloud/use-dify/monitor/analysis"},{"title":"ログ","href":"/ja/cloud/use-dify/monitor/logs"},{"title":"注釈システム","href":"/ja/cloud/use-dify/monitor/annotation-reply"},{"group":"インテグレーション","pages":[{"title":"LangSmith の統合","href":"/ja/cloud/use-dify/monitor/integrations/integrate-langsmith"},{"title":"Langfuse の統合","href":"/ja/cloud/use-dify/monitor/integrations/integrate-langfuse"},{"title":"Opik の統合","href":"/ja/cloud/use-dify/monitor/integrations/integrate-opik"},{"title":"W\u0026B Weave の統合","sidebarTitle":"W\u0026B Weave","href":"/ja/cloud/use-dify/monitor/integrations/integrate-weave"},{"title":"Arize の統合","href":"/ja/cloud/use-dify/monitor/integrations/integrate-arize"},{"title":"Phoenix の統合","href":"/ja/cloud/use-dify/monitor/integrations/integrate-phoenix"},{"title":"Alibaba Cloud Monitor の統合","href":"/ja/cloud/use-dify/monitor/integrations/integrate-aliyun"}]}]},{"group":"ナレッジ","icon":"book","expanded":false,"pages":[{"title":"ナレッジ","sidebarTitle":"概要","href":"/ja/cloud/use-dify/knowledge/readme"},{"group":"作成","pages":[{"group":"すぐに使えるナレッジベースを作成","pages":[{"title":"すぐに使えるナレッジベースを作成","sidebarTitle":"概要","href":"/ja/cloud/use-dify/knowledge/create-knowledge/introduction"},{"group":"データのインポート","pages":[{"title":"ローカルファイルをアップロード","href":"/ja/cloud/use-dify/knowledge/create-knowledge/import-text-data/readme"},{"title":"Notion からデータを同期","href":"/ja/cloud/use-dify/knowledge/create-knowledge/import-text-data/sync-from-notion"},{"title":"Web サイトからデータをインポート","href":"/ja/cloud/use-dify/knowledge/create-knowledge/import-text-data/sync-from-website"}]},{"title":"チャンク設定","href":"/ja/cloud/use-dify/knowledge/create-knowledge/chunking-and-cleaning-text"},{"title":"インデックス方法と検索設定を指定","href":"/ja/cloud/use-dify/knowledge/create-knowledge/setting-indexing-methods"}]},{"group":"カスタムナレッジベースを構築","pages":[{"title":"カスタムナレッジベースを構築","sidebarTitle":"概要","href":"/ja/cloud/use-dify/knowledge/knowledge-pipeline/readme"},{"title":"ステップ 1:ナレッジパイプラインの作成","href":"/ja/cloud/use-dify/knowledge/knowledge-pipeline/create-knowledge-pipeline"},{"title":"ステップ 2:ナレッジパイプラインをオーケストレーションする","href":"/ja/cloud/use-dify/knowledge/knowledge-pipeline/knowledge-pipeline-orchestration"},{"title":"ステップ 3:ナレッジパイプラインの公開","href":"/ja/cloud/use-dify/knowledge/knowledge-pipeline/publish-knowledge-pipeline"},{"title":"ステップ 4:ファイルのアップロード","href":"/ja/cloud/use-dify/knowledge/knowledge-pipeline/upload-files"},{"title":"ステップ 5:ナレッジベースの管理と活用","href":"/ja/cloud/use-dify/knowledge/knowledge-pipeline/manage-knowledge-base"},{"title":"データソース認証","href":"/ja/cloud/use-dify/knowledge/knowledge-pipeline/authorize-data-source"}]},{"group":"外部ナレッジベースと連携","pages":[{"title":"外部ナレッジベースとの接続","sidebarTitle":"概要","href":"/ja/cloud/use-dify/knowledge/connect-external-knowledge-base"},{"title":"外部ナレッジベース API","href":"/ja/cloud/use-dify/knowledge/external-knowledge-api"}]}]},{"group":"管理","pages":[{"title":"ナレッジコンテンツの管理","sidebarTitle":"ドキュメントとチャンク","href":"/ja/cloud/use-dify/knowledge/manage-knowledge/maintain-knowledge-documents"},{"title":"ドキュメントのメタデータを管理","sidebarTitle":"メタデータ","href":"/ja/cloud/use-dify/knowledge/metadata"},{"title":"ナレッジ設定の管理","sidebarTitle":"設定","href":"/ja/cloud/use-dify/knowledge/manage-knowledge/introduction"}]},{"title":"ナレッジ検索テスト","sidebarTitle":"検索テスト","href":"/ja/cloud/use-dify/knowledge/test-retrieval"},{"title":"アプリ内でのナレッジベース統合","sidebarTitle":"アプリ内で統合","href":"/ja/cloud/use-dify/knowledge/integrate-knowledge-within-application"},{"title":"ナレッジベースの要求頻度制限","sidebarTitle":"リクエスト頻度制限","href":"/ja/cloud/use-dify/knowledge/knowledge-request-rate-limit"},{"title":"ナレッジベースのデータストレージ制限","sidebarTitle":"データストレージ制限","href":"/ja/cloud/use-dify/knowledge/knowledge-storage-limit"}]},{"group":"統合","icon":"plug","expanded":false,"pages":[{"title":"統合","sidebarTitle":"概要","href":"/ja/cloud/use-dify/workspace/plugins"},{"title":"モデルプロバイダー","href":"/ja/cloud/use-dify/workspace/model-providers"},{"title":"Dify ツール","sidebarTitle":"ツール","href":"/ja/cloud/use-dify/workspace/tools"},{"group":"カスタム API","pages":[{"title":"カスタム API","sidebarTitle":"概要","href":"/ja/cloud/use-dify/workspace/api-extension/api-extension"},{"title":"外部データツール","href":"/ja/cloud/use-dify/workspace/api-extension/external-data-tool-api-extension"},{"title":"センシティブコンテンツ審査","href":"/ja/cloud/use-dify/workspace/api-extension/moderation-api-extension"},{"title":"Cloudflare Workers を使用したカスタム API のデプロイ","href":"/ja/cloud/use-dify/workspace/api-extension/cloudflare-worker"}]}]},{"group":"ワークスペース","icon":"briefcase","expanded":false,"pages":[{"title":"概要","href":"/ja/cloud/use-dify/workspace/readme"},{"title":"アプリの管理","href":"/ja/cloud/use-dify/workspace/app-management"},{"title":"メンバーの管理","href":"/ja/cloud/use-dify/workspace/team-members-management"},{"title":"個人設定","href":"/ja/cloud/use-dify/workspace/personal-account-management"},{"title":"請求","href":"/ja/cloud/use-dify/workspace/subscription-management"}]}]},{"tab":"学習","icon":"graduation-cap","pages":[{"title":"主要な概念","href":"/ja/learn/key-concepts"},{"group":"チュートリアル","pages":[{"title":"30 分間クイックスタート","href":"/ja/quick-start"},{"group":"ワークフロー 101","pages":[{"title":"レッスン 1:ワークフローとは?","href":"/ja/learn/tutorials/workflow-101/lesson-01"},{"title":"レッスン 2:フローの頭と尾(開始ノードと出力ノード)","sidebarTitle":"レッスン 2:フローの頭と尾","href":"/ja/learn/tutorials/workflow-101/lesson-02"},{"title":"レッスン 3:ワークフローの頭脳(LLM ノード)","sidebarTitle":"レッスン 3:ワークフローの頭脳","href":"/ja/learn/tutorials/workflow-101/lesson-03"},{"title":"レッスン 4:カンニングペーパー(ナレッジ検索)","sidebarTitle":"レッスン 4:カンニングペーパー","href":"/ja/learn/tutorials/workflow-101/lesson-04"},{"title":"レッスン 5:ワークフローの分岐点(分類と実行)","sidebarTitle":"レッスン 5:ワークフローの分岐点","href":"/ja/learn/tutorials/workflow-101/lesson-05"},{"title":"レッスン 6:複数のタスクを処理する(パラメータ抽出 \u0026 イテレーション)","sidebarTitle":"レッスン 6:複数のタスクを処理する","href":"/ja/learn/tutorials/workflow-101/lesson-06"},{"title":"レッスン 7:ワークフローを強化する(ツール)","sidebarTitle":"レッスン 7:ワークフローを強化する","href":"/ja/learn/tutorials/workflow-101/lesson-07"},{"title":"レッスン 8:エージェントノード","sidebarTitle":"レッスン 8:エージェントノード","href":"/ja/learn/tutorials/workflow-101/lesson-08"},{"title":"レッスン 9:レイアウトデザイナー(テンプレート)","sidebarTitle":"レッスン 9:レイアウトデザイナー","href":"/ja/learn/tutorials/workflow-101/lesson-09"},{"title":"レッスン 10:AI アプリを公開してモニタリングする","sidebarTitle":"レッスン 10:公開とモニタリング","href":"/ja/learn/tutorials/workflow-101/lesson-10"}]},{"title":"シンプルなチャットボット","href":"/ja/learn/tutorials/simple-chatbot"},{"title":"チャットストリームエージェントを使用した Twitter アカウントの分析方法","href":"/ja/learn/tutorials/twitter-chatflow"},{"title":"知識ベースを使用したカスタマーサービスボット","href":"/ja/learn/tutorials/customer-service-bot"},{"title":"ゼロから AI 画像生成アプリの構築方法","href":"/ja/learn/tutorials/build-ai-image-generation-app"},{"title":"ファイルアップロードを使用した記事理解アシスタントの構築方法","href":"/ja/learn/tutorials/article-reader"}]}]},{"tab":"開発者リソース","icon":"code","menu":[{"item":"API","icon":"code","groups":[{"group":"ガイド","pages":[{"title":"Dify API クイックスタート","sidebarTitle":"クイックスタート","href":"/ja/api-reference/guides/get-started"},{"group":"API 概要","expanded":true,"pages":[{"title":"Chatflow アプリ API","sidebarTitle":"Chatflow","href":"/ja/api-reference/guides/chatflow"},{"title":"Workflow アプリ API","sidebarTitle":"Workflow","href":"/ja/api-reference/guides/workflow"},{"title":"Agent API","sidebarTitle":"Agent","tag":"New","href":"/ja/api-reference/guides/agent"},{"title":"ナレッジ API","sidebarTitle":"ナレッジ","href":"/ja/api-reference/guides/knowledge"},{"title":"チャットアプリ API","sidebarTitle":"Chatbotとレガシー Agent","href":"/ja/api-reference/guides/chat"},{"title":"テキストジェネレーターアプリ API","sidebarTitle":"テキストジェネレーター","href":"/ja/api-reference/guides/completion"}]},{"title":"ストリーミングレスポンスの処理","sidebarTitle":"SSE ストリーミング","href":"/ja/api-reference/guides/streaming"},{"title":"人間の入力 API 連携フロー","sidebarTitle":"人間の入力フロー","href":"/ja/api-reference/guides/human-input-flow"},{"title":"エンドユーザーの識別","sidebarTitle":"エンドユーザーの識別","href":"/ja/api-reference/guides/end-user-identity"},{"title":"エラーとレート制限の処理","sidebarTitle":"エラーとレート制限","href":"/ja/api-reference/guides/errors"}]},{"group":"アプリ API","pages":[{"group":"チャットメッセージ","pages":[{"title":"チャットメッセージを送信","deprecated":null,"version":null,"sidebarTitle":"チャットメッセージを送信","openapi":"/ja/api-reference/openapi_service.json post /chat-messages","href":"/ja/api-reference/chat-messages/send-chat-message"},{"title":"生成を停止","deprecated":null,"version":null,"sidebarTitle":"生成を停止","openapi":"/ja/api-reference/openapi_service.json post /chat-messages/{task_id}/stop","href":"/ja/api-reference/chat-messages/stop-chat-message-generation"},{"title":"次の推奨質問を取得","deprecated":null,"version":null,"sidebarTitle":"次の推奨質問を取得","openapi":"/ja/api-reference/openapi_service.json get /messages/{message_id}/suggested","href":"/ja/api-reference/chat-messages/get-next-suggested-questions"}]},{"group":"完了メッセージ","pages":[{"title":"完了メッセージを送信","deprecated":null,"version":null,"sidebarTitle":"完了メッセージを送信","openapi":"/ja/api-reference/openapi_service.json post /completion-messages","href":"/ja/api-reference/completion-messages/send-completion-message"},{"title":"生成を停止","deprecated":null,"version":null,"sidebarTitle":"生成を停止","openapi":"/ja/api-reference/openapi_service.json post /completion-messages/{task_id}/stop","href":"/ja/api-reference/completion-messages/stop-completion-message-generation"}]},{"group":"ワークフロー実行","pages":[{"title":"ワークフローを実行","deprecated":null,"version":null,"sidebarTitle":"ワークフローを実行","openapi":"/ja/api-reference/openapi_service.json post /workflows/run","href":"/ja/api-reference/workflow-runs/run-workflow"},{"title":"ID でワークフローを実行","deprecated":null,"version":null,"sidebarTitle":"ID でワークフローを実行","openapi":"/ja/api-reference/openapi_service.json post /workflows/{workflow_id}/run","href":"/ja/api-reference/workflow-runs/run-workflow-by-id"},{"title":"ワークフロータスクを停止","deprecated":null,"version":null,"sidebarTitle":"ワークフロータスクを停止","openapi":"/ja/api-reference/openapi_service.json post /workflows/tasks/{task_id}/stop","href":"/ja/api-reference/workflow-runs/stop-workflow-task"},{"title":"ワークフロー実行詳細を取得","deprecated":null,"version":null,"sidebarTitle":"ワークフロー実行詳細を取得","openapi":"/ja/api-reference/openapi_service.json get /workflows/run/{workflow_run_id}","href":"/ja/api-reference/workflow-runs/get-workflow-run-detail"},{"title":"ワークフローログ一覧を取得","deprecated":null,"version":null,"sidebarTitle":"ワークフローログ一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /workflows/logs","href":"/ja/api-reference/workflow-runs/list-workflow-logs"},{"title":"ワークフローイベントをストリーム","deprecated":null,"version":null,"sidebarTitle":"ワークフローイベントをストリーム","openapi":"/ja/api-reference/openapi_service.json get /workflow/{workflow_run_id}/events","href":"/ja/api-reference/workflow-runs/stream-workflow-events"}]},{"group":"会話管理","pages":[{"title":"会話一覧を取得","deprecated":null,"version":null,"sidebarTitle":"会話一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /conversations","href":"/ja/api-reference/conversations/list-conversations"},{"title":"会話履歴メッセージ一覧を取得","deprecated":null,"version":null,"sidebarTitle":"会話履歴メッセージ一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /messages","href":"/ja/api-reference/conversations/list-conversation-messages"},{"title":"会話変数の取得","deprecated":null,"version":null,"sidebarTitle":"会話変数の取得","openapi":"/ja/api-reference/openapi_service.json get /conversations/{conversation_id}/variables","href":"/ja/api-reference/conversations/list-conversation-variables"},{"title":"会話の名前を変更","deprecated":null,"version":null,"sidebarTitle":"会話の名前を変更","openapi":"/ja/api-reference/openapi_service.json post /conversations/{conversation_id}/name","href":"/ja/api-reference/conversations/rename-conversation"},{"title":"会話変数を更新","deprecated":null,"version":null,"sidebarTitle":"会話変数を更新","openapi":"/ja/api-reference/openapi_service.json put /conversations/{conversation_id}/variables/{variable_id}","href":"/ja/api-reference/conversations/update-conversation-variable"},{"title":"会話を削除","deprecated":null,"version":null,"sidebarTitle":"会話を削除","openapi":"/ja/api-reference/openapi_service.json delete /conversations/{conversation_id}","href":"/ja/api-reference/conversations/delete-conversation"}]},{"group":"ファイル操作","pages":[{"title":"ファイルをアップロード","deprecated":null,"version":null,"sidebarTitle":"ファイルをアップロード","openapi":"/ja/api-reference/openapi_service.json post /files/upload","href":"/ja/api-reference/files/upload-file"},{"title":"ファイルをダウンロード","deprecated":null,"version":null,"sidebarTitle":"ファイルをダウンロード","openapi":"/ja/api-reference/openapi_service.json get /files/{file_id}/preview","href":"/ja/api-reference/files/download-file"}]},{"group":"音声・テキスト変換","pages":[{"title":"音声をテキストに変換","deprecated":null,"version":null,"sidebarTitle":"音声をテキストに変換","openapi":"/ja/api-reference/openapi_service.json post /audio-to-text","href":"/ja/api-reference/audio/convert-audio-to-text"},{"title":"テキストを音声に変換","deprecated":null,"version":null,"sidebarTitle":"テキストを音声に変換","openapi":"/ja/api-reference/openapi_service.json post /text-to-audio","href":"/ja/api-reference/audio/convert-text-to-audio"}]},{"group":"アプリケーション設定","pages":[{"title":"アプリケーションの基本情報を取得","deprecated":null,"version":null,"sidebarTitle":"アプリケーションの基本情報を取得","openapi":"/ja/api-reference/openapi_service.json get /info","href":"/ja/api-reference/applications/get-app-info"},{"title":"アプリケーションのパラメータ情報を取得","deprecated":null,"version":null,"sidebarTitle":"アプリケーションのパラメータ情報を取得","openapi":"/ja/api-reference/openapi_service.json get /parameters","href":"/ja/api-reference/applications/get-app-parameters"},{"title":"アプリケーションのメタ情報を取得","deprecated":null,"version":null,"sidebarTitle":"アプリケーションのメタ情報を取得","openapi":"/ja/api-reference/openapi_service.json get /meta","href":"/ja/api-reference/applications/get-app-meta"},{"title":"アプリの WebApp 設定を取得","deprecated":null,"version":null,"sidebarTitle":"アプリの WebApp 設定を取得","openapi":"/ja/api-reference/openapi_service.json get /site","href":"/ja/api-reference/applications/get-app-webapp-settings"}]},{"group":"メッセージフィードバック","pages":[{"title":"メッセージフィードバックを送信","deprecated":null,"version":null,"sidebarTitle":"メッセージフィードバックを送信","openapi":"/ja/api-reference/openapi_service.json post /messages/{message_id}/feedbacks","href":"/ja/api-reference/feedback/submit-message-feedback"},{"title":"アプリのフィードバック一覧を取得","deprecated":null,"version":null,"sidebarTitle":"アプリのフィードバック一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /app/feedbacks","href":"/ja/api-reference/feedback/list-app-feedbacks"}]},{"group":"アノテーション管理","pages":[{"title":"アノテーションを作成","deprecated":null,"version":null,"sidebarTitle":"アノテーションを作成","openapi":"/ja/api-reference/openapi_service.json post /apps/annotations","href":"/ja/api-reference/annotations/create-annotation"},{"title":"アノテーションリストを取得","deprecated":null,"version":null,"sidebarTitle":"アノテーションリストを取得","openapi":"/ja/api-reference/openapi_service.json get /apps/annotations","href":"/ja/api-reference/annotations/list-annotations"},{"title":"アノテーションを更新","deprecated":null,"version":null,"sidebarTitle":"アノテーションを更新","openapi":"/ja/api-reference/openapi_service.json put /apps/annotations/{annotation_id}","href":"/ja/api-reference/annotations/update-annotation"},{"title":"アノテーションを削除","deprecated":null,"version":null,"sidebarTitle":"アノテーションを削除","openapi":"/ja/api-reference/openapi_service.json delete /apps/annotations/{annotation_id}","href":"/ja/api-reference/annotations/delete-annotation"},{"title":"アノテーション返信を設定","deprecated":null,"version":null,"sidebarTitle":"アノテーション返信を設定","openapi":"/ja/api-reference/openapi_service.json post /apps/annotation-reply/{action}","href":"/ja/api-reference/annotations/configure-annotation-reply"},{"title":"アノテーション返信の初期設定タスクステータスを取得","deprecated":null,"version":null,"sidebarTitle":"アノテーション返信の初期設定タスクステータスを取得","openapi":"/ja/api-reference/openapi_service.json get /apps/annotation-reply/{action}/status/{job_id}","href":"/ja/api-reference/annotations/get-annotation-reply-job-status"}]},{"group":"エンドユーザー","pages":[{"title":"エンドユーザー取得","deprecated":null,"version":null,"sidebarTitle":"エンドユーザー取得","openapi":"/ja/api-reference/openapi_service.json get /end-users/{end_user_id}","href":"/ja/api-reference/end-users/get-end-user-info"}]},{"group":"人間の入力","pages":[{"title":"人間の入力フォームを取得","deprecated":null,"version":null,"sidebarTitle":"人間の入力フォームを取得","openapi":"/ja/api-reference/openapi_service.json get /form/human_input/{form_token}","href":"/ja/api-reference/human-input/get-human-input-form"},{"title":"人間の入力フォームを送信","deprecated":null,"version":null,"sidebarTitle":"人間の入力フォームを送信","openapi":"/ja/api-reference/openapi_service.json post /form/human_input/{form_token}","href":"/ja/api-reference/human-input/submit-human-input-form"}]}]},{"group":"ナレッジ API","pages":[{"group":"ナレッジベース","pages":[{"title":"空のナレッジベースを作成","deprecated":null,"version":null,"sidebarTitle":"空のナレッジベースを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets","href":"/ja/api-reference/knowledge-bases/create-an-empty-knowledge-base"},{"title":"ナレッジベースリストを取得","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースリストを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets","href":"/ja/api-reference/knowledge-bases/list-knowledge-bases"},{"title":"ナレッジベース詳細を取得","deprecated":null,"version":null,"sidebarTitle":"ナレッジベース詳細を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}","href":"/ja/api-reference/knowledge-bases/get-knowledge-base"},{"title":"ナレッジベースを更新","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースを更新","openapi":"/ja/api-reference/openapi_service.json patch /datasets/{dataset_id}","href":"/ja/api-reference/knowledge-bases/update-knowledge-base"},{"title":"ナレッジベースを削除","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/{dataset_id}","href":"/ja/api-reference/knowledge-bases/delete-knowledge-base"},{"title":"ナレッジベースからチャンクを取得 / テスト検索","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースからチャンクを取得 / テスト検索","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/retrieve","href":"/ja/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval"}]},{"group":"ドキュメント","pages":[{"title":"テキストからドキュメントを作成","deprecated":null,"version":null,"sidebarTitle":"テキストからドキュメントを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/document/create-by-text","href":"/ja/api-reference/documents/create-document-by-text"},{"title":"ファイルからドキュメントを作成","deprecated":null,"version":null,"sidebarTitle":"ファイルからドキュメントを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/document/create-by-file","href":"/ja/api-reference/documents/create-document-by-file"},{"title":"ナレッジベースのドキュメントリストを取得","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースのドキュメントリストを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents","href":"/ja/api-reference/documents/list-documents"},{"title":"ドキュメント詳細を取得","deprecated":null,"version":null,"sidebarTitle":"ドキュメント詳細を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}","href":"/ja/api-reference/documents/get-document"},{"title":"ドキュメントを削除","deprecated":null,"version":null,"sidebarTitle":"ドキュメントを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}","href":"/ja/api-reference/documents/delete-document"},{"title":"ドキュメントを更新","deprecated":null,"version":null,"sidebarTitle":"ドキュメントを更新","openapi":"/ja/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/{document_id}","href":"/ja/api-reference/documents/update-document"},{"title":"ドキュメントをダウンロード","deprecated":null,"version":null,"sidebarTitle":"ドキュメントをダウンロード","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/download","href":"/ja/api-reference/documents/download-document"},{"title":"ドキュメント埋め込みステータス(進捗)を取得","deprecated":null,"version":null,"sidebarTitle":"ドキュメント埋め込みステータス(進捗)を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{batch}/indexing-status","href":"/ja/api-reference/documents/get-document-indexing-status"},{"title":"テキストでドキュメントを更新","deprecated":null,"version":null,"sidebarTitle":"テキストでドキュメントを更新","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-text","href":"/ja/api-reference/documents/update-document-by-text"},{"title":"ファイルでドキュメントを更新","deprecated":true,"version":null,"sidebarTitle":"ファイルでドキュメントを更新","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-file","href":"/ja/api-reference/documents/update-document-by-file"},{"title":"ドキュメントを一括ダウンロード(ZIP)","deprecated":null,"version":null,"sidebarTitle":"ドキュメントを一括ダウンロード(ZIP)","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/download-zip","href":"/ja/api-reference/documents/download-documents-as-zip"},{"title":"ドキュメントステータスを一括更新","deprecated":null,"version":null,"sidebarTitle":"ドキュメントステータスを一括更新","openapi":"/ja/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/status/{action}","href":"/ja/api-reference/documents/update-document-status-in-batch"}]},{"group":"チャンク","pages":[{"title":"ドキュメントにチャンクを追加","deprecated":null,"version":null,"sidebarTitle":"ドキュメントにチャンクを追加","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments","href":"/ja/api-reference/chunks/create-chunks"},{"title":"チャンク一覧を取得","deprecated":null,"version":null,"sidebarTitle":"チャンク一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments","href":"/ja/api-reference/chunks/list-chunks"},{"title":"ドキュメント内のチャンク詳細を取得","deprecated":null,"version":null,"sidebarTitle":"ドキュメント内のチャンク詳細を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/ja/api-reference/chunks/get-chunk"},{"title":"ドキュメント内のチャンクを更新","deprecated":null,"version":null,"sidebarTitle":"ドキュメント内のチャンクを更新","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/ja/api-reference/chunks/update-chunk"},{"title":"ドキュメント内のチャンクを削除","deprecated":null,"version":null,"sidebarTitle":"ドキュメント内のチャンクを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/ja/api-reference/chunks/delete-chunk"},{"title":"子チャンクを作成","deprecated":null,"version":null,"sidebarTitle":"子チャンクを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks","href":"/ja/api-reference/chunks/create-child-chunk"},{"title":"子チャンク一覧を取得","deprecated":null,"version":null,"sidebarTitle":"子チャンク一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks","href":"/ja/api-reference/chunks/list-child-chunks"},{"title":"子チャンクを更新","deprecated":null,"version":null,"sidebarTitle":"子チャンクを更新","openapi":"/ja/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}","href":"/ja/api-reference/chunks/update-child-chunk"},{"title":"子チャンクを削除","deprecated":null,"version":null,"sidebarTitle":"子チャンクを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}","href":"/ja/api-reference/chunks/delete-child-chunk"}]},{"group":"メタデータ","pages":[{"title":"メタデータフィールドを作成","deprecated":null,"version":null,"sidebarTitle":"メタデータフィールドを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/metadata","href":"/ja/api-reference/metadata/create-metadata-field"},{"title":"メタデータフィールドリストを取得","deprecated":null,"version":null,"sidebarTitle":"メタデータフィールドリストを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/metadata","href":"/ja/api-reference/metadata/list-metadata-fields"},{"title":"メタデータフィールドを更新","deprecated":null,"version":null,"sidebarTitle":"メタデータフィールドを更新","openapi":"/ja/api-reference/openapi_service.json patch /datasets/{dataset_id}/metadata/{metadata_id}","href":"/ja/api-reference/metadata/update-metadata-field"},{"title":"メタデータフィールドを削除","deprecated":null,"version":null,"sidebarTitle":"メタデータフィールドを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/{dataset_id}/metadata/{metadata_id}","href":"/ja/api-reference/metadata/delete-metadata-field"},{"title":"組み込みメタデータフィールドを取得","deprecated":null,"version":null,"sidebarTitle":"組み込みメタデータフィールドを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/metadata/built-in","href":"/ja/api-reference/metadata/get-built-in-metadata-fields"},{"title":"組み込みメタデータフィールドを更新","deprecated":null,"version":null,"sidebarTitle":"組み込みメタデータフィールドを更新","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/metadata/built-in/{action}","href":"/ja/api-reference/metadata/update-built-in-metadata-field"},{"title":"ドキュメントメタデータを一括更新","deprecated":null,"version":null,"sidebarTitle":"ドキュメントメタデータを一括更新","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/metadata","href":"/ja/api-reference/metadata/update-document-metadata-in-batch"}]},{"group":"タグ管理","pages":[{"title":"ナレッジベースタグを作成","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースタグを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets/tags","href":"/ja/api-reference/tags/create-knowledge-tag"},{"title":"ナレッジベースタグリストを取得","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースタグリストを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/tags","href":"/ja/api-reference/tags/list-knowledge-tags"},{"title":"ナレッジベースタグを変更","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースタグを変更","openapi":"/ja/api-reference/openapi_service.json patch /datasets/tags","href":"/ja/api-reference/tags/update-knowledge-tag"},{"title":"ナレッジベースタグを削除","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースタグを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/tags","href":"/ja/api-reference/tags/delete-knowledge-tag"},{"title":"タグをナレッジベースにバインド","deprecated":null,"version":null,"sidebarTitle":"タグをナレッジベースにバインド","openapi":"/ja/api-reference/openapi_service.json post /datasets/tags/binding","href":"/ja/api-reference/tags/create-tag-binding"},{"title":"タグとナレッジベースのバインドを解除","deprecated":null,"version":null,"sidebarTitle":"タグとナレッジベースのバインドを解除","openapi":"/ja/api-reference/openapi_service.json post /datasets/tags/unbinding","href":"/ja/api-reference/tags/delete-tag-binding"},{"title":"ナレッジベースにバインドされたタグを取得","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースにバインドされたタグを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/tags","href":"/ja/api-reference/tags/get-knowledge-base-tags"}]},{"group":"モデル","pages":[{"title":"利用可能なモデルを取得","deprecated":null,"version":null,"sidebarTitle":"利用可能なモデルを取得","openapi":"/ja/api-reference/openapi_service.json get /workspaces/current/models/model-types/{model_type}","href":"/ja/api-reference/models/get-available-models"}]},{"group":"ナレッジパイプライン","pages":[{"title":"パイプラインファイルをアップロード","deprecated":null,"version":null,"sidebarTitle":"パイプラインファイルをアップロード","openapi":"/ja/api-reference/openapi_service.json post /datasets/pipeline/file-upload","href":"/ja/api-reference/knowledge-pipeline/upload-pipeline-file"},{"title":"データソースプラグインリストを取得","deprecated":null,"version":null,"sidebarTitle":"データソースプラグインリストを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/pipeline/datasource-plugins","href":"/ja/api-reference/knowledge-pipeline/list-datasource-plugins"},{"title":"データソースノードを実行","deprecated":null,"version":null,"sidebarTitle":"データソースノードを実行","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run","href":"/ja/api-reference/knowledge-pipeline/run-datasource-node"},{"title":"パイプラインを実行","deprecated":null,"version":null,"sidebarTitle":"パイプラインを実行","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/pipeline/run","href":"/ja/api-reference/knowledge-pipeline/run-pipeline"}]}]}]},{"item":"CLI","icon":"terminal","groups":[{"group":" ","expanded":true,"pages":[{"title":"概要","href":"/ja/cloud/cli/overview"},{"title":"difyctl のインストール","sidebarTitle":"インストール","href":"/ja/cloud/cli/install"},{"title":"クイックスタート","href":"/ja/cloud/cli/quick-start"},{"title":"認証","href":"/ja/cloud/cli/authenticate"},{"title":"よくあるタスク","href":"/ja/cloud/cli/common-tasks"},{"group":"エージェントの統合","pages":[{"title":"エージェントを Dify アプリと統合する","sidebarTitle":"概要","href":"/ja/cloud/cli/integrate-agents/overview"},{"title":"Agent が動作する場所での認証","sidebarTitle":"認証","href":"/ja/cloud/cli/integrate-agents/auth-for-agent-deployments"},{"title":"difyctl スキルのインストール","href":"/ja/cloud/cli/integrate-agents/install-the-difyctl-skill"},{"title":"エラー処理とリトライ","href":"/ja/cloud/cli/integrate-agents/error-handling-and-retries-for-agents"}]},{"group":"CLI リファレンス","pages":[{"title":"コマンド索引","href":"/ja/cloud/cli/reference/command-index"},{"title":"グローバルフラグ","href":"/ja/cloud/cli/reference/global-flags"},{"title":"出力形式と終了コード","href":"/ja/cloud/cli/reference/output-formats-and-exit-codes"},{"title":"環境変数","href":"/ja/cloud/cli/reference/environment-variables"},{"group":"コマンド","expanded":true,"pages":[{"title":"アプリ","href":"/ja/cloud/cli/reference/apps"},{"title":"認証とコンテキスト","href":"/ja/cloud/cli/reference/auth-and-contexts"},{"title":"ワークスペース","href":"/ja/cloud/cli/reference/workspaces"},{"title":"ヘルプ","href":"/ja/cloud/cli/reference/help"},{"title":"スキル","href":"/ja/cloud/cli/reference/skills"},{"title":"バージョン","href":"/ja/cloud/cli/reference/version"}]}]},{"title":"トラブルシューティング","href":"/ja/cloud/cli/troubleshooting"}]}]},{"item":"プラグイン開発","icon":"code-pull-request","pages":[{"group":"クイックスタート","icon":"rocket","pages":[{"title":"Dify プラグイン","href":"/ja/develop-plugin/getting-started/getting-started-dify-plugin"},{"title":"プラグインタイプの選択","href":"/ja/develop-plugin/getting-started/choose-plugin-type"},{"title":"Dify プラグイン CLI","href":"/ja/develop-plugin/getting-started/cli"}]},{"group":"特性と仕様","icon":"list-check","pages":[{"group":"プラグインタイプ","pages":[{"title":"一般仕様","href":"/ja/develop-plugin/features-and-specs/plugin-types/general-specifications"},{"title":"モデル仕様","href":"/ja/develop-plugin/features-and-specs/plugin-types/model-designing-rules"},{"title":"モデル API インターフェース","href":"/ja/develop-plugin/features-and-specs/plugin-types/model-schema"},{"title":"永続ストレージ","href":"/ja/develop-plugin/features-and-specs/plugin-types/persistent-storage-kv"},{"title":"ツールの戻り値","href":"/ja/develop-plugin/features-and-specs/plugin-types/tool"},{"title":"Manifest","href":"/ja/develop-plugin/features-and-specs/plugin-types/plugin-info-by-manifest"},{"title":"多言語 README","href":"/ja/develop-plugin/features-and-specs/plugin-types/multilingual-readme"},{"title":"プラグインのデバッグ","href":"/ja/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin"},{"title":"プラグインのロギング","href":"/ja/develop-plugin/features-and-specs/plugin-types/plugin-logging"}]},{"group":"高度な開発","pages":[{"group":"リバース呼び出し","pages":[{"title":"Bundle プラグインパッケージ","href":"/ja/develop-plugin/features-and-specs/advanced-development/bundle"},{"title":"Dify サービスの逆呼び出し","href":"/ja/develop-plugin/features-and-specs/advanced-development/reverse-invocation"},{"title":"App","href":"/ja/develop-plugin/features-and-specs/advanced-development/reverse-invocation-app"},{"title":"モデルの逆呼び出し","href":"/ja/develop-plugin/features-and-specs/advanced-development/reverse-invocation-model"},{"title":"ツール","href":"/ja/develop-plugin/features-and-specs/advanced-development/reverse-invocation-tool"},{"title":"カスタムモデルの統合","href":"/ja/develop-plugin/features-and-specs/advanced-development/customizable-model"},{"title":"ノード","href":"/ja/develop-plugin/features-and-specs/advanced-development/reverse-invocation-node"}]}]}]},{"group":"開発ガイドとサンプル","icon":"code","pages":[{"title":"チートシート","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/cheatsheet"},{"group":"プラグインタイプ別","pages":[{"title":"ツールプラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/tool-plugin"},{"title":"Tool OAuth","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/tool-oauth"},{"title":"モデルプロバイダープラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/creating-new-model-provider"},{"title":"エージェント戦略プラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/agent-strategy-plugin"},{"title":"データソースプラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/datasource-plugin"},{"title":"トリガープラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin"},{"title":"Endpoint プラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/endpoint"}]},{"group":"完全なサンプル","pages":[{"title":"Flomoツール(10分)","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin"},{"title":"Slack Bot","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin"},{"title":"Markdownエクスポーター","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/develop-md-exporter"},{"title":"マルチモーダルツール","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/develop-multimodal-data-processing-tool"}]}]},{"group":"公開","icon":"upload","pages":[{"title":"プラグインの公開","href":"/ja/develop-plugin/publishing/marketplace-listing/release-overview"},{"group":"標準","pages":[{"title":"プラグイン開発ガイドライン","href":"/ja/develop-plugin/publishing/standards/contributor-covenant-code-of-conduct"},{"title":"プライバシーポリシーガイドライン","href":"/ja/develop-plugin/publishing/standards/privacy-protection-guidelines"}]},{"title":"マーケットプレイスにプラグインを公開","sidebarTitle":"マーケットプレイス","href":"/ja/develop-plugin/publishing/marketplace-listing/submit-plugin-to-marketplace"},{"group":"GitHub リポジトリ","pages":[{"title":"個人 GitHub リポジトリへの公開","href":"/ja/develop-plugin/publishing/marketplace-listing/release-to-individual-github-repo"}]},{"group":"ローカルファイル","pages":[{"title":"ローカルファイルとしてパッケージ化して共有","href":"/ja/develop-plugin/publishing/marketplace-listing/release-by-file"},{"title":"サードパーティ署名検証用のプラグイン署名","href":"/ja/develop-plugin/publishing/standards/third-party-signature-verification"}]},{"title":"よくある質問","sidebarTitle":"よくある質問","href":"/ja/develop-plugin/publishing/faq/faq"}]}]}]}]},{"product":"セルフホスト","icon":"server","tabs":[{"tab":"デプロイ","icon":"server","pages":[{"title":"Dify のデプロイ","sidebarTitle":"概要","mode":"frame","href":"/ja/self-host/deploy/overview"},{"group":"クイックスタート","icon":"rocket","pages":[{"title":"Docker Compose で Dify をデプロイする","sidebarTitle":"Docker Compose","href":"/ja/self-host/deploy/quick-start/docker-compose"},{"title":"よくある質問","href":"/ja/self-host/deploy/quick-start/faqs"}]},{"group":"高度なデプロイ","icon":"server","pages":[{"title":"ローカルソースコードからの起動","href":"/ja/self-host/deploy/advanced-deployments/local-source-code"},{"title":"フロントコンテナ起動","href":"/ja/self-host/deploy/advanced-deployments/start-the-frontend-docker-container"}]},{"group":"設定","icon":"gear","pages":[{"title":"環境変数","href":"/ja/self-host/deploy/configuration/environments"}]},{"group":"プラットフォームガイド","icon":"map","pages":[{"title":"aaPanelでのデプロイ","href":"/ja/self-host/deploy/platform-guides/bt-panel"},{"title":"AWS 上の Dify Premium","href":"/ja/self-host/deploy/platform-guides/dify-premium"}]},{"group":"トラブルシューティング","icon":"wrench","pages":[{"title":"よくある問題","href":"/ja/self-host/deploy/troubleshooting/common-issues"},{"title":"Dockerの問題","href":"/ja/self-host/deploy/troubleshooting/docker-issues"},{"title":"サードパーティ統合","href":"/ja/self-host/deploy/troubleshooting/integrations"},{"title":"ストレージとマイグレーション","href":"/ja/self-host/deploy/troubleshooting/storage-and-migration"},{"title":"Weaviate 移行ガイド:クライアント v4 とサーバー 1.27+ へのアップグレード","href":"/ja/self-host/deploy/troubleshooting/weaviate-v4-migration"},{"title":"Weaviate サーバーのアップグレード経路","href":"/ja/self-host/deploy/troubleshooting/weaviate-server-migration-path"}]}]},{"tab":"使い方","icon":"book-open","pages":[{"title":"Dify の使い方","sidebarTitle":"概要","mode":"frame","href":"/ja/self-host/use-dify/getting-started/introduction"},{"group":"オーケストレーション","icon":"hammer","pages":[{"group":"Workflow と Chatflow","expanded":false,"pages":[{"title":"Workflow と Chatflow","sidebarTitle":"概要","href":"/ja/self-host/use-dify/build/workflow-chatflow"},{"title":"オーケストレーションロジック","href":"/ja/self-host/use-dify/build/orchestrate-node"},{"group":"ノード","expanded":false,"pages":[{"group":"開始","root":{"title":"開始ノード","href":"/ja/self-host/use-dify/nodes/start"},"pages":[{"title":"ユーザー入力","href":"/ja/self-host/use-dify/nodes/user-input"},{"group":"トリガー","root":{"title":"トリガー","sidebarTitle":"概要","href":"/ja/self-host/use-dify/nodes/trigger/overview"},"pages":[{"title":"スケジュールトリガー","href":"/ja/self-host/use-dify/nodes/trigger/schedule-trigger"},{"title":"インテグレーショントリガー","href":"/ja/self-host/use-dify/nodes/trigger/plugin-trigger"},{"title":"Webhook トリガー","href":"/ja/self-host/use-dify/nodes/trigger/webhook-trigger"}]}]},{"title":"LLM","href":"/ja/self-host/use-dify/nodes/llm"},{"title":"知識検索","href":"/ja/self-host/use-dify/nodes/knowledge-retrieval"},{"title":"答え","href":"/ja/self-host/use-dify/nodes/answer"},{"title":"出力","href":"/ja/self-host/use-dify/nodes/output"},{"title":"Agent","href":"/ja/self-host/use-dify/nodes/agent"},{"title":"質問分類器","href":"/ja/self-host/use-dify/nodes/question-classifier"},{"title":"If-Else","href":"/ja/self-host/use-dify/nodes/ifelse"},{"group":"人間の入力","root":{"title":"人間の入力","href":"/ja/self-host/use-dify/nodes/human-input"},"expanded":false,"pages":[]},{"title":"反復処理","href":"/ja/self-host/use-dify/nodes/iteration"},{"title":"ループ","href":"/ja/self-host/use-dify/nodes/loop"},{"title":"コード","href":"/ja/self-host/use-dify/nodes/code"},{"title":"テンプレート","href":"/ja/self-host/use-dify/nodes/template"},{"title":"変数集約器","href":"/ja/self-host/use-dify/nodes/variable-aggregator"},{"title":"テキスト抽出","href":"/ja/self-host/use-dify/nodes/doc-extractor"},{"title":"変数アサイナー","href":"/ja/self-host/use-dify/nodes/variable-assigner"},{"title":"パラメータ抽出器","href":"/ja/self-host/use-dify/nodes/parameter-extractor"},{"title":"HTTP リクエスト","href":"/ja/self-host/use-dify/nodes/http-request"},{"title":"リスト演算子","href":"/ja/self-host/use-dify/nodes/list-operator"},{"title":"ツールノード","sidebarTitle":"ツール","href":"/ja/self-host/use-dify/nodes/tools"}]},{"title":"ホットキー","href":"/ja/self-host/use-dify/build/shortcut-key"},{"title":"バージョン管理","href":"/ja/self-host/use-dify/build/version-control"},{"title":"スニペット","href":"/ja/self-host/use-dify/build/snippet"},{"title":"チームメンバーと共同作業","sidebarTitle":"コラボレーション","href":"/ja/self-host/use-dify/build/workflow-collaboration"},{"group":"デバッグ","expanded":false,"pages":[{"title":"エラーの処理","href":"/ja/self-host/use-dify/build/predefined-error-handling-logic"},{"title":"単一ノード","href":"/ja/self-host/use-dify/debug/step-run"},{"title":"変数インスペクター","href":"/ja/self-host/use-dify/debug/variable-inspect"},{"title":"実行履歴","href":"/ja/self-host/use-dify/debug/history-and-logs"},{"title":"エラータイプ","href":"/ja/self-host/use-dify/debug/error-type"}]}]},{"group":"Agent","tag":"New","expanded":false,"pages":[{"title":"Agent","sidebarTitle":"概要","href":"/ja/self-host/use-dify/build/new-agent/overview"},{"title":"Agent の構築","sidebarTitle":"構築","href":"/ja/self-host/use-dify/build/new-agent/build"}]},{"title":"Skills","sidebarTitle":"Skills","href":"/ja/self-host/use-dify/build/skills"},{"group":"基本アプリ","expanded":false,"pages":[{"title":"Agent","tag":"Legacy","href":"/ja/self-host/use-dify/build/agent"},{"title":"チャットボット","sidebarTitle":"チャットボット","href":"/ja/self-host/use-dify/build/chatbot"},{"title":"テキストジェネレーター","sidebarTitle":"テキストジェネレーター","href":"/ja/self-host/use-dify/build/text-generator"}]},{"title":"アプリツールキット","href":"/ja/self-host/use-dify/build/additional-features"},{"title":"グローバル検索","href":"/ja/self-host/use-dify/build/goto-anything"}]},{"group":"公開","icon":"paper-plane","expanded":false,"pages":[{"title":"AI アプリの共有","href":"/ja/self-host/use-dify/publish/README"},{"group":"Web アプリ","pages":[{"title":"Workflow Web アプリ","href":"/ja/self-host/use-dify/publish/webapp/workflow-webapp"},{"title":"チャット Web アプリ","href":"/ja/self-host/use-dify/publish/webapp/chatflow-webapp"},{"title":"設定","href":"/ja/self-host/use-dify/publish/webapp/web-app-settings"},{"title":"Web アプリの埋め込み","sidebarTitle":"埋め込み","href":"/ja/self-host/use-dify/publish/webapp/embedding-in-websites"}]},{"title":"MCP サーバー","href":"/ja/self-host/use-dify/publish/publish-mcp"},{"title":"アプリをマーケットプレイスに公開","sidebarTitle":"マーケットプレイス","href":"/ja/self-host/use-dify/publish/publish-to-marketplace"}]},{"group":"モニタリング","icon":"chart-line","expanded":false,"pages":[{"title":"ダッシュボード","href":"/ja/self-host/use-dify/monitor/analysis"},{"title":"ログ","href":"/ja/self-host/use-dify/monitor/logs"},{"title":"注釈システム","href":"/ja/self-host/use-dify/monitor/annotation-reply"},{"group":"インテグレーション","pages":[{"title":"LangSmith の統合","href":"/ja/self-host/use-dify/monitor/integrations/integrate-langsmith"},{"title":"Langfuse の統合","href":"/ja/self-host/use-dify/monitor/integrations/integrate-langfuse"},{"title":"Opik の統合","href":"/ja/self-host/use-dify/monitor/integrations/integrate-opik"},{"title":"W\u0026B Weave の統合","sidebarTitle":"W\u0026B Weave","href":"/ja/self-host/use-dify/monitor/integrations/integrate-weave"},{"title":"Arize の統合","href":"/ja/self-host/use-dify/monitor/integrations/integrate-arize"},{"title":"Phoenix の統合","href":"/ja/self-host/use-dify/monitor/integrations/integrate-phoenix"},{"title":"Alibaba Cloud Monitor の統合","href":"/ja/self-host/use-dify/monitor/integrations/integrate-aliyun"}]}]},{"group":"ナレッジ","icon":"book","expanded":false,"pages":[{"title":"ナレッジ","sidebarTitle":"概要","href":"/ja/self-host/use-dify/knowledge/readme"},{"group":"作成","pages":[{"group":"すぐに使えるナレッジベースを作成","pages":[{"title":"すぐに使えるナレッジベースを作成","sidebarTitle":"概要","href":"/ja/self-host/use-dify/knowledge/create-knowledge/introduction"},{"group":"データのインポート","pages":[{"title":"ローカルファイルをアップロード","href":"/ja/self-host/use-dify/knowledge/create-knowledge/import-text-data/readme"},{"title":"Notion からデータを同期","href":"/ja/self-host/use-dify/knowledge/create-knowledge/import-text-data/sync-from-notion"},{"title":"Web サイトからデータをインポート","href":"/ja/self-host/use-dify/knowledge/create-knowledge/import-text-data/sync-from-website"}]},{"title":"チャンク設定","href":"/ja/self-host/use-dify/knowledge/create-knowledge/chunking-and-cleaning-text"},{"title":"インデックス方法と検索設定を指定","href":"/ja/self-host/use-dify/knowledge/create-knowledge/setting-indexing-methods"}]},{"group":"カスタムナレッジベースを構築","pages":[{"title":"カスタムナレッジベースを構築","sidebarTitle":"概要","href":"/ja/self-host/use-dify/knowledge/knowledge-pipeline/readme"},{"title":"ステップ 1:ナレッジパイプラインの作成","href":"/ja/self-host/use-dify/knowledge/knowledge-pipeline/create-knowledge-pipeline"},{"title":"ステップ 2:ナレッジパイプラインをオーケストレーションする","href":"/ja/self-host/use-dify/knowledge/knowledge-pipeline/knowledge-pipeline-orchestration"},{"title":"ステップ 3:ナレッジパイプラインの公開","href":"/ja/self-host/use-dify/knowledge/knowledge-pipeline/publish-knowledge-pipeline"},{"title":"ステップ 4:ファイルのアップロード","href":"/ja/self-host/use-dify/knowledge/knowledge-pipeline/upload-files"},{"title":"ステップ 5:ナレッジベースの管理と活用","href":"/ja/self-host/use-dify/knowledge/knowledge-pipeline/manage-knowledge-base"},{"title":"データソース認証","href":"/ja/self-host/use-dify/knowledge/knowledge-pipeline/authorize-data-source"}]},{"group":"外部ナレッジベースと連携","pages":[{"title":"外部ナレッジベースとの接続","sidebarTitle":"概要","href":"/ja/self-host/use-dify/knowledge/connect-external-knowledge-base"},{"title":"外部ナレッジベース API","href":"/ja/self-host/use-dify/knowledge/external-knowledge-api"}]}]},{"group":"管理","pages":[{"title":"ナレッジコンテンツの管理","sidebarTitle":"ドキュメントとチャンク","href":"/ja/self-host/use-dify/knowledge/manage-knowledge/maintain-knowledge-documents"},{"title":"ドキュメントのメタデータを管理","sidebarTitle":"メタデータ","href":"/ja/self-host/use-dify/knowledge/metadata"},{"title":"ナレッジ設定の管理","sidebarTitle":"設定","href":"/ja/self-host/use-dify/knowledge/manage-knowledge/introduction"}]},{"title":"ナレッジ検索テスト","sidebarTitle":"検索テスト","href":"/ja/self-host/use-dify/knowledge/test-retrieval"},{"title":"アプリ内でのナレッジベース統合","sidebarTitle":"アプリ内で統合","href":"/ja/self-host/use-dify/knowledge/integrate-knowledge-within-application"}]},{"group":"統合","icon":"plug","expanded":false,"pages":[{"title":"統合","sidebarTitle":"概要","href":"/ja/self-host/use-dify/workspace/plugins"},{"title":"モデルプロバイダー","href":"/ja/self-host/use-dify/workspace/model-providers"},{"title":"Dify ツール","sidebarTitle":"ツール","href":"/ja/self-host/use-dify/workspace/tools"},{"group":"カスタム API","pages":[{"title":"カスタム API","sidebarTitle":"概要","href":"/ja/self-host/use-dify/workspace/api-extension/api-extension"},{"title":"外部データツール","href":"/ja/self-host/use-dify/workspace/api-extension/external-data-tool-api-extension"},{"title":"センシティブコンテンツ審査","href":"/ja/self-host/use-dify/workspace/api-extension/moderation-api-extension"},{"title":"Cloudflare Workers を使用したカスタム API のデプロイ","href":"/ja/self-host/use-dify/workspace/api-extension/cloudflare-worker"}]}]},{"group":"ワークスペース","icon":"briefcase","expanded":false,"pages":[{"title":"概要","href":"/ja/self-host/use-dify/workspace/readme"},{"title":"アプリのエクスポートとインポート","sidebarTitle":"エクスポートとインポート","href":"/ja/self-host/use-dify/workspace/export-import-apps"},{"title":"メンバーの管理","href":"/ja/self-host/use-dify/workspace/team-members-management"},{"title":"個人設定","href":"/ja/self-host/use-dify/workspace/personal-account-management"}]}]},{"tab":"学習","icon":"graduation-cap","pages":[{"title":"主要な概念","href":"/ja/learn/key-concepts"},{"group":"チュートリアル","pages":[{"title":"30 分間クイックスタート","href":"/ja/quick-start"},{"group":"ワークフロー 101","pages":[{"title":"レッスン 1:ワークフローとは?","href":"/ja/learn/tutorials/workflow-101/lesson-01"},{"title":"レッスン 2:フローの頭と尾(開始ノードと出力ノード)","sidebarTitle":"レッスン 2:フローの頭と尾","href":"/ja/learn/tutorials/workflow-101/lesson-02"},{"title":"レッスン 3:ワークフローの頭脳(LLM ノード)","sidebarTitle":"レッスン 3:ワークフローの頭脳","href":"/ja/learn/tutorials/workflow-101/lesson-03"},{"title":"レッスン 4:カンニングペーパー(ナレッジ検索)","sidebarTitle":"レッスン 4:カンニングペーパー","href":"/ja/learn/tutorials/workflow-101/lesson-04"},{"title":"レッスン 5:ワークフローの分岐点(分類と実行)","sidebarTitle":"レッスン 5:ワークフローの分岐点","href":"/ja/learn/tutorials/workflow-101/lesson-05"},{"title":"レッスン 6:複数のタスクを処理する(パラメータ抽出 \u0026 イテレーション)","sidebarTitle":"レッスン 6:複数のタスクを処理する","href":"/ja/learn/tutorials/workflow-101/lesson-06"},{"title":"レッスン 7:ワークフローを強化する(ツール)","sidebarTitle":"レッスン 7:ワークフローを強化する","href":"/ja/learn/tutorials/workflow-101/lesson-07"},{"title":"レッスン 8:エージェントノード","sidebarTitle":"レッスン 8:エージェントノード","href":"/ja/learn/tutorials/workflow-101/lesson-08"},{"title":"レッスン 9:レイアウトデザイナー(テンプレート)","sidebarTitle":"レッスン 9:レイアウトデザイナー","href":"/ja/learn/tutorials/workflow-101/lesson-09"},{"title":"レッスン 10:AI アプリを公開してモニタリングする","sidebarTitle":"レッスン 10:公開とモニタリング","href":"/ja/learn/tutorials/workflow-101/lesson-10"}]},{"title":"シンプルなチャットボット","href":"/ja/learn/tutorials/simple-chatbot"},{"title":"チャットストリームエージェントを使用した Twitter アカウントの分析方法","href":"/ja/learn/tutorials/twitter-chatflow"},{"title":"知識ベースを使用したカスタマーサービスボット","href":"/ja/learn/tutorials/customer-service-bot"},{"title":"ゼロから AI 画像生成アプリの構築方法","href":"/ja/learn/tutorials/build-ai-image-generation-app"},{"title":"ファイルアップロードを使用した記事理解アシスタントの構築方法","href":"/ja/learn/tutorials/article-reader"}]}]},{"tab":"開発者リソース","icon":"code","menu":[{"item":"API","icon":"code","groups":[{"group":"ガイド","pages":[{"title":"Dify API クイックスタート","sidebarTitle":"クイックスタート","href":"/ja/api-reference/guides/get-started"},{"group":"API 概要","expanded":true,"pages":[{"title":"Chatflow アプリ API","sidebarTitle":"Chatflow","href":"/ja/api-reference/guides/chatflow"},{"title":"Workflow アプリ API","sidebarTitle":"Workflow","href":"/ja/api-reference/guides/workflow"},{"title":"Agent API","sidebarTitle":"Agent","tag":"New","href":"/ja/api-reference/guides/agent"},{"title":"ナレッジ API","sidebarTitle":"ナレッジ","href":"/ja/api-reference/guides/knowledge"},{"title":"チャットアプリ API","sidebarTitle":"Chatbotとレガシー Agent","href":"/ja/api-reference/guides/chat"},{"title":"テキストジェネレーターアプリ API","sidebarTitle":"テキストジェネレーター","href":"/ja/api-reference/guides/completion"}]},{"title":"ストリーミングレスポンスの処理","sidebarTitle":"SSE ストリーミング","href":"/ja/api-reference/guides/streaming"},{"title":"人間の入力 API 連携フロー","sidebarTitle":"人間の入力フロー","href":"/ja/api-reference/guides/human-input-flow"},{"title":"エンドユーザーの識別","sidebarTitle":"エンドユーザーの識別","href":"/ja/api-reference/guides/end-user-identity"},{"title":"エラーとレート制限の処理","sidebarTitle":"エラーとレート制限","href":"/ja/api-reference/guides/errors"}]},{"group":"アプリ API","pages":[{"group":"チャットメッセージ","pages":[{"title":"チャットメッセージを送信","deprecated":null,"version":null,"sidebarTitle":"チャットメッセージを送信","openapi":"/ja/api-reference/openapi_service.json post /chat-messages","href":"/ja/api-reference/chat-messages/send-chat-message"},{"title":"生成を停止","deprecated":null,"version":null,"sidebarTitle":"生成を停止","openapi":"/ja/api-reference/openapi_service.json post /chat-messages/{task_id}/stop","href":"/ja/api-reference/chat-messages/stop-chat-message-generation"},{"title":"次の推奨質問を取得","deprecated":null,"version":null,"sidebarTitle":"次の推奨質問を取得","openapi":"/ja/api-reference/openapi_service.json get /messages/{message_id}/suggested","href":"/ja/api-reference/chat-messages/get-next-suggested-questions"}]},{"group":"完了メッセージ","pages":[{"title":"完了メッセージを送信","deprecated":null,"version":null,"sidebarTitle":"完了メッセージを送信","openapi":"/ja/api-reference/openapi_service.json post /completion-messages","href":"/ja/api-reference/completion-messages/send-completion-message"},{"title":"生成を停止","deprecated":null,"version":null,"sidebarTitle":"生成を停止","openapi":"/ja/api-reference/openapi_service.json post /completion-messages/{task_id}/stop","href":"/ja/api-reference/completion-messages/stop-completion-message-generation"}]},{"group":"ワークフロー実行","pages":[{"title":"ワークフローを実行","deprecated":null,"version":null,"sidebarTitle":"ワークフローを実行","openapi":"/ja/api-reference/openapi_service.json post /workflows/run","href":"/ja/api-reference/workflow-runs/run-workflow"},{"title":"ID でワークフローを実行","deprecated":null,"version":null,"sidebarTitle":"ID でワークフローを実行","openapi":"/ja/api-reference/openapi_service.json post /workflows/{workflow_id}/run","href":"/ja/api-reference/workflow-runs/run-workflow-by-id"},{"title":"ワークフロータスクを停止","deprecated":null,"version":null,"sidebarTitle":"ワークフロータスクを停止","openapi":"/ja/api-reference/openapi_service.json post /workflows/tasks/{task_id}/stop","href":"/ja/api-reference/workflow-runs/stop-workflow-task"},{"title":"ワークフロー実行詳細を取得","deprecated":null,"version":null,"sidebarTitle":"ワークフロー実行詳細を取得","openapi":"/ja/api-reference/openapi_service.json get /workflows/run/{workflow_run_id}","href":"/ja/api-reference/workflow-runs/get-workflow-run-detail"},{"title":"ワークフローログ一覧を取得","deprecated":null,"version":null,"sidebarTitle":"ワークフローログ一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /workflows/logs","href":"/ja/api-reference/workflow-runs/list-workflow-logs"},{"title":"ワークフローイベントをストリーム","deprecated":null,"version":null,"sidebarTitle":"ワークフローイベントをストリーム","openapi":"/ja/api-reference/openapi_service.json get /workflow/{workflow_run_id}/events","href":"/ja/api-reference/workflow-runs/stream-workflow-events"}]},{"group":"会話管理","pages":[{"title":"会話一覧を取得","deprecated":null,"version":null,"sidebarTitle":"会話一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /conversations","href":"/ja/api-reference/conversations/list-conversations"},{"title":"会話履歴メッセージ一覧を取得","deprecated":null,"version":null,"sidebarTitle":"会話履歴メッセージ一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /messages","href":"/ja/api-reference/conversations/list-conversation-messages"},{"title":"会話変数の取得","deprecated":null,"version":null,"sidebarTitle":"会話変数の取得","openapi":"/ja/api-reference/openapi_service.json get /conversations/{conversation_id}/variables","href":"/ja/api-reference/conversations/list-conversation-variables"},{"title":"会話の名前を変更","deprecated":null,"version":null,"sidebarTitle":"会話の名前を変更","openapi":"/ja/api-reference/openapi_service.json post /conversations/{conversation_id}/name","href":"/ja/api-reference/conversations/rename-conversation"},{"title":"会話変数を更新","deprecated":null,"version":null,"sidebarTitle":"会話変数を更新","openapi":"/ja/api-reference/openapi_service.json put /conversations/{conversation_id}/variables/{variable_id}","href":"/ja/api-reference/conversations/update-conversation-variable"},{"title":"会話を削除","deprecated":null,"version":null,"sidebarTitle":"会話を削除","openapi":"/ja/api-reference/openapi_service.json delete /conversations/{conversation_id}","href":"/ja/api-reference/conversations/delete-conversation"}]},{"group":"ファイル操作","pages":[{"title":"ファイルをアップロード","deprecated":null,"version":null,"sidebarTitle":"ファイルをアップロード","openapi":"/ja/api-reference/openapi_service.json post /files/upload","href":"/ja/api-reference/files/upload-file"},{"title":"ファイルをダウンロード","deprecated":null,"version":null,"sidebarTitle":"ファイルをダウンロード","openapi":"/ja/api-reference/openapi_service.json get /files/{file_id}/preview","href":"/ja/api-reference/files/download-file"}]},{"group":"音声・テキスト変換","pages":[{"title":"音声をテキストに変換","deprecated":null,"version":null,"sidebarTitle":"音声をテキストに変換","openapi":"/ja/api-reference/openapi_service.json post /audio-to-text","href":"/ja/api-reference/audio/convert-audio-to-text"},{"title":"テキストを音声に変換","deprecated":null,"version":null,"sidebarTitle":"テキストを音声に変換","openapi":"/ja/api-reference/openapi_service.json post /text-to-audio","href":"/ja/api-reference/audio/convert-text-to-audio"}]},{"group":"アプリケーション設定","pages":[{"title":"アプリケーションの基本情報を取得","deprecated":null,"version":null,"sidebarTitle":"アプリケーションの基本情報を取得","openapi":"/ja/api-reference/openapi_service.json get /info","href":"/ja/api-reference/applications/get-app-info"},{"title":"アプリケーションのパラメータ情報を取得","deprecated":null,"version":null,"sidebarTitle":"アプリケーションのパラメータ情報を取得","openapi":"/ja/api-reference/openapi_service.json get /parameters","href":"/ja/api-reference/applications/get-app-parameters"},{"title":"アプリケーションのメタ情報を取得","deprecated":null,"version":null,"sidebarTitle":"アプリケーションのメタ情報を取得","openapi":"/ja/api-reference/openapi_service.json get /meta","href":"/ja/api-reference/applications/get-app-meta"},{"title":"アプリの WebApp 設定を取得","deprecated":null,"version":null,"sidebarTitle":"アプリの WebApp 設定を取得","openapi":"/ja/api-reference/openapi_service.json get /site","href":"/ja/api-reference/applications/get-app-webapp-settings"}]},{"group":"メッセージフィードバック","pages":[{"title":"メッセージフィードバックを送信","deprecated":null,"version":null,"sidebarTitle":"メッセージフィードバックを送信","openapi":"/ja/api-reference/openapi_service.json post /messages/{message_id}/feedbacks","href":"/ja/api-reference/feedback/submit-message-feedback"},{"title":"アプリのフィードバック一覧を取得","deprecated":null,"version":null,"sidebarTitle":"アプリのフィードバック一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /app/feedbacks","href":"/ja/api-reference/feedback/list-app-feedbacks"}]},{"group":"アノテーション管理","pages":[{"title":"アノテーションを作成","deprecated":null,"version":null,"sidebarTitle":"アノテーションを作成","openapi":"/ja/api-reference/openapi_service.json post /apps/annotations","href":"/ja/api-reference/annotations/create-annotation"},{"title":"アノテーションリストを取得","deprecated":null,"version":null,"sidebarTitle":"アノテーションリストを取得","openapi":"/ja/api-reference/openapi_service.json get /apps/annotations","href":"/ja/api-reference/annotations/list-annotations"},{"title":"アノテーションを更新","deprecated":null,"version":null,"sidebarTitle":"アノテーションを更新","openapi":"/ja/api-reference/openapi_service.json put /apps/annotations/{annotation_id}","href":"/ja/api-reference/annotations/update-annotation"},{"title":"アノテーションを削除","deprecated":null,"version":null,"sidebarTitle":"アノテーションを削除","openapi":"/ja/api-reference/openapi_service.json delete /apps/annotations/{annotation_id}","href":"/ja/api-reference/annotations/delete-annotation"},{"title":"アノテーション返信を設定","deprecated":null,"version":null,"sidebarTitle":"アノテーション返信を設定","openapi":"/ja/api-reference/openapi_service.json post /apps/annotation-reply/{action}","href":"/ja/api-reference/annotations/configure-annotation-reply"},{"title":"アノテーション返信の初期設定タスクステータスを取得","deprecated":null,"version":null,"sidebarTitle":"アノテーション返信の初期設定タスクステータスを取得","openapi":"/ja/api-reference/openapi_service.json get /apps/annotation-reply/{action}/status/{job_id}","href":"/ja/api-reference/annotations/get-annotation-reply-job-status"}]},{"group":"エンドユーザー","pages":[{"title":"エンドユーザー取得","deprecated":null,"version":null,"sidebarTitle":"エンドユーザー取得","openapi":"/ja/api-reference/openapi_service.json get /end-users/{end_user_id}","href":"/ja/api-reference/end-users/get-end-user-info"}]},{"group":"人間の入力","pages":[{"title":"人間の入力フォームを取得","deprecated":null,"version":null,"sidebarTitle":"人間の入力フォームを取得","openapi":"/ja/api-reference/openapi_service.json get /form/human_input/{form_token}","href":"/ja/api-reference/human-input/get-human-input-form"},{"title":"人間の入力フォームを送信","deprecated":null,"version":null,"sidebarTitle":"人間の入力フォームを送信","openapi":"/ja/api-reference/openapi_service.json post /form/human_input/{form_token}","href":"/ja/api-reference/human-input/submit-human-input-form"}]}]},{"group":"ナレッジ API","pages":[{"group":"ナレッジベース","pages":[{"title":"空のナレッジベースを作成","deprecated":null,"version":null,"sidebarTitle":"空のナレッジベースを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets","href":"/ja/api-reference/knowledge-bases/create-an-empty-knowledge-base"},{"title":"ナレッジベースリストを取得","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースリストを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets","href":"/ja/api-reference/knowledge-bases/list-knowledge-bases"},{"title":"ナレッジベース詳細を取得","deprecated":null,"version":null,"sidebarTitle":"ナレッジベース詳細を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}","href":"/ja/api-reference/knowledge-bases/get-knowledge-base"},{"title":"ナレッジベースを更新","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースを更新","openapi":"/ja/api-reference/openapi_service.json patch /datasets/{dataset_id}","href":"/ja/api-reference/knowledge-bases/update-knowledge-base"},{"title":"ナレッジベースを削除","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/{dataset_id}","href":"/ja/api-reference/knowledge-bases/delete-knowledge-base"},{"title":"ナレッジベースからチャンクを取得 / テスト検索","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースからチャンクを取得 / テスト検索","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/retrieve","href":"/ja/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval"}]},{"group":"ドキュメント","pages":[{"title":"テキストからドキュメントを作成","deprecated":null,"version":null,"sidebarTitle":"テキストからドキュメントを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/document/create-by-text","href":"/ja/api-reference/documents/create-document-by-text"},{"title":"ファイルからドキュメントを作成","deprecated":null,"version":null,"sidebarTitle":"ファイルからドキュメントを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/document/create-by-file","href":"/ja/api-reference/documents/create-document-by-file"},{"title":"ナレッジベースのドキュメントリストを取得","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースのドキュメントリストを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents","href":"/ja/api-reference/documents/list-documents"},{"title":"ドキュメント詳細を取得","deprecated":null,"version":null,"sidebarTitle":"ドキュメント詳細を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}","href":"/ja/api-reference/documents/get-document"},{"title":"ドキュメントを削除","deprecated":null,"version":null,"sidebarTitle":"ドキュメントを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}","href":"/ja/api-reference/documents/delete-document"},{"title":"ドキュメントを更新","deprecated":null,"version":null,"sidebarTitle":"ドキュメントを更新","openapi":"/ja/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/{document_id}","href":"/ja/api-reference/documents/update-document"},{"title":"ドキュメントをダウンロード","deprecated":null,"version":null,"sidebarTitle":"ドキュメントをダウンロード","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/download","href":"/ja/api-reference/documents/download-document"},{"title":"ドキュメント埋め込みステータス(進捗)を取得","deprecated":null,"version":null,"sidebarTitle":"ドキュメント埋め込みステータス(進捗)を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{batch}/indexing-status","href":"/ja/api-reference/documents/get-document-indexing-status"},{"title":"テキストでドキュメントを更新","deprecated":null,"version":null,"sidebarTitle":"テキストでドキュメントを更新","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-text","href":"/ja/api-reference/documents/update-document-by-text"},{"title":"ファイルでドキュメントを更新","deprecated":true,"version":null,"sidebarTitle":"ファイルでドキュメントを更新","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-file","href":"/ja/api-reference/documents/update-document-by-file"},{"title":"ドキュメントを一括ダウンロード(ZIP)","deprecated":null,"version":null,"sidebarTitle":"ドキュメントを一括ダウンロード(ZIP)","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/download-zip","href":"/ja/api-reference/documents/download-documents-as-zip"},{"title":"ドキュメントステータスを一括更新","deprecated":null,"version":null,"sidebarTitle":"ドキュメントステータスを一括更新","openapi":"/ja/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/status/{action}","href":"/ja/api-reference/documents/update-document-status-in-batch"}]},{"group":"チャンク","pages":[{"title":"ドキュメントにチャンクを追加","deprecated":null,"version":null,"sidebarTitle":"ドキュメントにチャンクを追加","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments","href":"/ja/api-reference/chunks/create-chunks"},{"title":"チャンク一覧を取得","deprecated":null,"version":null,"sidebarTitle":"チャンク一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments","href":"/ja/api-reference/chunks/list-chunks"},{"title":"ドキュメント内のチャンク詳細を取得","deprecated":null,"version":null,"sidebarTitle":"ドキュメント内のチャンク詳細を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/ja/api-reference/chunks/get-chunk"},{"title":"ドキュメント内のチャンクを更新","deprecated":null,"version":null,"sidebarTitle":"ドキュメント内のチャンクを更新","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/ja/api-reference/chunks/update-chunk"},{"title":"ドキュメント内のチャンクを削除","deprecated":null,"version":null,"sidebarTitle":"ドキュメント内のチャンクを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/ja/api-reference/chunks/delete-chunk"},{"title":"子チャンクを作成","deprecated":null,"version":null,"sidebarTitle":"子チャンクを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks","href":"/ja/api-reference/chunks/create-child-chunk"},{"title":"子チャンク一覧を取得","deprecated":null,"version":null,"sidebarTitle":"子チャンク一覧を取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks","href":"/ja/api-reference/chunks/list-child-chunks"},{"title":"子チャンクを更新","deprecated":null,"version":null,"sidebarTitle":"子チャンクを更新","openapi":"/ja/api-reference/openapi_service.json patch /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}","href":"/ja/api-reference/chunks/update-child-chunk"},{"title":"子チャンクを削除","deprecated":null,"version":null,"sidebarTitle":"子チャンクを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}","href":"/ja/api-reference/chunks/delete-child-chunk"}]},{"group":"メタデータ","pages":[{"title":"メタデータフィールドを作成","deprecated":null,"version":null,"sidebarTitle":"メタデータフィールドを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/metadata","href":"/ja/api-reference/metadata/create-metadata-field"},{"title":"メタデータフィールドリストを取得","deprecated":null,"version":null,"sidebarTitle":"メタデータフィールドリストを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/metadata","href":"/ja/api-reference/metadata/list-metadata-fields"},{"title":"メタデータフィールドを更新","deprecated":null,"version":null,"sidebarTitle":"メタデータフィールドを更新","openapi":"/ja/api-reference/openapi_service.json patch /datasets/{dataset_id}/metadata/{metadata_id}","href":"/ja/api-reference/metadata/update-metadata-field"},{"title":"メタデータフィールドを削除","deprecated":null,"version":null,"sidebarTitle":"メタデータフィールドを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/{dataset_id}/metadata/{metadata_id}","href":"/ja/api-reference/metadata/delete-metadata-field"},{"title":"組み込みメタデータフィールドを取得","deprecated":null,"version":null,"sidebarTitle":"組み込みメタデータフィールドを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/metadata/built-in","href":"/ja/api-reference/metadata/get-built-in-metadata-fields"},{"title":"組み込みメタデータフィールドを更新","deprecated":null,"version":null,"sidebarTitle":"組み込みメタデータフィールドを更新","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/metadata/built-in/{action}","href":"/ja/api-reference/metadata/update-built-in-metadata-field"},{"title":"ドキュメントメタデータを一括更新","deprecated":null,"version":null,"sidebarTitle":"ドキュメントメタデータを一括更新","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/documents/metadata","href":"/ja/api-reference/metadata/update-document-metadata-in-batch"}]},{"group":"タグ管理","pages":[{"title":"ナレッジベースタグを作成","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースタグを作成","openapi":"/ja/api-reference/openapi_service.json post /datasets/tags","href":"/ja/api-reference/tags/create-knowledge-tag"},{"title":"ナレッジベースタグリストを取得","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースタグリストを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/tags","href":"/ja/api-reference/tags/list-knowledge-tags"},{"title":"ナレッジベースタグを変更","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースタグを変更","openapi":"/ja/api-reference/openapi_service.json patch /datasets/tags","href":"/ja/api-reference/tags/update-knowledge-tag"},{"title":"ナレッジベースタグを削除","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースタグを削除","openapi":"/ja/api-reference/openapi_service.json delete /datasets/tags","href":"/ja/api-reference/tags/delete-knowledge-tag"},{"title":"タグをナレッジベースにバインド","deprecated":null,"version":null,"sidebarTitle":"タグをナレッジベースにバインド","openapi":"/ja/api-reference/openapi_service.json post /datasets/tags/binding","href":"/ja/api-reference/tags/create-tag-binding"},{"title":"タグとナレッジベースのバインドを解除","deprecated":null,"version":null,"sidebarTitle":"タグとナレッジベースのバインドを解除","openapi":"/ja/api-reference/openapi_service.json post /datasets/tags/unbinding","href":"/ja/api-reference/tags/delete-tag-binding"},{"title":"ナレッジベースにバインドされたタグを取得","deprecated":null,"version":null,"sidebarTitle":"ナレッジベースにバインドされたタグを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/tags","href":"/ja/api-reference/tags/get-knowledge-base-tags"}]},{"group":"モデル","pages":[{"title":"利用可能なモデルを取得","deprecated":null,"version":null,"sidebarTitle":"利用可能なモデルを取得","openapi":"/ja/api-reference/openapi_service.json get /workspaces/current/models/model-types/{model_type}","href":"/ja/api-reference/models/get-available-models"}]},{"group":"ナレッジパイプライン","pages":[{"title":"パイプラインファイルをアップロード","deprecated":null,"version":null,"sidebarTitle":"パイプラインファイルをアップロード","openapi":"/ja/api-reference/openapi_service.json post /datasets/pipeline/file-upload","href":"/ja/api-reference/knowledge-pipeline/upload-pipeline-file"},{"title":"データソースプラグインリストを取得","deprecated":null,"version":null,"sidebarTitle":"データソースプラグインリストを取得","openapi":"/ja/api-reference/openapi_service.json get /datasets/{dataset_id}/pipeline/datasource-plugins","href":"/ja/api-reference/knowledge-pipeline/list-datasource-plugins"},{"title":"データソースノードを実行","deprecated":null,"version":null,"sidebarTitle":"データソースノードを実行","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run","href":"/ja/api-reference/knowledge-pipeline/run-datasource-node"},{"title":"パイプラインを実行","deprecated":null,"version":null,"sidebarTitle":"パイプラインを実行","openapi":"/ja/api-reference/openapi_service.json post /datasets/{dataset_id}/pipeline/run","href":"/ja/api-reference/knowledge-pipeline/run-pipeline"}]}]}]},{"item":"CLI","icon":"terminal","groups":[{"group":" ","expanded":true,"pages":[{"title":"概要","href":"/ja/cli/overview"},{"title":"クイックスタート","href":"/ja/cli/get-started"},{"title":"コマンドの検索と実行","href":"/ja/cli/find-and-run-commands"},{"group":"アプリの操作","expanded":true,"pages":[{"title":"アプリの構築","sidebarTitle":"構築","href":"/ja/cli/build-apps"},{"title":"アプリの実行","sidebarTitle":"実行","href":"/ja/cli/run-apps"},{"title":"DSL ファイルからのアプリの作成と更新","sidebarTitle":"DSL からの作成・更新","href":"/ja/cli/create-and-update-apps-from-dsl-files"},{"title":"CI と自動化での `difyctl` の使用","sidebarTitle":"CI と自動化","href":"/ja/cli/scripts-and-ci"}]},{"group":"difyctl の管理","expanded":true,"pages":[{"title":"サインインの管理","sidebarTitle":"サインインとセッション","href":"/ja/cli/manage-sign-in"},{"title":"difyctl のアップデートとアンインストール","sidebarTitle":"アップデートとアンインストール","href":"/ja/cli/update-or-uninstall"},{"title":"Dify 1.18.0 へのアップグレード","sidebarTitle":"1.18.0 へのアップグレード","href":"/ja/cli/upgrade-across-1-18"}]},{"group":"リファレンス","expanded":true,"pages":[{"title":"コマンド索引","href":"/ja/cli/reference/command-index"},{"title":"結果、エラー、終了コード","sidebarTitle":"結果とエラー","href":"/ja/cli/reference/results-errors-and-exit-codes"},{"title":"設定","href":"/ja/cli/reference/configuration"}]}]}]},{"item":"プラグイン開発","icon":"code-pull-request","pages":[{"group":"クイックスタート","icon":"rocket","pages":[{"title":"Dify プラグイン","href":"/ja/develop-plugin/getting-started/getting-started-dify-plugin"},{"title":"プラグインタイプの選択","href":"/ja/develop-plugin/getting-started/choose-plugin-type"},{"title":"Dify プラグイン CLI","href":"/ja/develop-plugin/getting-started/cli"}]},{"group":"特性と仕様","icon":"list-check","pages":[{"group":"プラグインタイプ","pages":[{"title":"一般仕様","href":"/ja/develop-plugin/features-and-specs/plugin-types/general-specifications"},{"title":"モデル仕様","href":"/ja/develop-plugin/features-and-specs/plugin-types/model-designing-rules"},{"title":"モデル API インターフェース","href":"/ja/develop-plugin/features-and-specs/plugin-types/model-schema"},{"title":"永続ストレージ","href":"/ja/develop-plugin/features-and-specs/plugin-types/persistent-storage-kv"},{"title":"ツールの戻り値","href":"/ja/develop-plugin/features-and-specs/plugin-types/tool"},{"title":"Manifest","href":"/ja/develop-plugin/features-and-specs/plugin-types/plugin-info-by-manifest"},{"title":"多言語 README","href":"/ja/develop-plugin/features-and-specs/plugin-types/multilingual-readme"},{"title":"プラグインのデバッグ","href":"/ja/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin"},{"title":"プラグインのロギング","href":"/ja/develop-plugin/features-and-specs/plugin-types/plugin-logging"}]},{"group":"高度な開発","pages":[{"group":"リバース呼び出し","pages":[{"title":"Bundle プラグインパッケージ","href":"/ja/develop-plugin/features-and-specs/advanced-development/bundle"},{"title":"Dify サービスの逆呼び出し","href":"/ja/develop-plugin/features-and-specs/advanced-development/reverse-invocation"},{"title":"App","href":"/ja/develop-plugin/features-and-specs/advanced-development/reverse-invocation-app"},{"title":"モデルの逆呼び出し","href":"/ja/develop-plugin/features-and-specs/advanced-development/reverse-invocation-model"},{"title":"ツール","href":"/ja/develop-plugin/features-and-specs/advanced-development/reverse-invocation-tool"},{"title":"カスタムモデルの統合","href":"/ja/develop-plugin/features-and-specs/advanced-development/customizable-model"},{"title":"ノード","href":"/ja/develop-plugin/features-and-specs/advanced-development/reverse-invocation-node"}]}]}]},{"group":"開発ガイドとサンプル","icon":"code","pages":[{"title":"チートシート","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/cheatsheet"},{"group":"プラグインタイプ別","pages":[{"title":"ツールプラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/tool-plugin"},{"title":"Tool OAuth","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/tool-oauth"},{"title":"モデルプロバイダープラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/creating-new-model-provider"},{"title":"エージェント戦略プラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/agent-strategy-plugin"},{"title":"データソースプラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/datasource-plugin"},{"title":"トリガープラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin"},{"title":"Endpoint プラグイン","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/endpoint"}]},{"group":"完全なサンプル","pages":[{"title":"Flomoツール(10分)","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin"},{"title":"Slack Bot","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin"},{"title":"Markdownエクスポーター","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/develop-md-exporter"},{"title":"マルチモーダルツール","href":"/ja/develop-plugin/dev-guides-and-walkthroughs/develop-multimodal-data-processing-tool"}]}]},{"group":"公開","icon":"upload","pages":[{"title":"プラグインの公開","href":"/ja/develop-plugin/publishing/marketplace-listing/release-overview"},{"group":"標準","pages":[{"title":"プラグイン開発ガイドライン","href":"/ja/develop-plugin/publishing/standards/contributor-covenant-code-of-conduct"},{"title":"プライバシーポリシーガイドライン","href":"/ja/develop-plugin/publishing/standards/privacy-protection-guidelines"}]},{"title":"マーケットプレイスにプラグインを公開","sidebarTitle":"マーケットプレイス","href":"/ja/develop-plugin/publishing/marketplace-listing/submit-plugin-to-marketplace"},{"group":"GitHub リポジトリ","pages":[{"title":"個人 GitHub リポジトリへの公開","href":"/ja/develop-plugin/publishing/marketplace-listing/release-to-individual-github-repo"}]},{"group":"ローカルファイル","pages":[{"title":"ローカルファイルとしてパッケージ化して共有","href":"/ja/develop-plugin/publishing/marketplace-listing/release-by-file"},{"title":"サードパーティ署名検証用のプラグイン署名","href":"/ja/develop-plugin/publishing/standards/third-party-signature-verification"}]},{"title":"よくある質問","sidebarTitle":"よくある質問","href":"/ja/develop-plugin/publishing/faq/faq"}]}]}]}]}]}]},"title":"触发器插件 - Dify Docs","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-B0bJ23PC.js","DynamicMarkdown-UGQuxDKp.js","zoom-image-lightbox-B0E5HDf_.js","lightbox-handle-r17bVUz3.js"]}