POST /accicagpt/api/newaccountinit
请求参数:
(apikey可联系管理员获取)
id: string (必填) - 用户 id,不同的用户请使用不同的id
apikey: string (必填) - 密钥
curl --location --request POST 'https://IP/accicagpt/api/newaccountinit' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "3",
"apikey": "test"
}'
返回示例
{
"msg": "操作成功!",
"collection_id": "66ea8aa2af4fb",
"code": 0,
"url": "http://www.accica.com:3000/chat/share?shareId=4ab176930b216bc4",
"key": "KnowAi-zUY9lWrTBeP4jmuc"
}
POST /accicagpt/api/importData
请求参数:
id: string (必填) - 用户 id
key: string (必填) - 初始化返回的密钥
collectionId: string (必填) - 集合 id
data: array (必填) - 数据数组
curl --location --request POST 'https://IP/api/v1/importData' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "3",
"key": "KnowAi-zUZ18zzRtuc",
"collectionId": "66ea8aa2afb",
"data": [
{
"q": "你是谁?",
"a": "我是小精灵"
},
{
"q": "你会什么?",
"a": "我什么都会",
"indexes": [
{
"text": "能力"
},
{
"text": "技能"
}
]
}
]
}'
返回示例
{
"msg": "成功",
"code": 0
}
返回结果:
状态码 **200**
返回数据结构
{
"msg": "操作成功",
"code": 0
}