GithubHelp home page GithubHelp logo

promptengineer48 / memgpt-autogen-llm Goto Github PK

View Code? Open in Web Editor NEW
282.0 6.0 84.0 7 KB

Run MemGPT-AutoGEN-Local LLM Together

Home Page: https://youtu.be/bMWXXPoDnDs

Python 100.00%
autogen localllm memgpt

memgpt-autogen-llm's Introduction

MemGPT-AutoGEN-LLM

This comes from my youtube video titled AutoGEN + MemGPT + Local LLM (Complete Tutorial) 😍 https://youtu.be/bMWXXPoDnDs

please watch the youtube video to get a better understand

Summary: 00:11 🚀 The video demonstrates how to connect MemGPT, AutoGEN, and local Large Language Models (LLMs) using Runpods.

01:32 🤖 You can integrate MemGPT and AutoGEN to work together, with MemGPT serving as an assistant agent alongside local LLMs.

03:46 📚 To get started, install Python, VS Code, and create a Runpods account with credits. You can use Runpods for running local LLMs.

06:43 🛠️ Set up a virtual environment, create a Python file, and activate the environment for your project.

08:52 📦 Install necessary libraries like OpenAI, PyAutoGEN, and MGBPT to work with AutoGEN and MemGPT.

16:21 ⚙️ Use Runpods to deploy local LLMs, select the hardware configuration, and create API endpoints for integration with AutoGEN and MemGPT.

20:29 🔄 Modify the code to switch between using AutoGEN and MemGPT agents based on a flag, allowing you to harness the power of both.

23:31 🤝 Connect AutoGEN and MemGPT by configuring the API endpoints with the local LLMs from Runpods, enabling them to work seamlessly together.

memgpt-autogen-llm's People

Contributors

promptengineer48 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

memgpt-autogen-llm's Issues

I guess TERMINATE isnt working, as soon as MemGPT_coder finishes the task

EXECUTING CODE BLOCK 0 (inferred language is python)...
execute_code was called without specifying a value for use_docker. Since the python docker package is not available, code will be run natively. Note: this fallback behavior is subject to change
SIGALRM is not supported on Windows. No timeout will be enforced.
User_proxy (to MemGPT_coder):

exitcode: 0 (execution succeeded)
Code output:


USING AUTO REPLY...
MemGPT_coder (to User_proxy):

The provided Python script has been executed successfully without generating any errors during runtime. The exitcode value returned by the operating system after executing this command is 0, indicating successful completion. As part of the program execution, the first 10 numbers of the Fibonacci series were printed on the console, followed by writing them into a text file named 'fibonacci_sequence.tx'. This confirms that both console output and file writing functionalities have worked as expected in this scenario.


USING AUTO REPLY...
User_proxy (to MemGPT_coder):

You are going to figure all out by your own. Work by yourself, the user won't reply until you output TERMINATE to end the conversation.


USING AUTO REPLY...
MemGPT_coder (to User_proxy):

I may not necessarily be capable of figuring things out completely by myself like humans do, but I can certainly assist you based on what I am trained to do using my programming
knowledge and skills. However, since we have received instructions to work independently and wait for further input before exiting the conversation, I will continue to provide responses to potential requests until instructed otherwise by typing 'TERMINATE.' Thank you for choosing our services, and please let us know how we can assist you further!

[FEATURE REQUEST] Simple FastAPI implementation

This is the simplest, most comprehensible code i've seen so far, however, I think most people won't be using terminal to talk to the AI agent.

Can you include a simple implementation of FastAPI with uvirorn so that it will run and we can talk to the AI agent through browser?

I've been trying (and failing) to run autogen on a browser, however, through my testing, i was able to send a message to the AI but the responses were not being displayed on the webpage. I've seen some repo:

  • ryanshrott: uses chainlit which i'm not familiar with and therefore unable to modify the interface to my liking.
  • yepher: same as above.
  • bonadio: too complex for my level of understanding about python, javascript, and react (which is nonexistent).
  • others...

AttributeError: 'dict' object has no attribute 'context_window'

Just copy & paste from the repo, install deps and run it, getting this error:

MemGPT Agent at work

User_proxy (to MemGPT_coder):

Write a Function to print Numbers 1 to 10

--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/marcelo/projects/agitate/app.py", line 76, in <module>
    user_proxy.initiate_chat(
  File "/home/marcelo/projects/agitate/venv/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 531, in initiate_chat
    self.send(self.generate_init_message(**context), recipient, silent=silent)
  File "/home/marcelo/projects/agitate/venv/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 334, in send
    recipient.receive(message, self, request_reply, silent)
  File "/home/marcelo/projects/agitate/venv/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 462, in receive
    reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/marcelo/projects/agitate/venv/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 781, in generate_reply
    final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/marcelo/projects/agitate/venv/lib/python3.11/site-packages/memgpt/autogen/memgpt_agent.py", line 235, in _generate_reply_for_user_message
    ) = self.agent.step(user_message, first_message=False, skip_verify=self.skip_verify)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/marcelo/projects/agitate/venv/lib/python3.11/site-packages/memgpt/agent.py", line 657, in step
    raise e
  File "/home/marcelo/projects/agitate/venv/lib/python3.11/site-packages/memgpt/agent.py", line 587, in step
    context_window=self.config.context_window,
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'context_window'```

TypeError: cannot unpack non-iterable coroutine object

Just tried installing and running this against a local LLM. Looks like maybe MemGPT made a breaking change?

(venv) D:\ai\MemGPT-AutoGEN-LLM>py app.py

MemGPT Agent at work

User_proxy (to MemGPT_coder):

Write a Function to print Numbers 1 to 10

--------------------------------------------------------------------------------
D:\ai\MemGPT-AutoGEN-LLM\venv\Lib\site-packages\memgpt\autogen\memgpt_agent.py:212: RuntimeWarning: coroutine 'AgentAsync.step' was never awaited
  (
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Traceback (most recent call last):
  File "D:\ai\MemGPT-AutoGEN-LLM\app.py", line 76, in <module>
    user_proxy.initiate_chat(
  File "D:\ai\MemGPT-AutoGEN-LLM\venv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 531, in initiate_chat
    self.send(self.generate_init_message(**context), recipient, silent=silent)
  File "D:\ai\MemGPT-AutoGEN-LLM\venv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 334, in send
    recipient.receive(message, self, request_reply, silent)
  File "D:\ai\MemGPT-AutoGEN-LLM\venv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 462, in receive
    reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ai\MemGPT-AutoGEN-LLM\venv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 781, in generate_reply
    final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ai\MemGPT-AutoGEN-LLM\venv\Lib\site-packages\memgpt\autogen\memgpt_agent.py", line 212, in _generate_reply_for_user_message
    (
TypeError: cannot unpack non-iterable coroutine object

Error on Mac M2

Get the follow error trying to run on my mac:

File "/Users/nicholasgrant/MemGPT-AutoGEN-LLM/app.py", line 5, in
import memgpt.autogen.memgpt_agent as memgpt_autogen
File "/Users/nicholasgrant/Library/Python/3.9/lib/python/site-packages/memgpt/autogen/memgpt_agent.py", line 184
match type:
^

Think it is dependency hell- ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pymemgpt 0.2.4 requires openai<0.29.0,>=0.28.1, but you have openai 1.3.5 which is incompatible.
llama-index 0.8.62 requires openai<1, but you have openai 1.3.5 which is incompatible.
Successfully installed openai-1.3.5

Code upgrade (outdated APIs)

Some of the APIs has been changed, here is the latest version (I believe it works):

import os
import autogen
import memgpt.autogen.memgpt_agent as memgpt_autogen
#import memgpt.autogen.interface as autogen_interface
import memgpt.agent as agent
import memgpt.system as system
import memgpt.utils as utils
import memgpt.presets.presets as presets
import memgpt.constants as constants
from memgpt.autogen.memgpt_agent import create_memgpt_autogen_agent_from_config


BASE_URL = 'http://0.0.0.0:5000'
os.environ['OPENAI_API_HOST'] = BASE_URL
os.environ['OPENAI_API_KEY'] = 'none'
os.environ['OPENAI_API_BASE'] = f"{BASE_URL}/v1"

config_list = [
   {
       "model": "dolphin-2.6-mixtral-8x7b",
       "model_endpoint_type":"webui",
       #"openai_key":"none", # add this if you use "openai" as "model_endpoint_type"
       "model_endpoint":os.environ['OPENAI_API_HOST'],
       "model_wrapper": "dolphin-2.1-mistral-7b"
   },
]

llm_config = {"config_list": config_list, "seed": 42}

USE_MEMGPT = True

# The user agent
user_proxy = autogen.UserProxyAgent(
   name="User_proxy",
   system_message="A human admin.",
   code_execution_config={"last_n_messages": 2, "work_dir": "groupchat"},
   human_input_mode="TERMINATE", # needed?
   default_auto_reply="You are going to figure all out by your own. "
   "Work by yourself, the user won't reply until you output `TERMINATE` to end the conversation.",
)


#interface = autogen_interface.AutoGenInterface()
persona = "I am a 10x engineer, trained in Python. I was the first engineer at Uber."
human = "Im a team manager at this company"

#memgpt_agent=presets.use_preset(presets.DEFAULT_PRESET, model='dolphin-2.6-mixtral-8x7b', persona=persona, human=human, interface=interface, persistence_manager=persistence_manager, agent_config=llm_config)

memgpt_agent = create_memgpt_autogen_agent_from_config(
    "MemGPT_coder",
    llm_config=llm_config,
    system_message=f"I am a 10x engineer, trained in Python. I was the first engineer at Uber ",
#    interface_kwargs=interface_kwargs,
    default_auto_reply="...",  # Set a default auto-reply message here (non-empty auto-reply is required for LM Studio)
)

if not USE_MEMGPT:
   # In the AutoGen example, we create an AssistantAgent to play the role of the coder
   coder = autogen.AssistantAgent(
       name="Coder",
       llm_config=llm_config,
       system_message=f"I am a 10x engineer, trained in Python. I was the first engineer at Uber",
       human_input_mode="TERMINATE",
   )

else:
   # In our example, we swap this AutoGen agent with a MemGPT agent
   # This MemGPT agent will have all the benefits of MemGPT, ie persistent memory, etc.
   print("\nMemGPT Agent at work\n")
   coder = memgpt_autogen.MemGPTAgent(
       name="MemGPT_coder",
       agent=memgpt_agent,
   )

# Begin the group chat with a message from the user
user_proxy.initiate_chat(
   memgpt_agent,
   message="Write a Function to print Numbers 1 to 10"
   )

I'm getting an error for another reason I guess with memgpt and mixtral support.

AttributeError: module 'memgpt.presets' has no attribute 'DEFAULT_PRESET'

Traceback (most recent call last):
File "/Users/jyx/Documents/AIProj/MemGenGPT/app.py", line 55, in
memgpt_agent=presets.use_preset(presets.DEFAULT_PRESET, model='gpt-4', persona=persona, human=human, interface=interface, persistence_manager=persistence_manager, agent_config=llm_config)
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'memgpt.presets' has no attribute 'DEFAULT_PRESET'

Error about mem.gpt

i got an error about mem.gpt_agent. Any ideas?:

/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/memgpt/autogen/memgpt_agent.py:212: RuntimeWarning: coroutine 'AgentAsync.step' was never awaited
(

Local host endpoint help

I followed along and love this project, but I have an issue: I am running text generation webui locally (instead of RunPod), the endpoint is http://127.0.0.1:7860/, I do have openai extension enabled, yet when testing in VSC I get a 404 no response. The solution should be easy, does anyone know how to get app.py to connect to an actual local instance of text gen webui?

unknown language jsx

Setup and Environment:
I am running text generation web ui locally (instead of Runpod) on http://127.0.0.1:7860/
I have check and reloaded the webui with these extensions: gallery, openai and these boolean flags: api, listen
I have selected and loaded the model "mistral-7b-v0.1.Q3_K_S.gguf"

I followed along in your video step by step, using the provided app.py:
(thank you so much for your work on this btw!)

As you suggested in your reply to the previous 404 issue, I changed the code accordingly:

config_list = [
    {
        "api_type": "open_ai",
        "api_base": "http://127.0.0.1:5001/v1",
        "api_key": "NULL",
    },
]
USE_MEMGPT = False

## api keys for the memGPT
openai.api_base="http://127.0.0.1:5001/v1"
openai.api_key="NULL"

Until I get it working without memgpt, I still have use_memgpt set to false.


Along the way, I noticed an issue
text generation web ui error: failed to load the extension "openai"

I used the following commands to fix that issue

.\cmd_windows.bat
pip install tiktoken sentence_transformers SpeechRecognition

and reloaded the ui with no errors


When I start the webui using the flags and extensions seen in your youtube tutorial the terminal outputs:

2023-11-02 13:58:49 INFO:Loading settings from settings.yaml...
2023-11-02 13:58:49 INFO:Loading the extension "gallery"...
2023-11-02 13:58:49 INFO:Loading the extension "openai"... 
2023-11-02 13:58:50 INFO:Streaming API URL: 

ws://127.0.0.1:5005/api/v1/stream

OpenAI compatible API ready at: OPENAI_API_BASE=http://127.0.0.1:5001/v1
2023-11-02 13:58:50 INFO:Blocking API URL: 

http://127.0.0.1:5000/api

127.0.0.1 - - [02/Nov/2023 13:58:51] code 404, message Not Found
127.0.0.1 - - [02/Nov/2023 13:58:51] "GET / HTTP/1.1" 404 -
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.

The VSC terminal shows this output:

User_proxy (to Coder):

Write a Function to print Numbers 1 to 10

--------------------------------------------------------------------------------

>>>>>>>> USING AUTO REPLY...
Coder (to User_proxy):

```jsx
function printNums() {
    let i = 0; // Initialization

    while (i < 10) { // Condition
        console.log(i++); // Code block, Increment the Value of 'count' by 1
        i++;  // Incrementation: increment the value of 'i';
    } // While loop
}

// Calling the Function and pass it a number as an argument. This is how we call it with our function
let count = prompt("Enter your Starting Count:");
printNums(count);

USING AUTO REPLY...

EXECUTING CODE BLOCK 0 (inferred language is jsx)...
User_proxy (to Coder):

exitcode: 1 (execution failed)
Code output:
unknown language jsx


USING AUTO REPLY...
Coder (to User_proxy):

function hello() {
    let first = "hello";

    return first
}

console.log( hello() ); // Calling the function. The () sign is used to denote a parameter as input; it's called argument-based syntax.
// Argument or Parameters: These are the variables passed inside of the functions, and it does not matter where they come from but that we have defined them properly before being passed in. We must define our variables (arguments) first and then use them later on with a set of parenthesis surrounding them.

USING AUTO REPLY...

EXECUTING CODE BLOCK 0 (inferred language is jsx)...
User_proxy (to Coder):

exitcode: 1 (execution failed)
Code output:
unknown language jsx


USING AUTO REPLY...
Coder (to User_proxy):

function printFibonacci() {
        // Declare the counter, i
    let a = 0; // Initialization
    let b = 1; // Initialization

    while (a <= 25) {
        console.log(b);
        [a+1]++;
                [b++];
        }

}
printFibonacci();

USING AUTO REPLY...

EXECUTING CODE BLOCK 0 (inferred language is jsx)...
User_proxy (to Coder):

exitcode: 1 (execution failed)
Code output:
unknown language jsx


USING AUTO REPLY...
Coder (to User_proxy):

A function is a block of code designed to perform operations on data. Functions are defined at the top, called in the middle and run as their last line executes. A program is a block of text with many functions that each has its job assigned by you! When they call it then whatever happens next inside those brackets will happen for every function within. It’s like if your computer were an engine; every time the user presses some keys while running this thing, something would pop up on screen -which can be anything from a number or letter– but only one at a time."


USING AUTO REPLY...
User_proxy (to Coder):

You are going to figure all out by your own. Work by yourself, the user won't reply until you output TERMINATE to end the conversation.


USING AUTO REPLY...
Coder (to User_proxy):

function printFibonacci(a = 64) {
        // Declare the counter, i
    let a = 0; // Initialization
    let b = 1; // Initialization

    while (i <= a) {
        console.log("Fibonacccci Numbers");
        [a+1] ++ ; // Incrementation: increment the value of 'count' by 1
                [b++] +-1;  // Incrementation: this is how we update values in our code, just like adding up a number. When you add something new it will also have its own line!
    }
}

USING AUTO REPLY...

EXECUTING CODE BLOCK 0 (inferred language is jsx)...
User_proxy (to Coder):

exitcode: 1 (execution failed)
Code output:
unknown language jsx


USING AUTO REPLY...
Coder (to User_proxy):

Functions are the main building blocks of any program and as such, they can be written to carry out various operations on data. We write code within a set brackets [a] ++ , [b++] +-1; and when it's done running through everything inside those square bracket you will receive your answer back from "the function" with an input parameter that tells what kind of thing this operation is for - like how many values or numbers need counting up one after another before they're all finished together. We use our first line in these situations: [a] ++ , [b++] +-1;

Functions are the main building blocks of any program and as such, they can be written to carry out various operations on data. You might have heard about some "magic" functions when we were learning Python!
But don't worry - this is not a type that will make your code run slower or do anything weird. In fact it was created because there are too many lines for what could go into those big black brackets: so all you need here (and everywhere else) really comes down just three simple things - one parameter tells whether its an array; another number specifies its size; then finally there needs be some type-safe declaration before anything more complicated happens with these data structures inside them which make up everything. And while they can get pretty dense sometimes I promise you'll find plenty of resources online if
ever needed!



USING AUTO REPLY...
User_proxy (to Coder):

You are going to figure all out by your own. Work by yourself, the user won't reply until you output TERMINATE to end the conversation.


USING AUTO REPLY...
Coder (to User_proxy):

function printFibonacci(a = 64) {
        // Declare an array called “list” of size [a-1]
    let [a, list=[], n=0; // Initialization
    b++, c+=2; i+=1, j++; } // Incrementation: this is how we update values in our code, just like adding up a number. When you add something new it will also have its own line! It’s the same thing as if an engineer would make changes or improvements on their old car engine - but now with computers there are only one at time being run so whatever happens first inside those brackets happen next for every function 
within
        [a-1]=[c]; [i=0]++: // Incrementation: Incrementate the value of 'count', which starts out as one, then add another value. This makes an array! [j++]++; } // We have made our loop using "for" syntax and now it will run through all its elements like this until everything inside is done happening
        [list][n]=c; n++; j++;: } // We have made our for-loop with the variable "counter", but don't know what number or value should be set as yet. Now that we do, use it in your code! [a=0]; i+=1]++ ; [b++] ++ :} [c+1] =[j] + - 1;: } /* You may not be able to tell how often these arrays need an update depending on whether they are inside brackets.

USING AUTO REPLY...

EXECUTING CODE BLOCK 0 (inferred language is jsx)...
User_proxy (to Coder):

exitcode: 1 (execution failed)
Code output:
unknown language jsx


USING AUTO REPLY...
Coder (to User_proxy):

A loop can make it so that you don't have to worry about all the numbers in between two others because there is no need for them! A counter will keep track of how many loops are completed; this also allows us not just any old number but our very own values from one another - which we could even store as variables called 'loopNum'.



USING AUTO REPLY...
User_proxy (to Coder):

You are going to figure all out by your own. Work by yourself, the user won't reply until you output TERMINATE to end the conversation.


USING AUTO REPLY...
Coder (to User_proxy):

function printFibonacci(a = 64) {
        // Declare an array called “list” of size [a-1]
    let a=0; i++, b++; } // Initialization
        [i] ++ :c+=2; j++; {n} -+ : i += 2; c-=i, j--; ] ; [a = ] - + , n++] – :[b++] -- : }// Incrementation: this is how we update values in our code, just like adding up a number. When you add something new it will also have its own line! It’s the same thing as if an engineer would make changes or improvements on their old car engine - but now with computers there are only one at time being run so whatever happens first inside those brackets happen next for every function within
        [i]=j; a++; i+=1, j++: // Incrementation: this is how we update values in our code, just like adding up a number. When you add something new it will also have its own line! It’s the same thing as if an engineer would make changes or improvements on their old car engine - but now with computers there are only one at time being run so whatever happens first inside those brackets happen next for every function within
        n++; j++; a++-1} // Incrementation: we can change what the function does and how it executes by adjusting its variables in this way.

- ℂ ∩ 💬


USING AUTO REPLY...

EXECUTING CODE BLOCK 0 (inferred language is jsx)...
User_proxy (to Coder):

exitcode: 1 (execution failed)
Code output:
unknown language jsx


USING AUTO REPLY...
Coder (to User_proxy):

When you add something new it will also have its own line! It’s the same thing as if an engineer would make changes or improvements on their old car engine - but now with computers there are only one at time
being run so whatever happens first inside those brackets happen next for every function within.



USING AUTO REPLY...
User_proxy (to Coder):

You are going to figure all out by your own. Work by yourself, the user won't reply until you output TERMINATE to end the conversation.


USING AUTO REPLY...

The terminal output remains stuck here...until:
```shell
>>>>>>>> USING AUTO REPLY...
Traceback (most recent call last):
Read timeout

Error when setting memgpt flag to true

When setting USE_MEMGPT = True I get the following error when running your script. All libraries are installed.

(wizard) PS C:\code\LLMs\wizard> & c:/code/LLMs/wizard/Scripts/python.exe c:/code/LLMs/wizard/app.py --tracemalloc

MemGPT Agent at work

User_proxy (to MemGPT_coder):

Write a Function to print Numbers 1 to 10


C:\code\LLMs\wizard\lib\site-packages\memgpt\autogen\memgpt_agent.py:212: RuntimeWarning: coroutine 'AgentAsync.step' was never awaited
(
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Traceback (most recent call last):
File "c:\code\LLMs\wizard\app.py", line 76, in
user_proxy.initiate_chat(
File "C:\code\LLMs\wizard\lib\site-packages\autogen\agentchat\conversable_agent.py", line 531, in initiate_chat
self.send(self.generate_init_message(**context), recipient, silent=silent)
File "C:\code\LLMs\wizard\lib\site-packages\autogen\agentchat\conversable_agent.py", line 334, in send
recipient.receive(message, self, request_reply, silent)
File "C:\code\LLMs\wizard\lib\site-packages\autogen\agentchat\conversable_agent.py", line 462, in receive
reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
File "C:\code\LLMs\wizard\lib\site-packages\autogen\agentchat\conversable_agent.py", line 781, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
File "C:\code\LLMs\wizard\lib\site-packages\memgpt\autogen\memgpt_agent.py", line 212, in _generate_reply_for_user_message
(
TypeError: cannot unpack non-iterable coroutine object

Feature Suggestion | Serverless Runpod

I see that Runpod has a serverless option. Rather than stopping and starting these instances, is it possible to use these models serverless? It looks like you can modify theBloke's dockerfile and configure a network volume to use the model in the workspace of the network volume.

  • dockerfile setup
  • create network volume
  • create an instance on the network volume
  • download the model(s) into the instance, putting it in the volume.
  • delete the instance
  • mount the volume to the serverless GPU endpoint docker template

I am trying to play with doing this, but I have been busy with work, and I don't know what I'm doing here. I have a lot of questions as to whether this is possible or practical. Does each request wait for the model to load into the VRAM?

Serverless could be a cheap and easy way to have permanent setups for using Autogen. This could be especially nice for having multiple serverless GPU endpoints for different AI models that specialize in specific tasks without having the cost or risk of leaving an instance running.

Also, can you set a custom API Key for your runpod endpoint? To make sure your endpoints don't get used by someone else.

ImportError: cannot import name 'Document' from 'llama_index.core' (unknown location)

Traceback (most recent call last):
File "/opt/lvhx/project/agent/MemGPT-AutoGEN-LLM/app.py", line 5, in
import memgpt.autogen.memgpt_agent as memgpt_autogen
File "/opt/miniconda3/envs/lhx_agent/lib/python3.10/site-packages/memgpt/autogen/memgpt_agent.py", line 8, in
from memgpt.agent import Agent as MemGPTAgent
File "/opt/miniconda3/envs/lhx_agent/lib/python3.10/site-packages/memgpt/agent.py", line 15, in
from memgpt.persistence_manager import LocalStateManager
File "/opt/miniconda3/envs/lhx_agent/lib/python3.10/site-packages/memgpt/persistence_manager.py", line 4, in
from memgpt.memory import (
File "/opt/miniconda3/envs/lhx_agent/lib/python3.10/site-packages/memgpt/memory.py", line 11, in
from memgpt.embeddings import embedding_model, query_embedding, parse_and_chunk_text
File "/opt/miniconda3/envs/lhx_agent/lib/python3.10/site-packages/memgpt/embeddings.py", line 14, in
from llama_index.core import Document as LlamaIndexDocument
ImportError: cannot import name 'Document' from 'llama_index.core' (unknown location)

Name: llama-index
Version: 0.10.29
Summary: Interface between LLMs and your data
Home-page: https://llamaindex.ai
Author: Jerry Liu
Author-email: [email protected]
License: MIT
Location: /opt/miniconda3/envs/lhx_agent/lib/python3.10/site-packages
Requires: llama-index-agent-openai, llama-index-cli, llama-index-core, llama-index-embeddings-openai, llama-index-indices-managed-llama-cloud, llama-index-legacy, llama-index-llms-openai, llama-index-multi-modal-llms-openai, llama-index-program-openai, llama-index-question-gen-openai, llama-index-readers-file, llama-index-readers-llama-parse
Required-by: pymemgpt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.