Class: AIManager

AIManager(client)

new AIManager(client)

Parameters:
Name Type Description
client BoxClient The Box API Client that is responsible for making calls to the API
Source:

Classes

AIManager

Methods

ask(body, optionsopt, callbackopt) → {Promise.<schemas.AiResponseFull>}

Send AI question request Sends an AI request to supported LLMs and returns an answer specifically focused on the user's question given the provided context.
Parameters:
Name Type Attributes Description
body schemas.AiAsk
options object <optional>
Options for the request
callback function <optional>
Passed the result if successful, error otherwise
Source:
Returns:
A promise resolving to the result or rejecting with an error
Type
Promise.<schemas.AiResponseFull>

ask(body, optionsopt, callbackopt) → {Promise.<schemas.AiResponseFull>}

Send AI question request Sends an AI request to supported LLMs and returns an answer specifically focused on the user's question given the provided context.
Parameters:
Name Type Attributes Description
body schemas.AiAsk
options object <optional>
Options for the request
callback function <optional>
Passed the result if successful, error otherwise
Source:
Returns:
A promise resolving to the result or rejecting with an error
Type
Promise.<schemas.AiResponseFull>

getAiAgentDefaultConfig(options, callbackopt) → {Promise.<(schemas.AiAgentAsk|schemas.AiAgentTextGen)>}

Get AI agent default configuration Get the AI agent default config
Parameters:
Name Type Attributes Description
options object Options for the request
Properties
Name Type Attributes Description
mode "ask" | "text_gen" The mode to filter the agent config to return.
language string <optional>
The ISO language code to return the agent config for. If the language is not supported the default agent config is returned.
model string <optional>
The model to return the default agent config for.
callback function <optional>
Passed the result if successful, error otherwise
Source:
Returns:
A promise resolving to the result or rejecting with an error
Type
Promise.<(schemas.AiAgentAsk|schemas.AiAgentTextGen)>

getAiAgentDefaultConfig(options, callbackopt) → {Promise.<(schemas.AiAgentAsk|schemas.AiAgentTextGen)>}

Get AI agent default configuration Get the AI agent default config
Parameters:
Name Type Attributes Description
options object Options for the request
Properties
Name Type Attributes Description
mode "ask" | "text_gen" The mode to filter the agent config to return.
language string <optional>
The ISO language code to return the agent config for. If the language is not supported the default agent config is returned.
model string <optional>
The model to return the default agent config for.
callback function <optional>
Passed the result if successful, error otherwise
Source:
Returns:
A promise resolving to the result or rejecting with an error
Type
Promise.<(schemas.AiAgentAsk|schemas.AiAgentTextGen)>

textGen(body, optionsopt, callbackopt) → {Promise.<schemas.AiResponse>}

Send AI request to generate text Sends an AI request to supported LLMs and returns an answer specifically focused on the creation of new text.
Parameters:
Name Type Attributes Description
body schemas.AiTextGen
options object <optional>
Options for the request
callback function <optional>
Passed the result if successful, error otherwise
Source:
Returns:
A promise resolving to the result or rejecting with an error
Type
Promise.<schemas.AiResponse>

textGen(body, optionsopt, callbackopt) → {Promise.<schemas.AiResponse>}

Send AI request to generate text Sends an AI request to supported LLMs and returns an answer specifically focused on the creation of new text.
Parameters:
Name Type Attributes Description
body schemas.AiTextGen
options object <optional>
Options for the request
callback function <optional>
Passed the result if successful, error otherwise
Source:
Returns:
A promise resolving to the result or rejecting with an error
Type
Promise.<schemas.AiResponse>