openai / chatgpt-retrieval-plugin

The ChatGPT Retrieval Plugin lets you easily find personal or work documents by asking questions in natural language.
MIT License
20.96k stars 3.68k forks source link

[Bugfix]: Change env CHROMA_IN_MEMORY's type from str to bool before use it #402

Open zanghu opened 6 months ago

zanghu commented 6 months ago

*Short Description**: In chroma_datastore.py, the os.getenv function returns the value of the CHROMA_IN_MEMORY environment variable as a string. Currently, in the ChromaDataStore.__init__ method (specifically, the in_memory variable), it directly relies on this value for decision-making(e.g.: if in_memory: ...). However, since any non-empty string is evaluated as True in the if statement, it results in the program attempting to use in_memory storage even when the CHROMA_IN_MEMORY environment variable is set to "false".

Issue(s) Linked: #401