mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-16 09:11:03 +08:00
fix(ai500): flat API response for the panel, list-format chat replies
- /api/ai500 returned a success/data envelope but the web httpClient
wraps the raw body as data, so the panel read coins as undefined and
showed the empty state; return a flat {coins,count} body like
/api/symbols
- the agent rendered AI500 rankings as a markdown table that the chat
UI flattens into an unreadable line: tool note + system prompt now
mandate numbered lists (one coin per line) and ban tables outright
This commit is contained in:
@@ -113,7 +113,7 @@ func (a *Agent) toolGetAI500List(storeUserID, argsJSON string) string {
|
||||
"status": "ok",
|
||||
"count": len(entries),
|
||||
"coins": entries,
|
||||
"note": "AI500 is an AI-scored crypto index; score is 0-100, increase_percent is the gain since the coin entered the index.",
|
||||
"note": "AI500 is an AI-scored crypto index; score is 0-100, increase_percent is the gain since the coin entered the index. Present this in chat as a short numbered list, one coin per line, e.g. \"1. BEAT — 评分 84.2,入选以来 +404.1%\". NEVER use a markdown table — the chat UI does not render tables.",
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Sprintf(`{"error":"failed to serialize AI500 list: %s"}`, err)
|
||||
|
||||
Reference in New Issue
Block a user