Skip to content

Commit

Permalink
Updated some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
salmenus committed Jun 26, 2024
1 parent e025969 commit 2c15fd3
Show file tree
Hide file tree
Showing 17 changed files with 70 additions and 91 deletions.
76 changes: 0 additions & 76 deletions docs/docs/reference/003-api/001-ai-chat.mdx

This file was deleted.

43 changes: 43 additions & 0 deletions docs/docs/reference/003-api/001-usage.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
sidebar_label: 'Usage'
description: 'The AI chat API enables programmatic interaction with the conversational UI.'
---

import {PlatformSelector} from '@site/src/components/PlatformSelector/PlatformSelector';
import {PlatformSection} from '@site/src/components/PlatformSection/PlatformSection';

import UsageSetupReact from './001-usage/_001-usage/#react.mdx';
import UsageSetupJavaScript from './001-usage/_001-usage/#js.mdx';

import UsageCallsReact from './001-usage/_002-api-calls/#react.mdx';
import UsageCallsJavaScript from './001-usage/_002-api-calls/#js.mdx';

import UsageLifecycleReact from './001-usage/_003-lifecycle/#react.mdx';
import UsageLifecycleJavaScript from './001-usage/_003-lifecycle/#js.mdx';

# AI Chat API

---

The API layer provides a way to programmatically interact with the chatbot. It enables operations such as sending
messages, getting the chat history, and more.

<PlatformSelector reactJs={() => null} javascript={() => null}/>

---

## Usage

<PlatformSection reactJs={UsageSetupReact} javascript={UsageSetupJavaScript}/>

---

## API Calls

<PlatformSection reactJs={UsageCallsReact} javascript={UsageCallsJavaScript}/>

---

## Lifecycle

<PlatformSection reactJs={UsageLifecycleReact} javascript={UsageLifecycleJavaScript}/>
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
sidebar_label: 'sendMessage(message)'
description: 'Programmatically submit a prompt to the server'
---

# `sendMessage(message)`

---

> * Method Name:
**`sendMessage(message)`**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
sidebar_label: 'resetConversation()'
description: 'Programmatically reset the conversation'
---

# `resetConversation()`

---

> * Method Name:
**`resetConversation()`**
Expand Down
9 changes: 9 additions & 0 deletions docs/docs/reference/003-api/002-methods/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"label": "Methods",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"slug": "/reference/api/methods"
}
}
Empty file.
Empty file.
Empty file.
Empty file.
14 changes: 0 additions & 14 deletions docs/docs/reference/003-api/_001-ai-chat/usage/#react.mdx

This file was deleted.

This file was deleted.

0 comments on commit 2c15fd3

Please sign in to comment.