Skip to content

Instantly share code, notes, and snippets.

@mberman84
Created October 27, 2023 14:10
Show Gist options
  • Save mberman84/34d7716e78bdfe6cff07a63f6d05298d to your computer and use it in GitHub Desktop.
Save mberman84/34d7716e78bdfe6cff07a63f6d05298d to your computer and use it in GitHub Desktop.
MemGPT + Open-Source Models
# spin up a runpod GPU with TextGen WebUI, no need to use openai flag
# you can also use TextGen WebUI on your local computer
git clone https://github.com/cpacker/MemGPT.git
cd MemGPT
export OPENAI_API_BASE=https://some-stuff-5000.proxy.runpod.net # using runpod
# export OPENAI_API_BASE=localhost:5000 # using local computer
BACKEND_TYPE=webui
python3 main.py --no_verify
@pewekar
Copy link

pewekar commented Nov 11, 2023

In windows command line i get the error "Directory 'static/' does not exist "

python3 main.py
Traceback (most recent call last):
File "C:\Users\uname\MemGPT\MemGPT\main.py", line 1, in
from memgpt.main import app
File "C:\Users\uname\MemGPT\MemGPT\memgpt\main.py", line 17, in
from .interface import print_messages
File "C:\Users\uname\MemGPT\MemGPT\memgpt\interface.py", line 6, in
from memgpt.utils import printd
File "C:\Users\uname\MemGPT\MemGPT\memgpt\utils.py", line 12, in
import fitz
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\fitz_init_.py", line 1, in
from frontend import *
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend_init_.py", line 1, in
from .events import *
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\events_init_.py", line 1, in
from .clipboard import *
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\events\clipboard.py", line 2, in
from ..dom import Event
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\dom.py", line 439, in
from . import dispatcher
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\dispatcher.py", line 15, in
from . import config, server
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-pTraceback (most recent call last):
File "C:\Users\uname\MemGPT\MemGPT\main.py", line 1, in
from memgpt.main import app
File "C:\Users\uname\MemGPT\MemGPT\memgpt\main.py", line 17, in
from .interface import print_messages
File "C:\Users\uname\MemGPT\MemGPT\memgpt\interface.py", line 6, in
from memgpt.utils import printd
File "C:\Users\uname\MemGPT\MemGPT\memgpt\utils.py", line 12, in
import fitz
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\fitz_init_.py", line 1, in
from frontend import *
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend_init_.py", line 1, in
from .events import *
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\events_init_.py", line 1, in
from .clipboard import *
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\events\clipboard.py", line 2, in
from ..dom import Event
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\dom.py", line 439, in
from . import dispatcher
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\dispatcher.py", line 15, in
from . import config, server
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\server.py", line 24, in
app.mount(config.STATIC_ROUTE, StaticFiles(directory=config.STATIC_DIRECTORY), name=config.STATIC_NAME)
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\starlette\staticfiles.py", line 57, in init
raise RuntimeError(f"Directory '{directory}' does not exist")
RuntimeError: Directory 'static/' does not existackages\frontend\server.py", line 24, in
app.mount(config.STATIC_ROUTE, StaticFiles(directory=config.STATIC_DIRECTORY), name=config.STATIC_NAME)
File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\starlette\staticfiles.py", line 57, in init
raise RuntimeError(f"Directory '{directory}' does not exist")
RuntimeError: Directory 'static/' does not exist

@RBSoftwareBR
Copy link

In windows command line i get the error "Directory 'static/' does not exist "

python3 main.py Traceback (most recent call last): File "C:\Users\uname\MemGPT\MemGPT\main.py", line 1, in from memgpt.main import app File "C:\Users\uname\MemGPT\MemGPT\memgpt\main.py", line 17, in from .interface import print_messages File "C:\Users\uname\MemGPT\MemGPT\memgpt\interface.py", line 6, in from memgpt.utils import printd File "C:\Users\uname\MemGPT\MemGPT\memgpt\utils.py", line 12, in import fitz File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\fitz__init__.py", line 1, in from frontend import * File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend__init__.py", line 1, in from .events import * File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\events__init__.py", line 1, in from .clipboard import * File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\events\clipboard.py", line 2, in from ..dom import Event File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\dom.py", line 439, in from . import dispatcher File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\dispatcher.py", line 15, in from . import config, server File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-pTraceback (most recent call last): File "C:\Users\uname\MemGPT\MemGPT\main.py", line 1, in from memgpt.main import app File "C:\Users\uname\MemGPT\MemGPT\memgpt\main.py", line 17, in from .interface import print_messages File "C:\Users\uname\MemGPT\MemGPT\memgpt\interface.py", line 6, in from memgpt.utils import printd File "C:\Users\uname\MemGPT\MemGPT\memgpt\utils.py", line 12, in import fitz File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\fitz__init__.py", line 1, in from frontend import * File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend__init__.py", line 1, in from .events import * File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\events__init__.py", line 1, in from .clipboard import * File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\events\clipboard.py", line 2, in from ..dom import Event File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\dom.py", line 439, in from . import dispatcher File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\dispatcher.py", line 15, in from . import config, server File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\frontend\server.py", line 24, in app.mount(config.STATIC_ROUTE, StaticFiles(directory=config.STATIC_DIRECTORY), name=config.STATIC_NAME) File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\starlette\staticfiles.py", line 57, in init raise RuntimeError(f"Directory '{directory}' does not exist") RuntimeError: Directory 'static/' does not existackages\frontend\server.py", line 24, in app.mount(config.STATIC_ROUTE, StaticFiles(directory=config.STATIC_DIRECTORY), name=config.STATIC_NAME) File "C:\Users\uname\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\starlette\staticfiles.py", line 57, in init raise RuntimeError(f"Directory '{directory}' does not exist") RuntimeError: Directory 'static/' does not exist

same error on mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment