Skip to content

Commit

Permalink
Data path handling
Browse files Browse the repository at this point in the history
  • Loading branch information
artitw committed Oct 16, 2024
1 parent 1d1c5c0 commit 192638d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="text2text",
version="1.7.9",
version="1.8.0",
author="artitw",
author_email="artitw@gmail.com",
description="Text2Text: Crosslingual NLP/G toolkit",
Expand Down
3 changes: 2 additions & 1 deletion text2text/rag_assistant.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import text2text as t2t

import os
import pickle
import sqlite3
import requests
Expand Down Expand Up @@ -89,7 +90,7 @@ def __init__(self, **kwargs):

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

if sqlite_path:
if sqlite_path and os.path.exists(sqlite_path):
conn = sqlite3.connect(sqlite_path)
fields = ", ".join(db_fields)
query = f"SELECT {fields} FROM {RAG_TABLE_NAME}"
Expand Down

0 comments on commit 192638d

Please sign in to comment.