fourthdimension
Project description
使用示例
FourthDimension支持批量导入一个文件目录下的所有文档,“path/”是存放文档的文件目录名称。
from fourthdimension import FDClient
fdClient = FDClient()
fdClient.setServeUrl("http://192.168.21.105:9090")
# answer = fdClient.query("test0731", "s6的前十是谁呢?")
# print(answer)
fdClient.deleteKB("test0731")
fdClient.createKB("test0731")
fdClient.importDocuments("test0731", "/media/ytkj/5207915e-0f68-4eae-9219-2f89014a6ae1/user/csy_project/work/RAG_fd/data_for_test", 0)
fdClient.ruminate("test0731", fdClient.CHUNK_EMBEDDING)
fdClient.ruminate("test0731", fdClient.CHUNK_SUMMARIZING)
fdClient.ruminate("test0731", fdClient.CHUNK_SELF_ASKING)
fdClient.ruminate("test0731", fdClient.SUMMARIZING)
fdClient.ruminate("test0731", fdClient.SELF_ASKING)
datas = fdClient.recallDocuments("test0731", "原神是不是抄袭")["data"]
for data in datas[:10]:
print(data)
fdClient.getKBInfo("test0731")
fdClient.deleteKB("test0731")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fourthdimension-2.0.5.tar.gz
(50.3 kB
view hashes)
Built Distribution
Close
Hashes for fourthdimension-2.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 856c00016d62b84ae5d8229e5cf254682e8a3b54577e733f347335ccb78150b7 |
|
MD5 | 54c84dd7b6d14e5071ba60e579a303a3 |
|
BLAKE2b-256 | 295eda2b7f124a5ba3dcf4b2ddf41f0cad24c91398bc2b061fe15d3e4b7387b1 |