* Prompt messi in una cartella apposta * Aggiorna importazioni demo per riflettere la nuova struttura delle cartelle API * Aggiunto configurazione dell'applicazione * Spostato ChatManager in app.interface * Update README.md * Aggiornato config per app & api * Rinominato il modulo NewsAPI * fix main infinite loop * API base --> core * pattern singleton per AppConfig. * Estratto i tools nella loro cartella --> api/tools * fix main KeyboardInterrupt * update tests * Docker & libs * fix copilot suggestions
17 lines
850 B
Python
17 lines
850 B
Python
from pydantic import BaseModel, Field
|
|
from app.api.core.markets import ProductInfo
|
|
|
|
class PredictorInput(BaseModel):
|
|
data: list[ProductInfo] = Field(..., description="Market data as a list of ProductInfo")
|
|
style: str = Field(..., description="Prediction style")
|
|
sentiment: str = Field(..., description="Aggregated sentiment from news and social analysis")
|
|
|
|
class ItemPortfolio(BaseModel):
|
|
asset: str = Field(..., description="Name of the asset")
|
|
percentage: float = Field(..., description="Percentage allocation to the asset")
|
|
motivation: str = Field(..., description="Motivation for the allocation")
|
|
|
|
class PredictorOutput(BaseModel):
|
|
strategy: str = Field(..., description="Concise operational strategy in Italian")
|
|
portfolio: list[ItemPortfolio] = Field(..., description="List of portfolio items with allocations")
|