SillyTavern / SillyTavern-Extras

Extensions API for SillyTavern.
GNU Affero General Public License v3.0
563 stars 133 forks source link

Update server.py for new chroma #95

Closed donlinglok1 closed 1 year ago

donlinglok1 commented 1 year ago

Hi, i got this error during docker launch:

I try to migrate but seems it is hard to done. So i just upgrade the code and start a new Chroma, at least i can launch the extras server now.

!!!This code may replace you old chroma db!!!

llm-sillytavern-extras-1  | Initializing ChromaDB
llm-sillytavern-extras-1  | Traceback (most recent call last):
llm-sillytavern-extras-1  |   File "/sillytavern-extras/server.py", line 268, in <module>
llm-sillytavern-extras-1  |     chromadb_client = chromadb.Client(Settings(anonymized_telemetry=False, persist_directory=args.chroma_folarquet'))
llm-sillytavern-extras-1  |   File "/root/miniconda3/lib/python3.10/site-packages/chromadb/__init__.py", line 107, in Client
llm-sillytavern-extras-1  |     system = System(settings)
llm-sillytavern-extras-1  |   File "/root/miniconda3/lib/python3.10/site-packages/chromadb/config.py", line 175, in __init__
llm-sillytavern-extras-1  |     if settings[key] is not None:
llm-sillytavern-extras-1  |   File "/root/miniconda3/lib/python3.10/site-packages/chromadb/config.py", line 110, in __getitem__
llm-sillytavern-extras-1  |     raise ValueError(LEGACY_ERROR)
llm-sillytavern-extras-1  | ValueError: You are using a deprecated configuration of Chroma.
llm-sillytavern-extras-1  | 
llm-sillytavern-extras-1  | If you do not have data you wish to migrate, you only need to change how you construct
llm-sillytavern-extras-1  | your Chroma client. Please see the "New Clients" section of https://docs.trychroma.com/migration.
llm-sillytavern-extras-1  | ________________________________________________________________________________________________
llm-sillytavern-extras-1  |
llm-sillytavern-extras-1  | If you do have data you wish to migrate, we have a migration tool you can use in order to
llm-sillytavern-extras-1  | migrate your data to the new Chroma architecture.
llm-sillytavern-extras-1  | Please `pip install chroma-migrate` and run `chroma-migrate` to migrate your data and then
llm-sillytavern-extras-1  | change how you construct your Chroma client.
llm-sillytavern-extras-1  |
llm-sillytavern-extras-1  | See https://docs.trychroma.com/migration for more information or join our discord at https://discord.gg/8g5FESbj for help!
llm-sillytavern-extras-1  |
llm-sillytavern-extras-1 exited with code 0

After: image