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.8.tar.gz
(53.7 kB
view details)
Built Distribution
File details
Details for the file fourthdimension-2.0.8.tar.gz
.
File metadata
- Download URL: fourthdimension-2.0.8.tar.gz
- Upload date:
- Size: 53.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3ffce0a2259de4e7df9cb5e95ad5c3c0f141064ff71ef18f034287147499405 |
|
MD5 | e922c57d4a43f1606b416478e9cfe9e5 |
|
BLAKE2b-256 | 9933d8fbb6dab7bd54f725353cd6543bbf3d775331e691c2cfdf09b3309cf450 |
File details
Details for the file fourthdimension-2.0.8-py3-none-any.whl
.
File metadata
- Download URL: fourthdimension-2.0.8-py3-none-any.whl
- Upload date:
- Size: 75.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 669e3966fe4dccb816e5655eb865e5987b2754d9c149bf9006714b9b1d38f5a7 |
|
MD5 | eae53778de2d3eb0a98583aedac7cf29 |
|
BLAKE2b-256 | 585f3f3308ce3acc61493c34c4bd2d618b0a3b48d15f2de4a239d7f868f4e8ab |