Skip to content

Commit

Permalink
feat: Support Box AI endpoints (box/box-openapi#416) (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
box-sdk-build authored May 6, 2024
1 parent fa9cbca commit febd8d0
Show file tree
Hide file tree
Showing 6 changed files with 794 additions and 281 deletions.
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "afd7974", "specHash": "1698c95", "version": "0.5.3" }
{ "engineHash": "afd7974", "specHash": "63d1af0", "version": "0.5.3" }
52 changes: 52 additions & 0 deletions docs/ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# AiManager

- [Send AI Ask request](#send-ai-ask-request)
- [Send AI Text Gen request](#send-ai-text-gen-request)

## Send AI Ask request

Sends an AI request to supported LLMs and returns an answer specifically focused on the user's question given the provided context.

This operation is performed by calling function `createAiAsk`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/post-ai-ask/).

_Currently we don't have an example for calling `createAiAsk` in integration tests_

### Arguments

- requestBody `AiAsk`
- Request body of createAiAsk method
- optionalsInput `CreateAiAskOptionalsInput`
-

### Returns

This function returns a value of type `AiResponse`.

A successful response including the answer from the LLM.

## Send AI Text Gen request

Sends an AI request to supported LLMs and returns an answer specifically focused on the creation of new text.

This operation is performed by calling function `createAiTextGen`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/post-ai-text-gen/).

_Currently we don't have an example for calling `createAiTextGen` in integration tests_

### Arguments

- requestBody `AiTextGen`
- Request body of createAiTextGen method
- optionalsInput `CreateAiTextGenOptionalsInput`
-

### Returns

This function returns a value of type `AiResponse`.

A successful response including the answer from the LLM.
Loading

0 comments on commit febd8d0

Please sign in to comment.