Skip to content

Commit

Permalink
feat: add parameters to box ai ask and text gen (box/box-openapi#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
box-sdk-build committed Aug 12, 2024
1 parent db3a2b5 commit 413a1e0
Show file tree
Hide file tree
Showing 80 changed files with 1,756 additions and 1,489 deletions.
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "525674e", "specHash": "e50af18", "version": "1.3.0" }
{ "engineHash": "8243188", "specHash": "871a814", "version": "1.3.0" }
21 changes: 3 additions & 18 deletions docs/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ Sends an AI request to supported LLMs and returns an answer specifically focused

This operation is performed by calling function `createAiAsk`.

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

<!-- sample post_ai_ask -->

```ts
await client.ai.createAiAsk({
mode: 'multiple_item_qa' as AiAskModeField,
Expand Down Expand Up @@ -43,7 +38,7 @@ await client.ai.createAiAsk({

### Returns

This function returns a value of type `AiResponse`.
This function returns a value of type `AiAskResponse`.

A successful response including the answer from the LLM.

Expand All @@ -53,11 +48,6 @@ Sends an AI request to supported LLMs and returns an answer specifically focused

This operation is performed by calling function `createAiTextGen`.

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

<!-- sample post_ai_text_gen -->

```ts
await client.ai.createAiTextGen({
prompt: 'Parapharse the document.s',
Expand All @@ -74,12 +64,12 @@ await client.ai.createAiTextGen({
prompt: 'What does the earth go around?',
answer: 'The sun',
createdAt: dateTimeFromString('2021-01-01T00:00:00Z'),
} satisfies AiTextGenDialogueHistoryField,
} satisfies AiDialogueHistory,
{
prompt: 'On Earth, where does the sun rise?',
answer: 'East',
createdAt: dateTimeFromString('2021-01-01T00:00:00Z'),
} satisfies AiTextGenDialogueHistoryField,
} satisfies AiDialogueHistory,
],
} satisfies AiTextGen);
```
Expand All @@ -103,11 +93,6 @@ Get the AI agent default config

This operation is performed by calling function `getAiAgentDefaultConfig`.

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

<!-- sample get_ai_agent_default -->

```ts
await client.ai.getAiAgentDefaultConfig({
mode: 'text_gen' as GetAiAgentDefaultConfigQueryParamsModeField,
Expand Down
12 changes: 0 additions & 12 deletions docs/authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ format.

This operation is performed by calling function `authorizeUser`.

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

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

### Arguments
Expand Down Expand Up @@ -52,9 +49,6 @@ Box API calls.

This operation is performed by calling function `requestAccessToken`.

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

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

### Arguments
Expand All @@ -78,9 +72,6 @@ Refresh an Access Token using its client ID, secret, and refresh token.

This operation is performed by calling function `refreshAccessToken`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/post-oauth-2-token-refresh/).

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

### Arguments
Expand All @@ -105,9 +96,6 @@ that has been previously authenticated.

This operation is performed by calling function `revokeAccessToken`.

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

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

### Arguments
Expand Down
15 changes: 0 additions & 15 deletions docs/avatars.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ Retrieves an image of a the user's avatar.

This operation is performed by calling function `getUserAvatar`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/get-users-id-avatar/).

<!-- sample get_users_id_avatar -->

```ts
await client.avatars.getUserAvatar(user.id);
```
Expand All @@ -40,11 +35,6 @@ Adds or updates a user avatar.

This operation is performed by calling function `createUserAvatar`.

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

<!-- sample post_users_id_avatar -->

```ts
await client.avatars.createUserAvatar(user.id, {
pic: decodeBase64ByteStream(
Expand Down Expand Up @@ -79,11 +69,6 @@ You cannot reverse this operation.

This operation is performed by calling function `deleteUserAvatar`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/delete-users-id-avatar/).

<!-- sample delete_users_id_avatar -->

```ts
await client.avatars.deleteUserAvatar(user.id);
```
Expand Down
Loading

0 comments on commit 413a1e0

Please sign in to comment.