Spaces:
Sleeping
Sleeping
| import os | |
| from typing import Dict, Any | |
| CANADA_RESIDENCY_REQUIRED = True | |
| CLOUD_REGION = os.getenv("CLOUD_REGION", "ca-central-1") | |
| COHERE_API_KEY = os.getenv("COHERE_API_KEY", "") | |
| OPENAI_API_KEY = os.getenv("OPENAI_API_KEY", "") | |
| ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY", "") | |
| COHERE_MODEL_PRIMARY = os.getenv("COHERE_MODEL_PRIMARY", "command-r") | |
| COHERE_EMBED_MODEL = os.getenv("COHERE_EMBED_MODEL", "embed-english-v3.0") | |
| OPENAI_MODEL_FALLBACK = os.getenv("OPENAI_MODEL_FALLBACK", "gpt-4o-mini") | |
| ANTHROPIC_MODEL_FALLBACK = os.getenv("ANTHROPIC_MODEL_FALLBACK", "claude-3-5-sonnet-latest") | |
| LOCAL_MODEL_ID = os.getenv("LOCAL_MODEL_ID", "meta-llama/Meta-Llama-3.1-8B-Instruct") | |
| LOCAL_ENABLE = os.getenv("LOCAL_ENABLE", "0") not in ("0", "false", "False") | |
| USE_SCENARIO_ENGINE = True | |
| MODEL_SETTINGS: Dict[str, Any] = { | |
| "temperature": float(os.getenv("TEMP", "0.2")), | |
| "top_p": float(os.getenv("TOP_P", "0.9")), | |
| "repetition_penalty": float(os.getenv("REP_PEN", "1.1")), | |
| "max_new_tokens": int(os.getenv("MAX_NEW_TOKENS", "1500")), | |
| } | |
| HEALTHCARE_SETTINGS = { | |
| "supported_file_types": [".csv", ".txt", ".md", ".pdf"], | |
| "healthcare_keywords": [ | |
| "hospital", "clinic", "surgery", "wait time", "consult", | |
| "beds", "icu", "zone", "health authority", "triage", | |
| ], | |
| } | |
| GENERAL_CONVERSATION_PROMPT = "You are a helpful assistant. Be concise, accurate, and friendly." | |
| HEALTHCARE_SYSTEM_PROMPT = ( | |
| "You are a Canadian healthcare operations analysis copilot. " | |
| "Read the entire scenario. Output only a structured JSON plan of tasks. " | |
| "Each task must define dataset, filters, grouping, aggregations, joins, pivots, " | |
| "and formatting exactly as the scenario requires. " | |
| "Do not invent numbers; computations will be executed deterministically." | |
| ) | |
| DATA_DIR = os.getenv("DATA_DIR", "./data") | |
| RAG_INDEX_DIR = os.getenv("RAG_INDEX_DIR", "./rag_index") | |
| SNAPSHOT_PATH = os.getenv("SNAPSHOT_PATH", "./snapshots") | |