Spaces:
Sleeping
Sleeping
File size: 1,957 Bytes
fa2487d 3a2fa09 ae6bba9 3a2fa09 ae6bba9 3a2fa09 ae6bba9 3a2fa09 a26767a 3a2fa09 b1ec06f 3a2fa09 b1ec06f 3a2fa09 b1ec06f 3a2fa09 b1ec06f 3a2fa09 b1ec06f 3a2fa09 b1ec06f 3a2fa09 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
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")
|