fixed lint
This commit is contained in:
@@ -17,7 +17,9 @@ if not os.path.exists(WORKING_DIR):
|
|||||||
# ChromaDB Configuration
|
# ChromaDB Configuration
|
||||||
CHROMADB_USE_LOCAL_PERSISTENT = False
|
CHROMADB_USE_LOCAL_PERSISTENT = False
|
||||||
# Local PersistentClient Configuration
|
# 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
|
# Remote HttpClient Configuration
|
||||||
CHROMADB_HOST = os.environ.get("CHROMADB_HOST", "localhost")
|
CHROMADB_HOST = os.environ.get("CHROMADB_HOST", "localhost")
|
||||||
CHROMADB_PORT = int(os.environ.get("CHROMADB_PORT", 8000))
|
CHROMADB_PORT = int(os.environ.get("CHROMADB_PORT", 8000))
|
||||||
|
@@ -67,7 +67,9 @@ class ChromaVectorDBStorage(BaseVectorStorage):
|
|||||||
|
|
||||||
if "token_authn" in auth_provider:
|
if "token_authn" in auth_provider:
|
||||||
headers = {
|
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:
|
elif "basic_authn" in auth_provider:
|
||||||
auth_credentials = config.get("auth_credentials", "admin:admin")
|
auth_credentials = config.get("auth_credentials", "admin:admin")
|
||||||
@@ -154,7 +156,9 @@ class ChromaVectorDBStorage(BaseVectorStorage):
|
|||||||
embedding = await self.embedding_func([query])
|
embedding = await self.embedding_func([query])
|
||||||
|
|
||||||
results = self._collection.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
|
n_results=top_k * 2, # Request more results to allow for filtering
|
||||||
include=["metadatas", "distances", "documents"],
|
include=["metadatas", "distances", "documents"],
|
||||||
)
|
)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from typing import List, Dict, Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
|
||||||
class GPTKeywordExtractionFormat(BaseModel):
|
class GPTKeywordExtractionFormat(BaseModel):
|
||||||
|
Reference in New Issue
Block a user