Skip to content

Commit 192638d

Browse files
committed
Data path handling
1 parent 1d1c5c0 commit 192638d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="text2text",
8-
version="1.7.9",
8+
version="1.8.0",
99
author="artitw",
1010
author_email="artitw@gmail.com",
1111
description="Text2Text: Crosslingual NLP/G toolkit",

text2text/rag_assistant.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import text2text as t2t
22

3+
import os
34
import pickle
45
import sqlite3
56
import requests
@@ -89,7 +90,7 @@ def __init__(self, **kwargs):
8990

9091
self.records["embedding"] = self.records["embedding"].apply(lambda x: pickle.dumps(x))
9192

92-
if sqlite_path:
93+
if sqlite_path and os.path.exists(sqlite_path):
9394
conn = sqlite3.connect(sqlite_path)
9495
fields = ", ".join(db_fields)
9596
query = f"SELECT {fields} FROM {RAG_TABLE_NAME}"

0 commit comments

Comments
 (0)