Spaces:
Runtime error
Runtime error
Hussam
commited on
Commit
·
ec5cc7e
1
Parent(s):
7da3deb
minor fixes to API config
Browse files
src/ctp_slack_bot/core/config.py
CHANGED
@@ -13,10 +13,15 @@ class Settings(BaseSettings): # TODO: Strong guarantees of validity, because gar
|
|
13 |
LOG_LEVEL: Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] = Field(default_factory=lambda data: "DEBUG" if data.get("DEBUG", False) else "INFO")
|
14 |
LOG_FORMAT: Literal["text", "json"] = "json"
|
15 |
|
|
|
|
|
|
|
|
|
16 |
# APScheduler Configuration
|
17 |
SCHEDULER_TIMEZONE: Optional[str] = "UTC"
|
18 |
|
19 |
# Slack Configuration
|
|
|
20 |
SLACK_BOT_TOKEN: SecretStr
|
21 |
SLACK_SIGNING_SECRET: Optional[SecretStr] = None
|
22 |
SLACK_APP_TOKEN: SecretStr
|
|
|
13 |
LOG_LEVEL: Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] = Field(default_factory=lambda data: "DEBUG" if data.get("DEBUG", False) else "INFO")
|
14 |
LOG_FORMAT: Literal["text", "json"] = "json"
|
15 |
|
16 |
+
# API Configuration
|
17 |
+
API_HOST: str = "0.0.0.0"
|
18 |
+
API_PORT: int = 8000
|
19 |
+
|
20 |
# APScheduler Configuration
|
21 |
SCHEDULER_TIMEZONE: Optional[str] = "UTC"
|
22 |
|
23 |
# Slack Configuration
|
24 |
+
SLACK_USER_TOKEN: Optional[SecretStr] = None
|
25 |
SLACK_BOT_TOKEN: SecretStr
|
26 |
SLACK_SIGNING_SECRET: Optional[SecretStr] = None
|
27 |
SLACK_APP_TOKEN: SecretStr
|
src/ctp_slack_bot/services/context_retrieval_service.py
CHANGED
@@ -54,7 +54,7 @@ class ContextRetrievalService(BaseModel):
|
|
54 |
# Perform similarity search
|
55 |
try:
|
56 |
results = await self.vector_database_service.search_by_similarity(query)
|
57 |
-
logger.info(f"Retrieved {len(results)} context chunks for query")
|
58 |
return results
|
59 |
except Exception as e:
|
60 |
logger.error(f"Error retrieving context: {str(e)}")
|
|
|
54 |
# Perform similarity search
|
55 |
try:
|
56 |
results = await self.vector_database_service.search_by_similarity(query)
|
57 |
+
# logger.info(f"Retrieved {len(results)} context chunks for query")
|
58 |
return results
|
59 |
except Exception as e:
|
60 |
logger.error(f"Error retrieving context: {str(e)}")
|