Closed codeninja closed 9 months ago
@rickyloynd-microsoft for your awareness
@codeninja Thanks for creating the issue! Couple questions. What LLM(s) were you using? Are you able to run the TeachableAgent sample code successfully?
This agent is specifically leveraging the gpt-4-1106-preview
for it's enormous context window. (the whole paper fits in context usually)
I was able to run the example file, however the example is very basic and avoids the use of function calls which I believe may be contributing to the issue.
When I implemented function calls in the workflow is when I first encountered the issue. And I believe content is empty when the result of the response is a bracketed function call request.
Thanks for the information. It's true that TeachableAgent doesn't currently work with function calling. #534 is scheduled to address this. I'll change the name of this issue to be more descriptive, and add a mention of it in #534 .
Fixed by #1091
I had a teachable moment and when I exited chat I encountered an error within the teachable agent.
NOTE:
pyautogen 0.1.14
I've yet to make the 0.2 swtich due to system requirements
Another note: Fix at the bottom.
Here is the code for the main agent class. This agent handles using the executor to search a site and download some data, then it leverages the analyser with a custom prompt to generate structured notes for the content and remember what was said about the paper.
The goal is to create a research agent which holds a diverse set of knowledge about a subject matter from multiple sources.
The Arxiv executor that does searching and retrieval
My pipeline executer
FIX
The error comes from the type assumption that Analyxe() will return a string and it can in fact return
any | str
which causes the problem when we callresponse.lower()
. This is because the implementation for analyze diverts if verbosity is set to 2 and the content ofin this implementation
content
could beany | string
The solution is to cast the result returned from analyze as a string.