保存url网址
url:/save_urls
method: POST
请求参数:
|参数名|参数类型|非空|参数说明|
|-|-|-|-|
|urls|list[string]|True|要保存的url列表|
|read_depth|list[string]|True|递归读取网页中的链接,设置层数|
|collection_name|string|True|知识库名称|
|embedding_model_name|string|True|创建知识库时设定的向量模型名称|
|options|string|False|切分文档设置。split_chunk_size:分段最大长度, split_chunk_overlap:分段重叠长度|
|api_key_config|string|False|向量模型对应的api_key|
返回参数:
|参数名|参数类型|参数说明|
|-|-|-|
|error|string|是否出现错误|
|result|dict|key:文档的key,value:标题,网址,字数|
|message|string|错误信息,当error=true时出现|
请求参数示例:
```language
{
"embedding_model_name": "jinaai/jina-embeddings-v2-base-zh",
"collection_name": "test1",
"urls": ["https://www.legco.gov.hk/tc/open-legco/press/yr2024/pr20240123-1.html"],
"read_depth": 1,
"api_key_config": {
"qianfan_ak": "xxxx",
"qianfan_sk": "xxxx",
"openai_api_key": "xxxxxx"
},
"options": {
"split_chunk_size": 1024,
"split_chunk_overlap": 10
}
}
```
返回参数示例:
```language
{"error": false,
"result": {'f39d9e64-94c6-447d-9b9a-75cb11ae1c74': {'title': '香港特別行政區立法會 - 立法會將辯論有關促進兒童醫療服務發展的議案(附件)', 'url': 'https://www.legco.gov.hk/tc/open-legco/press/yr2024/pr20240123-1.html', 'tokens': 484}, '613b5261-3706-43ef-b672-0d8340a6c938': {'title': '香港特別行政區立法會 - 首頁', 'url': 'https://www.legco.gov.hk/tc/index.html', 'tokens': 13}}}
```