[improvement][chat] Move python code out of chat-core module

This commit is contained in:
jerryjzhang
2023-11-16 09:58:25 +08:00
parent 13d8b9cff5
commit 8688c8c2b3
24 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# -*- coding:utf-8 -*-
from typing import Any, List, Mapping, Optional, Union
import chromadb
from chromadb.api import Collection
from chromadb.config import Settings
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from config.config_parse import CHROMA_DB_PERSIST_PATH
client = chromadb.Client(
Settings(
chroma_db_impl="duckdb+parquet",
persist_directory=CHROMA_DB_PERSIST_PATH, # Optional, defaults to .chromadb/ in the current directory
)
)