Modifier and Type | Class and Description |
---|---|
static class |
BoxAI.Mode |
Modifier and Type | Field and Description |
---|---|
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 |
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 |
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.
|
public static final URLTemplate SEND_AI_REQUEST_URL
public static final URLTemplate SEND_AI_TEXT_GEN_REQUEST_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 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.