Closed ProjCRys closed 10 months ago
Fixed it:
@echo off setlocal
REM Define the paths set VENV_PATH=D:\AI\ChatBots\MemGPT_Setup\venv set MEMGPT_PATH=D:\AI\ChatBots\MemGPT_Setup\MemGPT set PYTHON_PATH=C:\Users\ADMIN\AppData\Local\Programs\Python\Python310\python.exe
REM Create the virtual environment "%PYTHON_PATH%" -m venv "%VENV_PATH%"
if errorlevel 1 ( echo Error: Unable to create the virtual environment. Press any key to exit. pause >nul exit /b )
REM Activate the virtual environment call "%VENV_PATH%\Scripts\activate"
if errorlevel 1 ( echo Error: Unable to activate the virtual environment. Press any key to exit. pause >nul exit /b )
REM Install required dependencies from the correct directory pip install -r "%MEMGPT_PATH%\requirements-local.txt" set OPENAI_API_BASE=http://localhost:1234 set BACKEND_TYPE=lmstudio
if errorlevel 1 ( echo Error: Failed to install dependencies. Press any key to exit. pause >nul exit /b )
REM Run the 'python -m memgpt' command python MemGPT/main.py
if errorlevel 1 ( echo Error: 'python -m memgpt' encountered an error. Press any key to exit. pause >nul exit /b )
REM Deactivate the virtual environment deactivate
REM Wait for the user to press any key before exiting pause >nul
Hi @ProjCRys. I experience the same error (TypeError: 'NoneType' object is not callable) when i want to use /save command. I looked into your script and it seems i've done everything correctly. can you explain how did you get rid of the error?
I pip installed requirements-local.txt and that somehow worked for me. I then run the bat file to create a venv so that it so that it wont somhow mess up my computer.
Hi @ProjCRys. I experience the same error (TypeError: 'NoneType' object is not callable) when i want to use /save command. I looked into your script and it seems i've done everything correctly. can you explain how did you get rid of the error?
OS: Windows 10
File I ran (creates a venv and auto-install and run memgpt): @echo off
:: Define the paths to Python and the venv set PYTHON_EXECUTABLE=C:\Users\ADMIN\AppData\Local\Programs\Python\Python310\python.exe set VENV_DIR=D:\AI\ChatBots\MemGPT_Setup\venv
:: Create the virtual environment "%PYTHON_EXECUTABLE%" -m venv "%VENV_DIR%"
:: Check if the virtual environment creation was successful if %errorlevel% neq 0 ( echo An error occurred while creating the virtual environment. Press any key to exit. pause >nul exit /b %errorlevel% )
:: Activate the virtual environment call "%VENV_DIR%\Scripts\activate"
:: Install pymemgpt using pip pip install pymemgpt pip install transformers pip install torch
:: Check if the installation was successful if %errorlevel% neq 0 ( echo An error occurred while installing pymemgpt. Press any key to exit. pause >nul exit /b %errorlevel% )
set OPENAI_API_BASE=http://localhost:1234 set BACKEND_TYPE=lmstudio cls
:: Run memgpt (replace this with your specific memgpt command) memgpt run --no_verify
:: Check if memgpt encountered an error if %errorlevel% neq 0 ( echo An error occurred while running memgpt. Press any key to exit. pause >nul exit /b %errorlevel% )
:: Deactivate the virtual environment deactivate
:: Pause to allow the user to review the output echo Press any key to exit. pause >nul
Output:
? Would you like to select an existing agent? No Creating new agent... Created new agent agent_4. Hit enter to begin (will request first MemGPT message) [A[K Warning: no wrapper specified for local LLM, using the default wrapper 💭 User logged in. Updating core memory. 🤖 Hello CRys! I'm Nana, how are you today?