Spaces:
Sleeping
Sleeping
soupstick
commited on
Commit
·
7ead058
1
Parent(s):
bc2b09a
chore: read Fireworks key from repo secret 'fireworks_api_huggingface' (+fallbacks)
Browse files- llm_provider.py +1 -1
- tools.py +1 -1
llm_provider.py
CHANGED
@@ -10,7 +10,7 @@ load_dotenv()
|
|
10 |
log = logging.getLogger("fraud-analyst")
|
11 |
logging.basicConfig(level=logging.INFO)
|
12 |
|
13 |
-
FIREWORKS_API_KEY = os.getenv("
|
14 |
FW_PRIMARY_MODEL = os.getenv("FW_PRIMARY_MODEL", "openai/gpt-oss-20b")
|
15 |
FW_SECONDARY_MODEL = os.getenv("FW_SECONDARY_MODEL", "Qwen/Qwen3-Coder-30B-A3B-Instruct")
|
16 |
|
|
|
10 |
log = logging.getLogger("fraud-analyst")
|
11 |
logging.basicConfig(level=logging.INFO)
|
12 |
|
13 |
+
FIREWORKS_API_KEY = os.getenv("fireworks_api_huggingface") or os.getenv("HF_TOKEN")
|
14 |
FW_PRIMARY_MODEL = os.getenv("FW_PRIMARY_MODEL", "openai/gpt-oss-20b")
|
15 |
FW_SECONDARY_MODEL = os.getenv("FW_SECONDARY_MODEL", "Qwen/Qwen3-Coder-30B-A3B-Instruct")
|
16 |
|
tools.py
CHANGED
@@ -47,7 +47,7 @@ def sanctions_pep_tool(csv_text: str) -> str:
|
|
47 |
class CreditCSVInput(BaseModel):
|
48 |
csv_text: str = Field(..., description="Credit CSV text")
|
49 |
|
50 |
-
@tool("credit_risk_tool", args_schema=CreditCSVInput)
|
51 |
def credit_risk_tool(csv_text: str) -> str:
|
52 |
"""Score credit risk using simple rules → risk_score, risk_level. Returns counts + sample."""
|
53 |
df = _csv_text_to_df(csv_text)
|
|
|
47 |
class CreditCSVInput(BaseModel):
|
48 |
csv_text: str = Field(..., description="Credit CSV text")
|
49 |
|
50 |
+
@tool("credit_risk_tool", args_schema=CreditCSVInput, description="Credit risk rules: score<600, utilization>0.8, DTI>0.4, defaults>0, income<30000.")
|
51 |
def credit_risk_tool(csv_text: str) -> str:
|
52 |
"""Score credit risk using simple rules → risk_score, risk_level. Returns counts + sample."""
|
53 |
df = _csv_text_to_df(csv_text)
|