feat: new cockpit

This commit is contained in:
OpenSquared
2026-07-14 11:21:43 +02:00
parent 9778c74ae3
commit ad07c8d886
32 changed files with 871 additions and 551 deletions

View File

@@ -268,7 +268,7 @@ def _gpt4o_recommend(event: dict, templates: list) -> dict:
]
system_prompt = (
"You are a macro market analyst and causal graph specialist for the GeoOptions platform. "
"You are a macro market analyst and causal graph specialist for the OpenFin platform. "
"Given a market event and a library of causal graph templates, recommend the most appropriate template "
"and suggest any coefficient adjustments. Respond with a JSON object only.\n"
"IMPORTANT: Only recommend a template if it is structurally compatible with the event type "
@@ -1973,7 +1973,7 @@ def ai_to_grammar(template_id: int, body: AiToGrammarRequest):
)
system_prompt = (
"You are a causal graph patch generator for the GeoOptions macro-finance platform.\n"
"You are a causal graph patch generator for the OpenFin macro-finance platform.\n"
"Convert the user's natural language modification request into graph patch operations.\n"
"Return ONLY the grammar lines — no explanation, no markdown, no fences.\n\n"
+ GRAMMAR_SPEC
@@ -2036,7 +2036,7 @@ def ai_modify_template(template_id: int, body: AiModifyRequest):
gj = body.current_graph if body.current_graph.get("nodes") else t["graph_json"]
system_prompt = (
"You are a causal graph editor for the GeoOptions macro-finance platform.\n"
"You are a causal graph editor for the OpenFin macro-finance platform.\n"
"You receive a causal graph in JSON and a modification request in natural language.\n"
"Return ONLY the complete modified graph_json as a valid JSON object — no explanation, no markdown.\n\n"
"Graph format:\n"