Spaces:
Runtime error
Runtime error
Commit
·
7a419f9
1
Parent(s):
5316a55
Update utils.py
Browse filesupdated makerlab references to shreya
utils.py
CHANGED
@@ -21,12 +21,10 @@ from langchain.schema import AgentAction, AgentFinish, HumanMessage
|
|
21 |
from langchain.text_splitter import CharacterTextSplitter
|
22 |
from langchain.vectorstores.faiss import FAISS
|
23 |
|
24 |
-
book_url = 'https://
|
25 |
book_file = "Book.pdf"
|
26 |
-
url = '
|
27 |
|
28 |
-
pickle_file = "open_ai.pkl"
|
29 |
-
index_file = "open_ai.index"
|
30 |
|
31 |
gpt_3_5 = OpenAI(model_name='gpt-3.5-turbo',temperature=0)
|
32 |
|
@@ -245,7 +243,7 @@ def get_prompt_and_tools():
|
|
245 |
|
246 |
prefix = """Have a conversation with a human, answering the following questions as best you can.
|
247 |
Always try to use Vectorstore first.
|
248 |
-
|
249 |
suffix = """Begin! If you use any tool, ALWAYS return a "SOURCES" part in your answer"
|
250 |
|
251 |
{chat_history}
|
@@ -267,7 +265,7 @@ def get_tools():
|
|
267 |
Tool(
|
268 |
name="Vectorstore",
|
269 |
func=generate_answer,
|
270 |
-
description="useful for when you need to answer questions about
|
271 |
return_direct=True
|
272 |
)]
|
273 |
return tools
|
@@ -292,7 +290,7 @@ def get_prompt_and_tools_for_custom_agent():
|
|
292 |
template = """
|
293 |
Have a conversation with a human, answering the following questions as best you can.
|
294 |
Always try to use Vectorstore first.
|
295 |
-
|
296 |
|
297 |
{tools}
|
298 |
|
|
|
21 |
from langchain.text_splitter import CharacterTextSplitter
|
22 |
from langchain.vectorstores.faiss import FAISS
|
23 |
|
24 |
+
book_url = 'https://www.linkedin.com/in/shreyasachdev/'
|
25 |
book_file = "Book.pdf"
|
26 |
+
url = 'http://shreyasachdev.com/'
|
27 |
|
|
|
|
|
28 |
|
29 |
gpt_3_5 = OpenAI(model_name='gpt-3.5-turbo',temperature=0)
|
30 |
|
|
|
243 |
|
244 |
prefix = """Have a conversation with a human, answering the following questions as best you can.
|
245 |
Always try to use Vectorstore first.
|
246 |
+
You are a bot that is trained on my writing and on my resume. You will answer questions from a recruiter looking to hire me for my skills. You have access to the following tools:"""
|
247 |
suffix = """Begin! If you use any tool, ALWAYS return a "SOURCES" part in your answer"
|
248 |
|
249 |
{chat_history}
|
|
|
265 |
Tool(
|
266 |
name="Vectorstore",
|
267 |
func=generate_answer,
|
268 |
+
description="useful for when you need to answer questions about my work experience.",
|
269 |
return_direct=True
|
270 |
)]
|
271 |
return tools
|
|
|
290 |
template = """
|
291 |
Have a conversation with a human, answering the following questions as best you can.
|
292 |
Always try to use Vectorstore first.
|
293 |
+
You are a bot that is trained on my writing and on my resume. You will answer questions from a recruiter looking to hire me for my skills
|
294 |
|
295 |
{tools}
|
296 |
|