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.
Add docstring to function `get_memory()` in `autogpt.memory.vector` (#1296)
sagarishere9a2a9f743976
diff --git a/autogpt/memory/vector/__init__.py b/autogpt/memory/vector/__init__.pyindex 72abbb00e3..414a28006c 100644--- a/autogpt/memory/vector/__init__.py+++ b/autogpt/memory/vector/__init__.py@@ -40,6 +40,21 @@ supported_memory = ["json_file", "no_memory"]def get_memory(config: Config) -> VectorMemory:+ """Returns a memory object corresponding to the memory backend specified in the config.++ The type of memory object returned depends on the value of the `memory_backend`+ attribute in the configuration. E.g. if `memory_backend` is set to "pinecone", a+ `PineconeMemory` object is returned. If it is set to "redis", a `RedisMemory`+ object is returned.+ By default, a `JSONFileMemory` object is returned.++ Params:+ config: A configuration object that contains information about the memory backend+ to be used and other relevant parameters.++ Returns:+ VectorMemory: an instance of a memory object based on the configuration provided.+ """memory = Nonematch config.memory_backend: