kyb3r / emergent Goto Github PK
View Code? Open in Web Editor NEWAn implementation of long term memory and external tools for LLMs
License: MIT License
An implementation of long term memory and external tools for LLMs
License: MIT License
I had a lengthy discussion with GPT using Emergent (great job btw) and fed it small segments of a story I'm writing, but when saving its memories to json, I got the error response from the OpenAI API that I broke the token limit. The discussion itself was fine; it wasn't until agent.end_conversation(memory_path)
was called that I had issues with the token limit.
openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens. However, your messages resulted in 4940 tokens. Please reduce the length of the messages.
Adding some sort of token limit handler would be great. Please let me know if I'm doing something wrong, lol.
From my first testing, they are just summaries and don't represent individual ideas or people. They should contain concise information of what was learned about the topic during the chat.
We have to prevent the same information to be provided multiple times
The function that searches a kB article that is similar to the prompt, could also include an variable that defines a minimum distance in the embedded space so that any article is returned. Sometimes and even very often, the closest article might have absolutely no relationship with the topic. This will greatly reduce token use. Not only when providing kb articles but also when we want to identify how many articles to update. This could be done dynamically instead of trying to update the closest three.
Just let me know where I can help. I am currently reading the code. Also, the ChatAgent never trims the chat log during the conversation(self.messages). If I understood the code correctly. I can fix that if you want.
Having issues creating new tools and implementing
I want a web scraper that can save output to a json
when I try and run and call the function i defined it kees saying that as a ai they cant execute etc etc
not sure if its the safeguards or prompting help
basically if we can get this to work we haev plugins??
I think that the agent should speak to itself and reason what topics would be helpful for him to know right now. We can then provide the closest match for each topic. In this internal chat the bot could later on also access various functions like searching the web.
Right now we are just saving data in a json file as a stopgap solution while we are developing the system. But support for vector DBs is vital for scalability.
Hi, I just installed this with pip, but I'm getting this error when I try to use it.
AttributeError: partially initialized module 'emergent' has no attribute 'ChatAgent' (most likely due to a circular import)
I'd really appreciate it if someone could help me out. I'm using Python 3.11 for reference.
When using "response = agent.send(message)", I'm getting "Object of type generator is not JSON serializable".
I noticed that handle_message in ToolManager has been updated quite a bit and I'm trying to understand how it returns a response to the agent (e.g.: for use in tests/main.py).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.