> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# アノテーション返信を設定

> **対象アプリ**：Chatflow、チャットボット、Agent。

アノテーション返信機能を有効または無効にします。リクエストボディはアクションの実行前に検証されるため、`enable` と `disable` のどちらでも `embedding_provider_name`、`embedding_model_name`、`score_threshold` が必須です。非同期で実行されます。進捗は [アノテーション返信の初期設定タスクステータスを取得](/ja/api-reference/annotations/get-annotation-reply-job-status) で追跡してください。



## OpenAPI

````yaml /ja/api-reference/openapi_service.json post /apps/annotation-reply/{action}
openapi: 3.0.1
info:
  title: Dify サービス API
  description: >-
    Dify アプリケーションとナレッジベースのための REST API です。アプリケーション系エンドポイントはアプリの API
    キーで、ナレッジ系エンドポイントはナレッジベースの API キーで認証します。
  version: 1.0.0
servers:
  - url: https://{api_base_url}
    description: Dify サービス API のベース URL です。セルフホスト環境では、独自の API ベース URL に置き換えてください。
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: API ベース URL のホストとパス（`https://` を除く）。
security:
  - ApiKeyAuth: []
tags:
  - name: チャットメッセージ
    description: チャットメッセージとインタラクションに関連する操作です。
  - name: ファイル操作
    description: ファイルのアップロードとプレビューの操作です。
  - name: エンドユーザー
    description: エンドユーザー情報に関連する操作です。
  - name: メッセージフィードバック
    description: ユーザーフィードバックの操作です。
  - name: 会話管理
    description: 会話管理に関連する操作です。
  - name: 音声・テキスト変換
    description: テキスト読み上げと音声認識の操作です。
  - name: アプリケーション設定
    description: アプリケーション設定と情報を取得する操作です。
  - name: アノテーション管理
    description: ダイレクト返信用のアノテーション管理に関連する操作です。
  - name: 人間の入力
    description: 人間の入力を要する一時停止中のワークフローの再開操作です。
  - name: ワークフロー実行
    description: ワークフローの実行と管理のための操作です。
  - name: 完了メッセージ
    description: テキスト生成に関連する操作です。
  - name: ナレッジベース
    description: ナレッジベースの作成、設定、取得を含むナレッジベース管理の操作です。
  - name: ドキュメント
    description: ナレッジベース内のドキュメントの作成、更新、管理のための操作です。
  - name: チャンク
    description: ドキュメントチャンクと子チャンクの管理のための操作です。
  - name: メタデータ
    description: ナレッジベースのメタデータフィールドとドキュメントメタデータ値の管理のための操作です。
  - name: タグ管理
    description: ナレッジベースタグとタグバインディングの管理のための操作です。
  - name: モデル
    description: 利用可能なモデルを取得するための操作です。
  - name: ナレッジパイプライン
    description: データソースプラグインとパイプライン実行を含むナレッジパイプラインの管理と実行のための操作です。
paths:
  /apps/annotation-reply/{action}:
    post:
      tags:
        - アノテーション管理
      summary: アノテーション返信を設定
      description: >-
        **対象アプリ**：Chatflow、チャットボット、Agent。


        アノテーション返信機能を有効または無効にします。リクエストボディはアクションの実行前に検証されるため、`enable` と `disable`
        のどちらでも
        `embedding_provider_name`、`embedding_model_name`、`score_threshold`
        が必須です。非同期で実行されます。進捗は
        [アノテーション返信の初期設定タスクステータスを取得](/ja/api-reference/annotations/get-annotation-reply-job-status)
        で追跡してください。
      operationId: setChatAnnotationReplyJa
      parameters:
        - name: action
          in: path
          required: true
          description: 実行するアクションです。
          schema:
            type: string
            enum:
              - enable
              - disable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitialAnnotationReplySettingsRequest'
            examples:
              enableAnnotationReply:
                summary: リクエスト例
                value:
                  score_threshold: 0.9
                  embedding_provider_name: openai
                  embedding_model_name: text-embedding-3-small
      responses:
        '200':
          description: アノテーション返信設定タスクが開始されました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitialAnnotationReplySettingsResponse'
              examples:
                annotationReplyResponse:
                  summary: レスポンス例
                  value:
                    job_id: a1b2c3d4-5678-90ab-cdef-1234567890ab
                    job_status: waiting
components:
  schemas:
    InitialAnnotationReplySettingsRequest:
      type: object
      description: アノテーション返信設定を構成するためのリクエストボディです。
      required:
        - score_threshold
        - embedding_provider_name
        - embedding_model_name
      properties:
        embedding_provider_name:
          type: string
          description: 埋め込みモデルプロバイダーの名前（例：`openai`、`cohere`）です。
        embedding_model_name:
          type: string
          description: アノテーションマッチングに使用する埋め込みモデルの名前です（例：`text-embedding-3-small`）。
        score_threshold:
          type: number
          format: float
          description: アノテーションがマッチとみなされるための最低類似度スコアです。値が高いほど、より正確なマッチが必要になります。
    InitialAnnotationReplySettingsResponse:
      type: object
      properties:
        job_id:
          type: string
          format: uuid
          description: >-
            非同期ジョブ ID
            です。[アノテーション返信の初期設定タスクステータスを取得](/ja/api-reference/annotations/get-annotation-reply-job-status)
            と組み合わせて進捗を追跡します。
        job_status:
          type: string
          description: >-
            現在のジョブステータスです。このエンドポイントが返すのは `waiting`（キュー待ち）または
            `processing`（処理中）のみです。`completed` と `error` は
            [アノテーション返信の初期設定タスクステータスを取得](/ja/api-reference/annotations/get-annotation-reply-job-status)
            からのみ返されます。
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        API Key 認証です。すべての API リクエストにおいて、`Authorization` HTTP ヘッダーに `Bearer `
        プレフィックスを付けた API Key を含めてください。例：`Authorization: Bearer {API_KEY}`。**API
        Key はサーバーサイドに保存し、クライアントサイドで共有・保存しないことを強く推奨します。API Key
        の漏洩は深刻な結果につながる可能性があります。**API Key が欠落または無効な場合、HTTP `401` とエラーコード
        `unauthorized` が返されます。

````