Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -14,13 +14,14 @@ from langchain.prompts.chat import (
|
|
14 |
)
|
15 |
from langchain.text_splitter import CharacterTextSplitter
|
16 |
from langchain.vectorstores.faiss import FAISS
|
|
|
17 |
|
|
|
18 |
|
19 |
pickle_file = "open_ai.pkl"
|
20 |
index_file = "open_ai.index"
|
21 |
|
22 |
|
23 |
-
|
24 |
gpt_3_5 = ChatOpenAI(model_name='gpt-4',temperature=0.1)
|
25 |
|
26 |
embeddings = OpenAIEmbeddings(model='text-embedding-ada-002')
|
|
|
14 |
)
|
15 |
from langchain.text_splitter import CharacterTextSplitter
|
16 |
from langchain.vectorstores.faiss import FAISS
|
17 |
+
from langchain.cache import InMemoryCache
|
18 |
|
19 |
+
langchain.llm_cache = InMemoryCache()
|
20 |
|
21 |
pickle_file = "open_ai.pkl"
|
22 |
index_file = "open_ai.index"
|
23 |
|
24 |
|
|
|
25 |
gpt_3_5 = ChatOpenAI(model_name='gpt-4',temperature=0.1)
|
26 |
|
27 |
embeddings = OpenAIEmbeddings(model='text-embedding-ada-002')
|