Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jinchat-server
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
aigc-pioneer
jinchat-server
Commits
b03634fb
提交
b03634fb
authored
5月 03, 2023
作者:
imClumsyPanda
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add api.py
上级
2c1fd2bd
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
19 行增加
和
19 行删除
+19
-19
API.md
docs/API.md
+19
-19
没有找到文件。
docs/API.md
浏览文件 @
b03634fb
...
@@ -49,7 +49,7 @@ Accept: application/json
...
@@ -49,7 +49,7 @@ Accept: application/json
```
javascript
```
javascript
const
inputBody
=
'{
const
inputBody
=
'{
"
local_doc
_id": "string",
"
knowledge_base
_id": "string",
"question": "string",
"question": "string",
"history": []
"history": []
}'
;
}'
;
...
@@ -185,7 +185,7 @@ func main() {
...
@@ -185,7 +185,7 @@ func main() {
```
json
```
json
{
{
"
local_doc
_id"
:
"string"
,
"
knowledge_base
_id"
:
"string"
,
"question"
:
"string"
,
"question"
:
"string"
,
"history"
:
[]
"history"
:
[]
}
}
...
@@ -257,7 +257,7 @@ const inputBody = '{
...
@@ -257,7 +257,7 @@ const inputBody = '{
"files": [
"files": [
"string"
"string"
],
],
"
local_doc
_id": "string"
"
knowledge_base
_id": "string"
}'
;
}'
;
const
headers
=
{
const
headers
=
{
'Content-Type'
:
'multipart/form-data'
,
'Content-Type'
:
'multipart/form-data'
,
...
@@ -392,7 +392,7 @@ func main() {
...
@@ -392,7 +392,7 @@ func main() {
```
yaml
```
yaml
files
:
files
:
-
string
-
string
local_doc
_id
:
string
knowledge_base
_id
:
string
```
```
...
@@ -432,13 +432,13 @@ This operation does not require authentication
...
@@ -432,13 +432,13 @@ This operation does not require authentication
```
shell
```
shell
# You can also use wget
# You can also use wget
curl
-X
GET /chat-docs/list?
local_doc
_id
=
doc_id1
\
curl
-X
GET /chat-docs/list?
knowledge_base
_id
=
doc_id1
\
-H
'Accept: application/json'
-H
'Accept: application/json'
```
```
```
http
```
http
GET
/chat-docs/list?
local_doc
_id=doc_id1
HTTP
/
1.1
GET
/chat-docs/list?
knowledge_base
_id=doc_id1
HTTP
/
1.1
Accept: application/json
Accept: application/json
...
@@ -450,7 +450,7 @@ const headers = {
...
@@ -450,7 +450,7 @@ const headers = {
'Accept'
:
'application/json'
'Accept'
:
'application/json'
};
};
fetch
(
'/chat-docs/list?
local_doc
_id=doc_id1'
,
fetch
(
'/chat-docs/list?
knowledge_base
_id=doc_id1'
,
{
{
method
:
'GET'
,
method
:
'GET'
,
...
@@ -474,7 +474,7 @@ headers = {
...
@@ -474,7 +474,7 @@ headers = {
result
=
RestClient
.
get
'/chat-docs/list'
,
result
=
RestClient
.
get
'/chat-docs/list'
,
params:
{
params:
{
'
local_doc
_id'
=>
'string'
'
knowledge_base
_id'
=>
'string'
},
headers:
headers
},
headers:
headers
p
JSON
.
parse
(
result
)
p
JSON
.
parse
(
result
)
...
@@ -488,7 +488,7 @@ headers = {
...
@@ -488,7 +488,7 @@ headers = {
}
}
r
=
requests
.
get
(
'/chat-docs/list'
,
params
=
{
r
=
requests
.
get
(
'/chat-docs/list'
,
params
=
{
'
local_doc
_id'
:
'doc_id1'
'
knowledge_base
_id'
:
'doc_id1'
},
headers
=
headers
)
},
headers
=
headers
)
print
(
r
.
json
())
print
(
r
.
json
())
...
@@ -527,7 +527,7 @@ try {
...
@@ -527,7 +527,7 @@ try {
```
```
```
java
```
java
URL
obj
=
new
URL
(
"/chat-docs/list?
local_doc
_id=doc_id1"
);
URL
obj
=
new
URL
(
"/chat-docs/list?
knowledge_base
_id=doc_id1"
);
HttpURLConnection
con
=
(
HttpURLConnection
)
obj
.
openConnection
();
HttpURLConnection
con
=
(
HttpURLConnection
)
obj
.
openConnection
();
con
.
setRequestMethod
(
"GET"
);
con
.
setRequestMethod
(
"GET"
);
int
responseCode
=
con
.
getResponseCode
();
int
responseCode
=
con
.
getResponseCode
();
...
@@ -576,7 +576,7 @@ func main() {
...
@@ -576,7 +576,7 @@ func main() {
|Name|In|Type|Required|Description|
|Name|In|Type|Required|Description|
|---|---|---|---|---|
|---|---|---|---|---|
|
local_doc
_id|query|string|true|Document ID|
|
knowledge_base
_id|query|string|true|Document ID|
> Example responses
> Example responses
...
@@ -629,7 +629,7 @@ Accept: application/json
...
@@ -629,7 +629,7 @@ Accept: application/json
```
javascript
```
javascript
const
inputBody
=
'{
const
inputBody
=
'{
"
local_doc
_id": "string",
"
knowledge_base
_id": "string",
"doc_name": "string"
"doc_name": "string"
}'
;
}'
;
const
headers
=
{
const
headers
=
{
...
@@ -763,7 +763,7 @@ func main() {
...
@@ -763,7 +763,7 @@ func main() {
> Body parameter
> Body parameter
```
yaml
```
yaml
local_doc
_id
:
string
knowledge_base
_id
:
string
doc_name
:
string
doc_name
:
string
```
```
...
@@ -831,7 +831,7 @@ BaseResponse
...
@@ -831,7 +831,7 @@ BaseResponse
```
json
```
json
{
{
"
local_doc
_id"
:
"string"
,
"
knowledge_base
_id"
:
"string"
,
"question"
:
"string"
,
"question"
:
"string"
,
"history"
:
[]
"history"
:
[]
}
}
...
@@ -844,7 +844,7 @@ Body_chat_chat_docs_chat_post
...
@@ -844,7 +844,7 @@ Body_chat_chat_docs_chat_post
|Name|Type|Required|Restrictions|Description|
|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|---|---|---|---|---|
|
local_doc_id|string|true|none|Document ID
|
|
knowledge_base_id|string|true|none|Knowledge Base Name
|
|question|string|true|none|Question|
|question|string|true|none|Question|
|history|
[
array
]
|false|none|History of previous questions and answers|
|history|
[
array
]
|false|none|History of previous questions and answers|
...
@@ -857,7 +857,7 @@ Body_chat_chat_docs_chat_post
...
@@ -857,7 +857,7 @@ Body_chat_chat_docs_chat_post
```
json
```
json
{
{
"
local_doc
_id"
:
"string"
,
"
knowledge_base
_id"
:
"string"
,
"doc_name"
:
"string"
"doc_name"
:
"string"
}
}
...
@@ -869,7 +869,7 @@ Body_delete_docs_chat_docs_delete_delete
...
@@ -869,7 +869,7 @@ Body_delete_docs_chat_docs_delete_delete
|Name|Type|Required|Restrictions|Description|
|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|---|---|---|---|---|
|
local_doc_id|string|true|none|local doc id
|
|
knowledge_base_id|string|true|none|Knowledge Base Name
|
|doc_name|string|false|none|doc name|
|doc_name|string|false|none|doc name|
<h2
id=
"tocS_Body_upload_file_chat_docs_upload_post"
>
Body_upload_file_chat_docs_upload_post
</h2>
<h2
id=
"tocS_Body_upload_file_chat_docs_upload_post"
>
Body_upload_file_chat_docs_upload_post
</h2>
...
@@ -884,7 +884,7 @@ Body_delete_docs_chat_docs_delete_delete
...
@@ -884,7 +884,7 @@ Body_delete_docs_chat_docs_delete_delete
"files"
:
[
"files"
:
[
"string"
"string"
],
],
"
local_doc
_id"
:
"string"
"
knowledge_base
_id"
:
"string"
}
}
```
```
...
@@ -896,7 +896,7 @@ Body_upload_file_chat_docs_upload_post
...
@@ -896,7 +896,7 @@ Body_upload_file_chat_docs_upload_post
|Name|Type|Required|Restrictions|Description|
|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|---|---|---|---|---|
|files|
[
string
]
|true|none|none|
|files|
[
string
]
|true|none|none|
|
local_doc_id|string|true|none|Local document ID
|
|
knowledge_base_id|string|true|none|Knowledge Base Name
|
<h2
id=
"tocS_ChatMessage"
>
ChatMessage
</h2>
<h2
id=
"tocS_ChatMessage"
>
ChatMessage
</h2>
<!-- backwards compatibility -->
<!-- backwards compatibility -->
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论