Spaces:
Sleeping
Sleeping
aakash0563
commited on
Commit
•
b7b4c2d
1
Parent(s):
c68ae28
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ llm = ChatGoogleGenerativeAI(
|
|
15 |
model="gemini-pro",
|
16 |
temperature=0.7
|
17 |
)
|
18 |
-
tools = load_tools(['serpapi','
|
19 |
# search = GoogleSearchAPIWrapper()
|
20 |
# tools = [
|
21 |
# Tool(
|
@@ -54,7 +54,7 @@ agent_chain = AgentExecutor.from_agent_and_tools(
|
|
54 |
# )
|
55 |
def chat(prompt):
|
56 |
res = agent_chain.run(input=prompt)
|
57 |
-
return res,memory.load_memory_variables({})
|
58 |
|
59 |
iface = gr.Interface(
|
60 |
fn=chat,
|
|
|
15 |
model="gemini-pro",
|
16 |
temperature=0.7
|
17 |
)
|
18 |
+
tools = load_tools(['serpapi','llm-math'], llm=llm) #,'wikipedia'
|
19 |
# search = GoogleSearchAPIWrapper()
|
20 |
# tools = [
|
21 |
# Tool(
|
|
|
54 |
# )
|
55 |
def chat(prompt):
|
56 |
res = agent_chain.run(input=prompt)
|
57 |
+
return res,memory.load_memory_variables({}).chat_history
|
58 |
|
59 |
iface = gr.Interface(
|
60 |
fn=chat,
|