-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprompts.ts
More file actions
28 lines (28 loc) · 832 Bytes
/
Copy pathprompts.ts
File metadata and controls
28 lines (28 loc) · 832 Bytes
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
export function buildGeminiPrompt(params: {
fearGreed: number;
hfNowE18: bigint;
hfAfterE18: bigint;
ltvBpsAfter: number;
borrowAmountWei: bigint;
}): string {
return [
"You are a deterministic risk scoring function.",
"Return STRICT JSON only.",
"No markdown, no code fences, no prose, no keys outside schema.",
"Output must be a single JSON object and nothing else.",
"",
"Schema:",
'{ "riskScoreBp": number }',
"",
"Inputs:",
`fearGreed=${params.fearGreed}`,
`hfNowE18=${params.hfNowE18.toString()}`,
`hfAfterE18=${params.hfAfterE18.toString()}`,
`ltvBpsAfter=${params.ltvBpsAfter}`,
`borrowAmountWei=${params.borrowAmountWei.toString()}`,
"",
"Rules:",
"- riskScoreBp must be an integer in [0,10000].",
"- Higher score = higher risk.",
].join("\n");
}