Add /site API (#19631)
This commit is contained in:
@@ -1332,3 +1332,63 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||
</CodeGroup>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
<Heading
|
||||
url='/site'
|
||||
method='GET'
|
||||
title='获取应用 WebApp 设置'
|
||||
name='#site'
|
||||
/>
|
||||
<Row>
|
||||
<Col>
|
||||
用于获取应用的 WebApp 设置
|
||||
### Response
|
||||
- `title` (string) WebApp 名称
|
||||
- `chat_color_theme` (string) 聊天颜色主题, hex 格式
|
||||
- `chat_color_theme_inverted` (bool) 聊天颜色主题是否反转
|
||||
- `icon_type` (string) 图标类型, `emoji`-表情, `image`-图片
|
||||
- `icon` (string) 图标, 如果是 `emoji` 类型, 则是 emoji 表情符号, 如果是 `image` 类型, 则是图片 URL
|
||||
- `icon_background` (string) hex 格式的背景色
|
||||
- `icon_url` (string) 图标 URL
|
||||
- `description` (string) 描述
|
||||
- `copyright` (string) 版权信息
|
||||
- `privacy_policy` (string) 隐私政策链接
|
||||
- `custom_disclaimer` (string) 自定义免责声明
|
||||
- `default_language` (string) 默认语言
|
||||
- `show_workflow_steps` (bool) 是否显示工作流详情
|
||||
- `use_icon_as_answer_icon` (bool) 是否使用 WebApp 图标替换聊天中的 🤖
|
||||
</Col>
|
||||
<Col>
|
||||
<CodeGroup title="Request" tag="POST" label="/meta" targetCode={`curl -X GET '${props.appDetail.api_base_url}/site' \\\n-H 'Authorization: Bearer {api_key}'`}>
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl -X GET '${props.appDetail.api_base_url}/site' \
|
||||
-H 'Authorization: Bearer {api_key}'
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Response' }}
|
||||
{
|
||||
"title": "My App",
|
||||
"chat_color_theme": "#ff4a4a",
|
||||
"chat_color_theme_inverted": false,
|
||||
"icon_type": "emoji",
|
||||
"icon": "😄",
|
||||
"icon_background": "#FFEAD5",
|
||||
"icon_url": null,
|
||||
"description": "This is my app.",
|
||||
"copyright": "all rights reserved",
|
||||
"privacy_policy": "",
|
||||
"custom_disclaimer": "All generated by AI",
|
||||
"default_language": "en-US",
|
||||
"show_workflow_steps": false,
|
||||
"use_icon_as_answer_icon": false,
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
</Col>
|
||||
</Row>
|
||||
___
|
||||
|
||||
Reference in New Issue
Block a user