AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fixed merge conflicts
cs0lar51224229eb5b
diff --cc README.mdindex a7712d8c29,cf370f13a9..2579f7b7a3--- a/README.md+++ b/README.md@@@ -301,31 -317,9 +317,31 @@@ export PINECONE_ENV="<YOUR_PINECONE_REGexport MEMORY_BACKEND="pinecone"```+## Weaviate Setup++[Weaviate](https://weaviate.io/) is an open-source vector database. It allows to store data objects and vector embeddings from ML-models and scales seamlessly to billion of data objects. [An instance of Weaviate can be created locally (using Docker), on Kubernetes or using Weaviate Cloud Services](https://weaviate.io/developers/weaviate/quickstart).+Although still experimental, [Embedded Weaviate](https://weaviate.io/developers/weaviate/installation/embedded) is supported which allows the Auto-GPT process itself to start a Weaviate instance. To enable it, set `USE_WEAVIATE_EMBEDDED` to `True` and make sure you `pip install "weaviate-client>=3.15.4"`.++#### Setting up environment variables++In your `.env` file set the following:++```+MEMORY_BACKEND=weaviate+WEAVIATE_HOST="127.0.0.1" # the IP or domain of the running Weaviate instance+WEAVIATE_PORT="8080"+WEAVIATE_PROTOCOL="http"+WEAVIATE_USERNAME="your username"+WEAVIATE_PASSWORD="your password"+WEAVIATE_API_KEY="your weaviate API key if you have one"+WEAVIATE_EMBEDDED_PATH="/home/me/.local/share/weaviate" # this is optional and indicates where the data should be persisted when running an embedded instance+USE_WEAVIATE_EMBEDDED=False # set to True to run Embedded Weaviate+MEMORY_INDEX="Autogpt" # name of the index to create for the application+```+## Setting Your Cache Type- By default Auto-GPT is going to use LocalCache instead of redis or Pinecone.+ By default, Auto-GPT is going to use LocalCache instead of redis or Pinecone.To switch to either, change the `MEMORY_BACKEND` env variable to the value that you want:diff --cc autogpt/memory/__init__.pyindex 7caa0d54ad,102b93aef6..be31735d6d--- a/autogpt/memory/__init__.py+++ b/autogpt/memory/__init__.py@@@ -21,14 -21,8 +21,14 @@@ except ImportErrorprint("Pinecone not installed. Skipping import.")PineconeMemory = None+try:- from memory.weaviate import WeaviateMemory++ from autogpt.memory.weaviate import WeaviateMemory+except ImportError:+ print("Weaviate not installed. Skipping import.")+ WeaviateMemory = None+try:- from memory.milvus import MilvusMemory+ from autogpt.memory.milvus import MilvusMemoryexcept ImportError:print("pymilvus not installed. Skipping import.")MilvusMemory = None@@@ -54,15 -48,6 +54,12 @@@ def get_memory(cfg, init=False))else:memory = RedisMemory(cfg)+ elif cfg.memory_backend == "weaviate":+ if not WeaviateMemory:+ print("Error: Weaviate is not installed. Please install weaviate-client to"+ " use Weaviate as a memory backend.")+ else:+ memory = WeaviateMemory(cfg)-- elif cfg.memory_backend == "no_memory":- memory = NoMemory(cfg)elif cfg.memory_backend == "milvus":if not MilvusMemory:print("Error: Milvus sdk is not installed."