| Modifier and Type | Class and Description |
|---|---|
static class |
BoxAI.Mode |
| Modifier and Type | Field and Description |
|---|---|
static URLTemplate |
AI_AGENT_DEFAULT_CONFIG_URL
AI agent default config url.
|
static URLTemplate |
EXTRACT_METADATA_FREEFORM_URL
AI extract metadata freeform url.
|
static URLTemplate |
EXTRACT_METADATA_STRUCTURED_URL
AI extract metadata structured url.
|
static URLTemplate |
SEND_AI_REQUEST_URL
Ask AI url.
|
static URLTemplate |
SEND_AI_TEXT_GEN_REQUEST_URL
Text gen AI url.
|
| Modifier and Type | Method and Description |
|---|---|
static BoxAIResponse |
extractMetadataFreeform(BoxAPIConnection api,
String prompt,
List<BoxAIItem> items)
Sends an AI request to supported Large Language Models (LLMs) and extracts metadata in form of key-value pairs.
|
static BoxAIResponse |
extractMetadataFreeform(BoxAPIConnection api,
String prompt,
List<BoxAIItem> items,
BoxAIAgentExtract agent)
Sends an AI request to supported Large Language Models (LLMs) and extracts metadata in form of key-value pairs.
|
static BoxAIExtractStructuredResponse |
extractMetadataStructured(BoxAPIConnection api,
List<BoxAIItem> items,
BoxAIExtractMetadataTemplate template)
Sends an AI request to supported Large Language Models (LLMs) and returns extracted metadata as a set of
key-value pairs.
|
static BoxAIExtractStructuredResponse |
extractMetadataStructured(BoxAPIConnection api,
List<BoxAIItem> items,
BoxAIExtractMetadataTemplate template,
BoxAIAgentExtractStructured agent)
Sends an AI request to supported Large Language Models (LLMs) and returns extracted metadata as a set of
key-value pairs.
|
static BoxAIExtractStructuredResponse |
extractMetadataStructured(BoxAPIConnection api,
List<BoxAIItem> items,
List<BoxAIExtractField> fields)
Sends an AI request to supported Large Language Models (LLMs) and returns extracted metadata as a set of
key-value pairs.
|
static BoxAIExtractStructuredResponse |
extractMetadataStructured(BoxAPIConnection api,
List<BoxAIItem> items,
List<BoxAIExtractField> fields,
BoxAIAgentExtractStructured agent)
Sends an AI request to supported Large Language Models (LLMs) and returns extracted metadata as a set of
key-value pairs.
|
static BoxAIAgent |
getAiAgentDefaultConfig(BoxAPIConnection api,
BoxAIAgent.Mode mode)
Get the default AI Agent use for the given mode.
|
static BoxAIAgent |
getAiAgentDefaultConfig(BoxAPIConnection api,
BoxAIAgent.Mode mode,
String language,
String model)
Get the default AI Agent use for the given mode.
|
static BoxAIResponse |
sendAIRequest(BoxAPIConnection api,
String prompt,
List<BoxAIItem> items,
BoxAI.Mode mode)
Sends an AI request to supported LLMs and returns an answer specifically focused
on the user's question given the provided items.
|
static BoxAIResponse |
sendAIRequest(BoxAPIConnection api,
String prompt,
List<BoxAIItem> items,
BoxAI.Mode mode,
List<BoxAIDialogueEntry> dialogueHistory,
BoxAIAgentAsk agent,
Boolean includeCitations)
Sends an AI request to supported LLMs and returns an answer specifically focused
on the user's question given the provided items.
|
static BoxAIResponse |
sendAITextGenRequest(BoxAPIConnection api,
String prompt,
List<BoxAIItem> items)
Sends an AI request to supported LLMs and returns an answer specifically focused on the creation of new text.
|
static BoxAIResponse |
sendAITextGenRequest(BoxAPIConnection api,
String prompt,
List<BoxAIItem> items,
List<BoxAIDialogueEntry> dialogueHistory)
Sends an AI request to supported LLMs and returns an answer specifically focused on the creation of new text.
|
static BoxAIResponse |
sendAITextGenRequest(BoxAPIConnection api,
String prompt,
List<BoxAIItem> items,
List<BoxAIDialogueEntry> dialogueHistory,
BoxAIAgentTextGen agent)
Sends an AI request to supported LLMs and returns an answer specifically focused on the creation of new text.
|
public static final URLTemplate SEND_AI_REQUEST_URL
public static final URLTemplate SEND_AI_TEXT_GEN_REQUEST_URL
public static final URLTemplate AI_AGENT_DEFAULT_CONFIG_URL
public static final URLTemplate EXTRACT_METADATA_FREEFORM_URL
public static final URLTemplate EXTRACT_METADATA_STRUCTURED_URL
public static BoxAIResponse sendAIRequest(BoxAPIConnection api, String prompt, List<BoxAIItem> items, BoxAI.Mode mode)
api - the API connection to be used by the created user.prompt - The prompt provided by the client to be answered by the LLM.items - The items to be processed by the LLM, currently only files are supported.mode - The mode specifies if this request is for a single or multiple items.public static BoxAIResponse sendAIRequest(BoxAPIConnection api, String prompt, List<BoxAIItem> items, BoxAI.Mode mode, List<BoxAIDialogueEntry> dialogueHistory, BoxAIAgentAsk agent, Boolean includeCitations)
api - the API connection to be used by the created user.prompt - The prompt provided by the client to be answered by the LLM.items - The items to be processed by the LLM, currently only files are supported.mode - The mode specifies if this request is for a single or multiple items.dialogueHistory - The history of prompts and answers previously passed to the LLM.
This provides additional context to the LLM in generating the response.agent - The AI agent configuration to be used for the request.includeCitations - Whether to include citations in the response.public static BoxAIResponse sendAITextGenRequest(BoxAPIConnection api, String prompt, List<BoxAIItem> items)
api - the API connection to be used by the created user.prompt - The prompt provided by the client to be answered by the LLM.items - The items to be processed by the LLM, currently only files are supported.public static BoxAIResponse sendAITextGenRequest(BoxAPIConnection api, String prompt, List<BoxAIItem> items, List<BoxAIDialogueEntry> dialogueHistory)
api - the API connection to be used by the created user.prompt - The prompt provided by the client to be answered by the LLM.items - The items to be processed by the LLM, currently only files are supported.dialogueHistory - The history of prompts and answers previously passed to the LLM.
This provides additional context to the LLM in generating the response.public static BoxAIResponse sendAITextGenRequest(BoxAPIConnection api, String prompt, List<BoxAIItem> items, List<BoxAIDialogueEntry> dialogueHistory, BoxAIAgentTextGen agent)
api - the API connection to be used by the created user.prompt - The prompt provided by the client to be answered by the LLM.items - The items to be processed by the LLM, currently only files are supported.dialogueHistory - The history of prompts and answers previously passed to the LLM.
This provides additional context to the LLM in generating the response.agent - The AI agent configuration to be used for the request.public static BoxAIAgent getAiAgentDefaultConfig(BoxAPIConnection api, BoxAIAgent.Mode mode)
api - The API connection to be used by the created user.mode - The mode to filter the agent config to return.public static BoxAIAgent getAiAgentDefaultConfig(BoxAPIConnection api, BoxAIAgent.Mode mode, String language, String model)
api - The API connection to be used by the created user.mode - The mode to filter the agent config to return.language - The language to filter the agent config to return.model - The model to filter the agent config to return.public static BoxAIResponse extractMetadataFreeform(BoxAPIConnection api, String prompt, List<BoxAIItem> items)
api - the API connection to be used by the created user.prompt - The prompt provided by the client to be answered by the LLM.items - The items to be processed by the LLM, currently only files are supported.public static BoxAIResponse extractMetadataFreeform(BoxAPIConnection api, String prompt, List<BoxAIItem> items, BoxAIAgentExtract agent)
api - the API connection to be used by the created user.prompt - The prompt provided by the client to be answered by the LLM.items - The items to be processed by the LLM, currently only files are supported.agent - The AI agent configuration to be used for the request.public static BoxAIExtractStructuredResponse extractMetadataStructured(BoxAPIConnection api, List<BoxAIItem> items, BoxAIExtractMetadataTemplate template)
api - The API connection to be used by the created user.items - The items to be processed by the LLM, currently only files are supported.template - The metadata template to be used for the request.public static BoxAIExtractStructuredResponse extractMetadataStructured(BoxAPIConnection api, List<BoxAIItem> items, BoxAIExtractMetadataTemplate template, BoxAIAgentExtractStructured agent)
api - The API connection to be used by the created user.items - The items to be processed by the LLM, currently only files are supported.template - The metadata template to be used for the request.agent - The AI agent configuration to be used for the request.public static BoxAIExtractStructuredResponse extractMetadataStructured(BoxAPIConnection api, List<BoxAIItem> items, List<BoxAIExtractField> fields)
api - The API connection to be used by the created user.items - The items to be processed by the LLM, currently only files are supported.fields - The fields to be extracted from the items.public static BoxAIExtractStructuredResponse extractMetadataStructured(BoxAPIConnection api, List<BoxAIItem> items, List<BoxAIExtractField> fields, BoxAIAgentExtractStructured agent)
api - The API connection to be used by the created user.items - The items to be processed by the LLM, currently only files are supported.fields - The fields to be extracted from the items.agent - The AI agent configuration to be used for the request.