From 87736e464a4ebdcad0a7d375553e097d43a58dfc Mon Sep 17 00:00:00 2001 From: mudler Date: Sat, 26 Aug 2023 00:48:40 +0200 Subject: [PATCH] Update sample config, fixup sqlite load --- examples/discord/agent.py | 11 +++++------ examples/discord/config.ini.example | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/examples/discord/agent.py b/examples/discord/agent.py index 8295e08..2c2bc37 100644 --- a/examples/discord/agent.py +++ b/examples/discord/agent.py @@ -46,13 +46,12 @@ MEMORY_CHUNK_OVERLAP = int(config["agent"]["memory_chunk_overlap"]) MEMORY_RESULTS = int(config["agent"]["memory_results"]) MEMORY_SEARCH_TYPE = config["agent"]["memory_search_type"] +if not os.environ.get("PYSQL_HACK", "false") == "false": + # these three lines swap the stdlib sqlite3 lib with the pysqlite3 package for chroma + __import__('pysqlite3') + import sys + sys.modules['sqlite3'] = sys.modules.pop('pysqlite3') if MILVUS_HOST == "": - if not os.environ.get("PYSQL_HACK", "false") == "false": - # these three lines swap the stdlib sqlite3 lib with the pysqlite3 package for chroma - __import__('pysqlite3') - import sys - sys.modules['sqlite3'] = sys.modules.pop('pysqlite3') - from langchain.vectorstores import Chroma else: from langchain.vectorstores import Milvus diff --git a/examples/discord/config.ini.example b/examples/discord/config.ini.example index 258482f..99ef009 100644 --- a/examples/discord/config.ini.example +++ b/examples/discord/config.ini.example @@ -3,7 +3,6 @@ server_id = api_key = [openai] -organization = fff api_key = sl-d-d-d [settings] @@ -18,4 +17,15 @@ tts_api_base = http://api:8080 functions_model = functions api_base = http://api:8080 stablediffusion_api_base = http://api:8080 -stablediffusion_model = stablediffusion \ No newline at end of file +stablediffusion_model = stablediffusion +embeddings_model = all-MiniLM-L6-v2 +embeddings_api_base = http://api:30316/v1 +persistent_dir = /tmp/data +db_dir = /tmp/data/db +milvus_host = +milvus_port = +memory_collection = localai +memory_chunk_size = 600 +memory_chunk_overlap = 110 +memory_results = 3 +memory_search_type = mmr \ No newline at end of file