一個將資料轉換為文本的小工具,可提升 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.7.0.tar.gz
(9.3 kB
view hashes)
Built Distribution
datatoword-0.7.0-py3-none-any.whl
(12.5 kB
view hashes)
Close
Hashes for datatoword-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33433dddecb527fc5fe9883186fd97b6e4f638064bfbcf05d7e5158bfb4374c5 |
|
MD5 | 9eebf58d61bcc59e6f4b39f0e2770615 |
|
BLAKE2b-256 | 46c5cb98adcbdea20b4d21abdeb551843f6e210da4caddf3496a44122c78af41 |