Spaces:
Runtime error
Runtime error
Update interact_with_llm.py
Browse files- interact_with_llm.py +4 -4
interact_with_llm.py
CHANGED
|
@@ -48,10 +48,10 @@ os.environ['OPENAI_API_KEY']= os.environ.get('OPENAI_API_KEY')
|
|
| 48 |
class Agent():
|
| 49 |
def __init__(self) -> None:
|
| 50 |
|
| 51 |
-
embeddings = OpenAIEmbeddings()
|
| 52 |
-
documents = TextLoader("document_0.txt").load()
|
| 53 |
-
text_splitter = CharacterTextSplitter(chunk_size=500, chunk_overlap=0)
|
| 54 |
-
docs = text_splitter.split_documents(documents)
|
| 55 |
vectorstore = Chroma(embedding_function=OpenAIEmbeddings(), persist_directory="./chroma_db")
|
| 56 |
retriever = vectorstore.as_retriever()
|
| 57 |
llm = ChatOpenAI(model_name="gpt-4", temperature=0)
|
|
|
|
| 48 |
class Agent():
|
| 49 |
def __init__(self) -> None:
|
| 50 |
|
| 51 |
+
# embeddings = OpenAIEmbeddings()
|
| 52 |
+
# documents = TextLoader("document_0.txt").load()
|
| 53 |
+
# text_splitter = CharacterTextSplitter(chunk_size=500, chunk_overlap=0)
|
| 54 |
+
# docs = text_splitter.split_documents(documents)
|
| 55 |
vectorstore = Chroma(embedding_function=OpenAIEmbeddings(), persist_directory="./chroma_db")
|
| 56 |
retriever = vectorstore.as_retriever()
|
| 57 |
llm = ChatOpenAI(model_name="gpt-4", temperature=0)
|