Updated promts; some DOCS

This commit is contained in:
Simone
2025-10-23 18:21:31 +02:00
parent 7222ab62ae
commit 906b9c8520
11 changed files with 771 additions and 137 deletions

View File

@@ -0,0 +1,80 @@
# Diagrammi di Flusso e Sequenza (Sintesi)
Documentazione breve con blocchi testuali e mermaid per flussi principali.
## Flusso Gradio Chat
```mermaid
flowchart LR
U[User] --> CH(ChatInterface)
CH --> RESP[gradio_respond]
RESP --> PL(Pipeline.interact)
PL --> WF(Workflow run)
WF --> OUT(Report)
CH --> HIST[history update]
```
## Flusso Telegram Bot
```
/start
├─> CONFIGS state
│ ├─ Model Team ↔ choose_team(index)
│ ├─ Model Output ↔ choose_team_leader(index)
│ └─ Strategy ↔ choose_strategy(index)
└─> Text message → __start_team
└─ run team → Pipeline.interact_async
├─ build_workflow
├─ stream events (Query Check → Gate → Info Recovery → Report)
└─ send PDF (markdown_pdf)
```
## Pipeline Steps (Workflow)
```mermaid
flowchart TD
A[QueryInputs] --> B[Query Check Agent]
B -->|is_crypto true| C[Team Info Recovery]
B -->|is_crypto false| STOP((Stop))
C --> D[Report Generation Agent]
D --> OUT[Markdown Report]
```
## Team Leader Loop (PlanMemoryTool)
```
Initialize Plan with tasks
Loop until no pending tasks:
- Get next pending task
- Dispatch to specific Agent (Market/News/Social)
- Update task status (completed/failed)
- If failed & scope comprehensive → add retry task
After loop:
- List all tasks & results
- Synthesize final report
```
## Tools Aggregazione
```mermaid
flowchart LR
TL[Team Leader] --> MT[MarketAPIsTool]
TL --> NT[NewsAPIsTool]
TL --> ST[SocialAPIsTool]
MT --> WH(WrapperHandler)
NT --> WH
ST --> WH
WH --> W1[Binance]
WH --> W2[Coinbase]
WH --> W3[CryptoCompare]
WH --> W4[YFinance]
WH --> N1[NewsAPI]
WH --> N2[GoogleNews]
WH --> N3[CryptoPanic]
WH --> N4[DuckDuckGo]
WH --> S1[Reddit]
WH --> S2[X]
WH --> S3[4chan]
```