Skip to content

Commit

Permalink
update: incorporated absolute imports, server runs as a module
Browse files Browse the repository at this point in the history
  • Loading branch information
tlane25 committed Aug 7, 2024
1 parent 74e4027 commit 84f7ad1
Show file tree
Hide file tree
Showing 8 changed files with 256 additions and 134 deletions.
126 changes: 64 additions & 62 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@

load_dotenv(override=True, dotenv_path=".env.testing")


MONGO_URI = os.environ["MONGO_URI"]
CONFIG_DB = os.environ["CONFIG_DB"]
CONFIG_KB_COL = os.environ["CONFIG_KB_COL"]
print(f"CONFIG_DB: {CONFIG_DB}")

kb_names = ["Sentence", "Semantic", "Markdown"]
def drop_all_knowledge_bases():
Expand Down
8 changes: 4 additions & 4 deletions evals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from ragas import evaluate
from ragas.metrics import answer_relevancy, faithfulness, context_precision, context_recall, context_entity_recall, answer_similarity, answer_correctness

import eval_pg_utils as pg
import eval_utils as utils
import db.eval_pg_utils as pg
import db.eval_utils as utils

from server import UserQuery, post_query
# from server import UserQuery, post_query

import app_logger as log
import db.app_logger as log

# called within the server /api/query route
def store_running_eval_data(chatbot_id, query, response):
Expand Down
Loading

0 comments on commit 84f7ad1

Please sign in to comment.