⚗️ Implement chat API
This commit is contained in:
@@ -88,8 +88,8 @@ module.exports = {
|
||||
},
|
||||
presets: [
|
||||
[
|
||||
'docusaurus-preset-openapi',
|
||||
/** @type {import('docusaurus-preset-openapi').Options} */
|
||||
'@typebot.io/docusaurus-preset-openapi',
|
||||
/** @type {import('@typebot.io/docusaurus-preset-openapi').Options} */
|
||||
{
|
||||
api: {
|
||||
path: 'openapi',
|
||||
|
||||
4
apps/docs/openapi/builder/_category_.json
Normal file
4
apps/docs/openapi/builder/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Builder",
|
||||
"sidebar_position": 2
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
slug: /
|
||||
---
|
||||
|
||||
# Authentication
|
||||
3
apps/docs/openapi/chat/_category_.json
Normal file
3
apps/docs/openapi/chat/_category_.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"label": "Chat (Experimental 🧪)"
|
||||
}
|
||||
1696
apps/docs/openapi/chat/_spec_.json
Normal file
1696
apps/docs/openapi/chat/_spec_.json
Normal file
File diff suppressed because it is too large
Load Diff
28
apps/docs/openapi/introduction.md
Normal file
28
apps/docs/openapi/introduction.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
slug: /
|
||||
---
|
||||
|
||||
# Introduction
|
||||
|
||||
Typebot currently offers 2 APIs: **Builder** and **Chat**
|
||||
|
||||
## Builder
|
||||
|
||||
The Builder API is about what you can edit on https://app.typebot.io (i.e. create typebots, insert blocks etc, get results...). It is currently under active development and new endpoints will be added incrementally.
|
||||
|
||||
## Chat
|
||||
|
||||
:::caution
|
||||
You should not use it in production. This API is experimental at the moment and will be heavily modified with time.
|
||||
:::
|
||||
|
||||
The Chat API allows you to execute (chat) with a typebot.
|
||||
|
||||
### How to find my `typebotId`
|
||||
|
||||
<img
|
||||
src="/img/api/typebotId.png"
|
||||
width="900"
|
||||
alt="Get typebot ID"
|
||||
/>
|
||||
@@ -13,21 +13,21 @@
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids",
|
||||
"update-search": "docker run -it --rm --env-file=.env -e \"CONFIG=$(cat docsearch-scrapper-config.json | jq -r tostring)\" algolia/docsearch-scraper",
|
||||
"api:generate": "tsx --tsconfig ../builder/tsconfig.json ../builder/src/utils/server/generateOpenApi.ts"
|
||||
"api:generate": "tsx --tsconfig ../builder/tsconfig.json ../builder/src/utils/server/generateOpenApi.ts && tsx --tsconfig ../viewer/openapi.tsconfig.json ../viewer/src/utils/server/generateOpenApi.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.2.0",
|
||||
"@docusaurus/preset-classic": "2.2.0",
|
||||
"@docusaurus/theme-search-algolia": "2.2.0",
|
||||
"@docusaurus/theme-common": "2.2.0",
|
||||
"docusaurus-preset-openapi": "^0.6.3",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"@docusaurus/theme-search-algolia": "2.2.0",
|
||||
"@mdx-js/react": "1.6.22",
|
||||
"@svgr/webpack": "6.5.1",
|
||||
"clsx": "1.2.1",
|
||||
"@typebot.io/docusaurus-preset-openapi": "0.6.5",
|
||||
"file-loader": "6.2.0",
|
||||
"prism-react-renderer": "1.3.5",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"url-loader": "4.1.1"
|
||||
},
|
||||
"browserslist": {
|
||||
|
||||
@@ -110,3 +110,22 @@ details {
|
||||
.theme-api-markdown table td {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.admonition {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.admonition-heading svg {
|
||||
margin-right: 0.5rem;
|
||||
fill: currentColor;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.admonition-heading {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.admonition-heading h5 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
BIN
apps/docs/static/img/api/typebotId.png
vendored
Normal file
BIN
apps/docs/static/img/api/typebotId.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 MiB |
Reference in New Issue
Block a user