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

get
https://api.box.com/2.0
/ai_agent_default

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

リクエスト

bearer [ACCESS_TOKEN]
application/json

クエリパラメータ

stringクエリ内省略可能
ja

返されるエージェント構成のISO言語コード。その言語がサポートされていない場合は、デフォルトのエージェント構成が返されます。

stringクエリ内必須
ask

返されるエージェント構成にフィルタをかけるためのモード。

次の値のいずれか1つ: ask,text_gen

stringクエリ内省略可能
openai__gpt_3_5_turbo

返されるデフォルトのエージェント構成のモデル。

レスポンス

デフォルトのエージェント構成を含む成功したレスポンス。このレスポンスは、質問用のAIエージェントとテキスト生成用のAIエージェントのいずれかのオブジェクトになります。レスポンスは、このエンドポイントでリクエストされたエージェント構成によって決まります。

予期しないクライアントエラー。

予期しないサーバーエラー。

get
AIエージェントのデフォルト構成を取得
このドキュメント内で一部のAPIを試せるようになりました。
ログイン

リクエストの例

cURL
curl -L GET "https://api.box.com/2.0/ai_agent_default?mode=text_gen" \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
TypeScript Gen
await client.ai.getAiAgentDefaultConfig({
  mode: 'text_gen' as GetAiAgentDefaultConfigQueryParamsModeField,
  language: 'en-US',
} satisfies GetAiAgentDefaultConfigQueryParams);
Python Gen
client.ai.get_ai_agent_default_config(
    GetAiAgentDefaultConfigMode.TEXT_GEN.value, language="en-US"
)
.NET Gen
await client.Ai.GetAiAgentDefaultConfigAsync(queryParams: new GetAiAgentDefaultConfigQueryParams(mode: GetAiAgentDefaultConfigQueryParamsModeField.TextGen) { Language = "en-US" });
Java
BoxAIAgentConfig config = BoxAI.getAiAgentDefaultConfig(
    api,
    BoxAIAgent.Mode.ASK,
    "en",
    "openai__gpt_3_5_turbo"
);
Python
config = client.get_ai_agent_default_config(
    mode='text_gen',
    language='en',
    model='openai__gpt_3_5_turbo'
)
print(config)
Node
client.ai.getAiAgentDefaultConfig({
    mode: 'ask',
    language: 'en',
    model:'openai__gpt_3_5_turbo'
}).then(response => {
    /* response -> {
        "type": "ai_agent_ask",
        "basic_text": {
            "llm_endpoint_params": {
            "type": "openai_params",
            "frequency_penalty": 1.5,
            "presence_penalty": 1.5,
            "stop": "<|im_end|>",
            "temperature": 0,
            "top_p": 1
            },
            "model": "openai__gpt_3_5_turbo",
            "num_tokens_for_completion": 8400,
            "prompt_template": "It is `{current_date}`, and I have $8000 and want to spend a week in the Azores. What should I see?",
            "system_message": "You are a helpful travel assistant specialized in budget travel"
        },
        ...
    } */
});

レスポンスの例

{
  "type": "ai_agent_ask",
  "basic_text": {
    "llm_endpoint_params": {
      "type": "openai_params",
      "frequency_penalty": 1.5,
      "presence_penalty": 1.5,
      "stop": "<|im_end|>",
      "temperature": 0,
      "top_p": 1
    },
    "model": "openai__gpt_3_5_turbo",
    "num_tokens_for_completion": 8400,
    "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer `{user_question}`",
    "system_message": "You are a helpful travel assistant specialized in budget travel"
  },
  "basic_text_multi": {
    "llm_endpoint_params": {
      "type": "openai_params",
      "frequency_penalty": 1.5,
      "presence_penalty": 1.5,
      "stop": "<|im_end|>",
      "temperature": 0,
      "top_p": 1
    },
    "model": "openai__gpt_3_5_turbo",
    "num_tokens_for_completion": 8400,
    "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer `{user_question}`",
    "system_message": "You are a helpful travel assistant specialized in budget travel"
  },
  "long_text": {
    "embeddings": {
      "model": "openai__text_embedding_ada_002",
      "strategy": {
        "id": "basic",
        "num_tokens_per_chunk": 64
      }
    },
    "llm_endpoint_params": {
      "type": "openai_params",
      "frequency_penalty": 1.5,
      "presence_penalty": 1.5,
      "stop": "<|im_end|>",
      "temperature": 0,
      "top_p": 1
    },
    "model": "openai__gpt_3_5_turbo",
    "num_tokens_for_completion": 8400,
    "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer `{user_question}`",
    "system_message": "You are a helpful travel assistant specialized in budget travel"
  },
  "long_text_multi": {
    "embeddings": {
      "model": "openai__text_embedding_ada_002",
      "strategy": {
        "id": "basic",
        "num_tokens_per_chunk": 64
      }
    },
    "llm_endpoint_params": {
      "type": "openai_params",
      "frequency_penalty": 1.5,
      "presence_penalty": 1.5,
      "stop": "<|im_end|>",
      "temperature": 0,
      "top_p": 1
    },
    "model": "openai__gpt_3_5_turbo",
    "num_tokens_for_completion": 8400,
    "prompt_template": "It is `{current_date}`, consider these travel options `{content}` and answer `{user_question}`",
    "system_message": "You are a helpful travel assistant specialized in budget travel"
  }
}