一個將資料轉換為文本的小工具,可提升 RAG 查詢的效率。
Project description
DataToWord
Built With
專案目的
這是一個將資料轉換成文字的專案,可以協助你在進行 RAG 的過程中,將資料類型的檔案轉換成文字,提升轉換為向量後查詢的結果。
目前支援的檔案有:
- CSV
- JSON
Quick Start
- 建立 LangChain Document
from datatoword import DataToWord
with open('data.csv', 'rb') as file:
file_binary_content = file.read()
data_to_word = DataToWord()
data_to_word.create_documents(
file_name='data.csv',
file_description='這是一個測試的檔案',
file_binary_content=file_binary_content
)
- 取得轉換後的內文
from datatoword import DataToWord
with open('data.csv', 'rb') as file:
file_binary_content = file.read()
data_to_word = DataToWord()
data_to_word.create_content(
file_name='data.csv',
file_description='這是一個測試的檔案',
file_binary_content=file_binary_content
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
datatoword-0.6.0.tar.gz
(9.2 kB
view details)
Built Distribution
File details
Details for the file datatoword-0.6.0.tar.gz
.
File metadata
- Download URL: datatoword-0.6.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c783594878e00ea21df28fdbf3b9c30384cbf9e0ddc49e6fc5fda3e4c751c78 |
|
MD5 | 571a00a672c0842dc0619f5f5ba5da36 |
|
BLAKE2b-256 | 03c7d97d9db91f8974cc86621471f4d1f2b34d80389a750926c35e92a7bbdce1 |
File details
Details for the file datatoword-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: datatoword-0.6.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 279f0739956c8aab0b48fa1de0f671326da1d57c461f588d6d2e7eba2f221166 |
|
MD5 | 9635fa3f6e4f8ca0388a528eeaf0ef72 |
|
BLAKE2b-256 | caf7ca13865d32fa97ce7f6b65e7db0044cae51be92ec02b04941ef10e34b3c9 |