一個將資料型態的轉換為自然語言的小工具,可提升 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.5.0.tar.gz
(9.2 kB
view details)
Built Distribution
File details
Details for the file datatoword-0.5.0.tar.gz
.
File metadata
- Download URL: datatoword-0.5.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 | 0b4f61c6b09946211bc41d6e08499e199a210d50288655179ab536949663fa53 |
|
MD5 | 85ea088a3b3f1a4b9c42f4e36f39e4c1 |
|
BLAKE2b-256 | db9f5c68ca8afb77436930e1c0791fc6529b87eed83e22a17c6b4a64c1190a56 |
File details
Details for the file datatoword-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: datatoword-0.5.0-py3-none-any.whl
- Upload date:
- Size: 12.4 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 | 67a04380506532606df7ed8be0998dd59b2802b1270a729ff032271cc82c37fe |
|
MD5 | f35fe85a2c91c24ceb7509646c7c18e1 |
|
BLAKE2b-256 | d98273ff6575702345b0020a2f0d4195c77a6566a5d8d88d24d925b412bc7fa1 |