Spaces:
No application file
No application file
Last commit not found
import os | |
from pathlib import Path | |
from index import IndexSearchEngine | |
from gpt_3_manager import Gpt3Manager | |
from dotenv import load_dotenv | |
from chat import ChatBot | |
from index import JsonLinesIndex | |
# load_dotenv() | |
# OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") | |
# def test_chatbot(): | |
# path = Path("index") / "index.jsonl" | |
# index = JsonLinesIndex() | |
# loaded = index.load(path) | |
# gpt_manager = Gpt3Manager(api_key=OPENAI_API_KEY) | |
# engine = IndexSearchEngine(loaded, gpt_manager=gpt_manager) | |
# chatbot = ChatBot(engine) | |
# answer = chatbot.ask("What does the twitter terms of service does") | |
# print(answer) | |
# # assert 0 == 0 | |
# test_chatbot() | |