fixed lint
This commit is contained in:
parent
f868c1da78
commit
1051ff402d
3 changed files with 10 additions and 4 deletions
|
|
@ -17,7 +17,9 @@ if not os.path.exists(WORKING_DIR):
|
|||
# ChromaDB Configuration
|
||||
CHROMADB_USE_LOCAL_PERSISTENT = False
|
||||
# Local PersistentClient Configuration
|
||||
CHROMADB_LOCAL_PATH = os.environ.get("CHROMADB_LOCAL_PATH", os.path.join(WORKING_DIR, "chroma_data"))
|
||||
CHROMADB_LOCAL_PATH = os.environ.get(
|
||||
"CHROMADB_LOCAL_PATH", os.path.join(WORKING_DIR, "chroma_data")
|
||||
)
|
||||
# Remote HttpClient Configuration
|
||||
CHROMADB_HOST = os.environ.get("CHROMADB_HOST", "localhost")
|
||||
CHROMADB_PORT = int(os.environ.get("CHROMADB_PORT", 8000))
|
||||
|
|
|
|||
|
|
@ -67,7 +67,9 @@ class ChromaVectorDBStorage(BaseVectorStorage):
|
|||
|
||||
if "token_authn" in auth_provider:
|
||||
headers = {
|
||||
config.get("auth_header_name", "X-Chroma-Token"): auth_credentials
|
||||
config.get(
|
||||
"auth_header_name", "X-Chroma-Token"
|
||||
): auth_credentials
|
||||
}
|
||||
elif "basic_authn" in auth_provider:
|
||||
auth_credentials = config.get("auth_credentials", "admin:admin")
|
||||
|
|
@ -154,7 +156,9 @@ class ChromaVectorDBStorage(BaseVectorStorage):
|
|||
embedding = await self.embedding_func([query])
|
||||
|
||||
results = self._collection.query(
|
||||
query_embeddings=embedding.tolist() if not isinstance(embedding, list) else embedding,
|
||||
query_embeddings=embedding.tolist()
|
||||
if not isinstance(embedding, list)
|
||||
else embedding,
|
||||
n_results=top_k * 2, # Request more results to allow for filtering
|
||||
include=["metadatas", "distances", "documents"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Dict, Any, Optional
|
||||
from typing import Any, Optional
|
||||
|
||||
|
||||
class GPTKeywordExtractionFormat(BaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue