Box Developerドキュメント
 

    AIエージェントのデフォルト構成を取得する

    ガイド Box AI AIモデルの上書き AIエージェントのデフォルト構成を取得する

    AIエージェントのデフォルト構成を取得する

    GET /2.0/ai_agent_defaultエンドポイントを使用すると、AIサービスのデフォルト構成を取得できます。構成の詳細を取得したら、ai_agentパラメータを使用して構成を上書きできます。

    リクエストの送信

    リクエストを送信するには、GET /2.0/ai_agent_defaultエンドポイントを使用します。

    アプリを承認するための開発者トークンを生成済みであることを確認します。詳細については、Box AIの使い方を参照してください。

    cURL
    curl -L GET "https://api.box.com/2.0/ai_agent_default?mode=text_gen" \
         -H 'Authorization: Bearer <ACCESS_TOKEN>'

    パラメータ

    コールを実行するには、以下のパラメータを渡す必要があります。必須のパラメータは太字で示されています。

    パラメータ説明
    language返されるエージェントの構成の言語コード。その言語がサポートされていない場合は、デフォルト構成が返されます。ja-JP
    modeエージェントの構成にフィルタをかけるためのモード。値は、取得したい結果に応じて、asktext_genextract、またはextract_structuredにします。ask
    model構成を取得する対象となるモデル。選択したモデルがサポートされていることを確認するには、モデルのリストを参照してください。azure__openai__gpt_4o_mini

    レスポンス

    コールに対するレスポンスは、選択したmodeパラメータ値によって異なる場合があります。

    質問

    modeパラメータをaskに設定すると、レスポンスは次のようになります。

    {
         "type": "ai_agent_ask",
         "basic_text": {
              "model": "azure__openai__gpt_4o_mini",
              "system_message": "",
              "prompt_template": "prompt_template": "{user_question}Write it in an informal way.{content}"
            },
              "num_tokens_for_completion": 6000,
              "llm_endpoint_params": {
                   "temperature": 0,
                   "top_p": 1,
                   "frequency_penalty": 0,
                   "presence_penalty": 1.5,
                   "stop": "<|im_end|>",
                   "type": "openai_params"
              }
         },
         "long_text": {
              "model": "azure__openai__gpt_4o_mini",
              "system_message": "",
              "prompt_template": "prompt_template": "{user_question}Write it in an informal way.{content}"
            },
              "num_tokens_for_completion": 6000,
              "llm_endpoint_params": {
                   "temperature": 0,
                   "top_p": 1,
                   "frequency_penalty": 0,
                   "presence_penalty": 1.5,
                   "stop": "<|im_end|>",
                   "type": "openai_params"
              },
              "embeddings": {
                   "model": "azure__openai__text_embedding_ada_002",
                   "strategy": {
                        "id": "basic",
                        "num_tokens_per_chunk": 64
                   }
              }
         },
         "basic_text_multi": {
              "model": "azure__openai__gpt_4o_mini",
              "system_message": "",
              "prompt_template": "Current date: {current_date}\n\nTEXT FROM DOCUMENTS STARTS\n{content}\nTEXT FROM DOCUMENTS ENDS\n\nHere is how I need help from you: {user_question}\n.",
              "num_tokens_for_completion": 6000,
              "llm_endpoint_params": {
                   "temperature": 0,
                   "top_p": 1,
                   "frequency_penalty": 0,
                   "presence_penalty": 1.5,
                   "stop": "<|im_end|>",
                   "type": "openai_params"
              }
         },
         "long_text_multi": {
              "model": "azure__openai__gpt_4o_mini",
              "system_message": "Role and Goal: You are an assistant designed to analyze and answer a question based on provided snippets from multiple documents, which can include business-oriented documents like docs, presentations, PDFs, etc. The assistant will respond concisely, using only the information from the provided documents.\n\nConstraints: The assistant should avoid engaging in chatty or extensive conversational interactions and focus on providing direct answers. It should also avoid making assumptions or inferences not supported by the provided document snippets.\n\nGuidelines: When answering, the assistant should consider the file's name and path to assess relevance to the question. In cases of conflicting information from multiple documents, it should list the different answers with citations. For summarization or comparison tasks, it should concisely answer with the key points. It should also consider the current date to be the date given.\n\nPersonalization: The assistant's tone should be formal and to-the-point, suitable for handling business-related documents and queries.\n",
              "prompt_template": "Current date: {current_date}\n\nTEXT FROM DOCUMENTS STARTS\n{content}\nTEXT FROM DOCUMENTS ENDS\n\nHere is how I need help from you: {user_question}\n.",
              "num_tokens_for_completion": 6000,
              "llm_endpoint_params": {
                   "temperature": 0,
                   "top_p": 1,
                   "frequency_penalty": 0,
                   "presence_penalty": 1.5,
                   "stop": "<|im_end|>",
                   "type": "openai_params"
              },
              "embeddings": {
                   "model": "azure__openai__text_embedding_ada_002",
                   "strategy": {
                        "id": "basic",
                        "num_tokens_per_chunk": 64
                   }
              }
         }
    }