2
0

⚗️ Implement chat API

This commit is contained in:
Baptiste Arnaud
2022-11-29 10:02:40 +01:00
parent 49ba434350
commit bf0d0c2475
122 changed files with 5075 additions and 292 deletions

View File

@@ -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',

View File

@@ -0,0 +1,4 @@
{
"label": "Builder",
"sidebar_position": 2
}

View File

@@ -1,6 +1,5 @@
---
sidebar_position: 1
slug: /
---
# Authentication

View File

@@ -0,0 +1,3 @@
{
"label": "Chat (Experimental 🧪)"
}

File diff suppressed because it is too large Load Diff

View 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"
/>

View File

@@ -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": {

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB