LostRuins / koboldcpp

Run GGUF models easily with a KoboldAI UI. One File. Zero Install.
https://github.com/lostruins/koboldcpp
GNU Affero General Public License v3.0
4.78k stars 339 forks source link

Add task management system, like AutoGPT, BabyAGI or Robo-GPT #55

Closed dsiens closed 2 weeks ago

dsiens commented 1 year ago

Hello, for now, Koboldcpp is the best and simple UI I have used. Can we imagine to add task management system capabilities for next versions?

LostRuins commented 1 year ago

Task management? There is an Instruct Mode you can enable in the settings, do you mean that?

image

dsiens commented 1 year ago

Hello, like Robo-GPT for the simple one:

simulanics commented 1 year ago

Hello, like Robo-GPT for the simple one:

  • multiple instructions for start
  • add IA/UI capabilities to search informations on the Internet
  • don't stop before last task is complete

Why not clone AutoGPT and change the OpenAI API bindings to use the koboldcpp REST API? That would be simplest, and not require reinvention of the wheel, so-to-speak. Also, since it would run in a separate process in this manor, there would be no thread suspension due to the primary python thread handling both the API as well as the underlying bot and internet search mechanisms. I would be glad to take a stab at this :-) AutoGPT also already has a large support team.

LostRuins commented 1 year ago

@simulanics That is a good idea. The Kobold API is simple and easy to use, you'll probably only need a single endpoint, /generate

Take a look at this https://link.concedo.workers.dev/koboldapi (not all functions are implemented)

simulanics commented 1 year ago

After 3 weeks - things are coming along. First it was actually more of a pain to get the existing AutoGPT (any of the variations) code to work with non-OpenAI models. Then, python has too many dependencies and quirks. So... I started from the ground and have been building up. I'm using a c compiled language for best efficiency, but have been making modules, classes, and other code for use with Xojo (like visual basic only crossplatform) so once available, other developers can piece the parts together to craft whatever they want.

I've managed to "tame" non-OpenAI models to be coherent as well as have a permanent memory storage. I didn't like weaviate or Pinecone for vector databases, so I tried a tensor based word2vec database system, and it too had too many quirks. I had enough and wrote a vector database from scratch 🙌 The benefit of the new vector database is that it's fully embeddable - so no external dependencies and it can craft sentences with needed data before sending them to the LLM. Others are gathering sleuths of information from a vector database and sending them to the LLM to decipher and decide what's needed. By pre-piecing the data in a coherent manor, fewer tokens are sent to the LLM, and less processing/time all around. To make a smarter LLM, I decided to develop a smarter vector database 💯

Completed: ✅ Long-term memory and cross-referencing via embedded vector database. ✅ Web/Internet access ✅ Can Request code to be written, it gets parsed, interpreted, debugged and rerun if there were errors ✅ Thought processes (chain/train-of-thought) and sparks new chains-of-thought as needed. ✅ File-system access/manipulation

Needs: 🔲User-defined APIs and scripts & chaining methodology 🔲RegEX Triggers (for insertion, execution, etc.)

There are a few screenshots here - I'll have to take more and get some code uploaded for others to play around with sometime near end of this week.

Screenshots for BabelFish AI: https://www.osblueflame.com/kobold/

dsiens commented 1 year ago

Hi, so I guess this will be another software, not Kobolcpp ? Open Source?

LostRuins commented 1 year ago

Yeah it won't be within the base koboldcpp, but it can build off it via the provided API.

dsiens commented 1 year ago

Are you part of this new software?

LostRuins commented 1 year ago

Nope I am not directly involved, however everyone is free to build and extend upon koboldcpp, as long as the resulting project is also Open Sourced AGPL.

simulanics commented 1 year ago

Hi, so I guess this will be another software, not Kobolcpp ? Open Source?

it requires kobold to run as it works off the kobold API to modify settings and feed prompts etc. BUT - It can work off of any LLM API really, even OpenAI

What I've provided screenshots of is merely a "testing ground" for testing new code and features that I add to the classes, modules, and libraries that will be available. The original post asked for an AutoGPT, so that's the ultimate goal, and slowly the IDE is taking shape from a testing ground to a working AutoGPT interface.

As for the underlying classes modules, etc, they can be used by developers to piece and chain actions together however they see fit or for other purposes/use cases. Classes are objects with properties and methods that can be instantiated and invoked to perform tasks, modules contain ready to use functions and easily modifiable properties. If you're not a programmer, the code won't help you. But I added 2 additional screenshots so you can see what developing an interface as well as coding within for example the vector database class looks like. Like I said, if you're familiar with visual basic - you'd feel right at home (and not the .net vb version. :-)) The particular language I chose for this endeavor was chosen due it's rapid application development abilites, and the fact that I can write code once and it compiles for windows,mac,linux,arm devices (rpi) or even the web. So getting software to run in more places takes minimal effort and there's not 10,000 additional python files for each application.

simulanics commented 1 year ago

Every day, a bit closer to a working "AutoGPT" using base models. Today I finally perfected the perfect prompt that works across majority of the base models, and oddly most exceptionally well with the vicuna & stable-vicuna blends. Today I implemented auto agent spawning to complete "tasks in progress." Currently, about 1 in 5 times a task fails on first try whether more research is needed by the agent to complete a task -or- to debug errors in code and try again, but in all, the agent completes the tasks I've thrown at it. The scripts it writes, it adds them to it's script database for possible reuse in the future and feeds the new script commands into the prompt so that it's "aware" of its current capabilities via scripts. For the demo screenshot below, the agent runs JavaScript's in an embedded webkit container to avoid needing dependencies to complete tasks.

Screenshot

dsiens commented 1 year ago

Hi, keep us in touch, would be great to have a simple out of the box GPT agent. And with Cuda Kobolcpp it is now more fast :)