feat : 代码梳理 移除所有敏感密钥 通过环境变量方式配置
All checks were successful
git commit AiDA python develop 分支构建部署 / scheduled_deploy (push) Has been skipped
All checks were successful
git commit AiDA python develop 分支构建部署 / scheduled_deploy (push) Has been skipped
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
import chromadb
|
||||
import hashlib
|
||||
|
||||
import pandas as pd
|
||||
from chromadb.config import Settings
|
||||
from chromadb.utils.embedding_functions.ollama_embedding_function import OllamaEmbeddingFunction
|
||||
from tqdm import tqdm
|
||||
|
||||
from app.core.config import OLLAMA_URL, CHROMADB_PATH
|
||||
from app.core.config import OLLAMA_URL, settings
|
||||
|
||||
# 读取 csv 文件
|
||||
# csv_file_path = r'D:/Files/csv/output/output.csv'
|
||||
@@ -15,7 +11,7 @@ from app.core.config import OLLAMA_URL, CHROMADB_PATH
|
||||
# df = pd.read_csv(csv_file_path, encoding='Windows-1252')
|
||||
|
||||
# 创建 Chroma 客户端
|
||||
client = chromadb.Client(Settings(is_persistent=True, persist_directory=CHROMADB_PATH))
|
||||
client = chromadb.Client(Settings(is_persistent=True, persist_directory=settings.CHROMADB_PATH))
|
||||
# client = chromadb.Client(Settings(is_persistent=True, persist_directory="./service/search_image_with_text/vector_db"))
|
||||
# client = chromadb.Client(Settings(is_persistent=True, persist_directory="D:/workspace/AiDLab/vector_db"))
|
||||
# 创建集合
|
||||
|
||||
Reference in New Issue
Block a user