Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -224,7 +224,7 @@ class ConversationBot:
|
|
224 |
print(self.agent.memory.buffer)
|
225 |
|
226 |
res = self.agent({"input": text})
|
227 |
-
|
228 |
if res['intermediate_steps'] == []:
|
229 |
print("======>Current memory:\n %s" % self.agent.memory)
|
230 |
response = res['output']
|
@@ -433,6 +433,7 @@ class ConversationBot:
|
|
433 |
return_intermediate_steps=True,
|
434 |
agent_kwargs={'prefix': AUDIO_CHATGPT_PREFIX, 'format_instructions': AUDIO_CHATGPT_FORMAT_INSTRUCTIONS, 'suffix': AUDIO_CHATGPT_SUFFIX}, )
|
435 |
self.agent.agent.llm_chain.verbose = True
|
|
|
436 |
return gr.update(visible = False), gr.update(visible = False), gr.update(visible = False), gr.update(visible = True)
|
437 |
|
438 |
|
|
|
224 |
print(self.agent.memory.buffer)
|
225 |
|
226 |
res = self.agent({"input": text})
|
227 |
+
print(res.llm_output['token_usage'])
|
228 |
if res['intermediate_steps'] == []:
|
229 |
print("======>Current memory:\n %s" % self.agent.memory)
|
230 |
response = res['output']
|
|
|
433 |
return_intermediate_steps=True,
|
434 |
agent_kwargs={'prefix': AUDIO_CHATGPT_PREFIX, 'format_instructions': AUDIO_CHATGPT_FORMAT_INSTRUCTIONS, 'suffix': AUDIO_CHATGPT_SUFFIX}, )
|
435 |
self.agent.agent.llm_chain.verbose = True
|
436 |
+
self.agent.llm_chain.verbose = True
|
437 |
return gr.update(visible = False), gr.update(visible = False), gr.update(visible = False), gr.update(visible = True)
|
438 |
|
439 |
|