Commit
·
b62e4ec
1
Parent(s):
7247756
gradio ui spaces hf v1
Browse files
app.py
CHANGED
|
@@ -38,9 +38,18 @@ query_parser_agent = Agent(
|
|
| 38 |
# Need to define QueryAnalysisOutput class here as it's used by the task
|
| 39 |
class QueryAnalysisOutput(BaseModel):
|
| 40 |
"""Structured output for the query analysis task."""
|
| 41 |
-
symbols: list[str] = Field(
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
|
| 46 |
query_parsing_task = Task(
|
|
|
|
| 38 |
# Need to define QueryAnalysisOutput class here as it's used by the task
|
| 39 |
class QueryAnalysisOutput(BaseModel):
|
| 40 |
"""Structured output for the query analysis task."""
|
| 41 |
+
symbols: list[str] = Field(
|
| 42 |
+
...,
|
| 43 |
+
json_schema_extra={"description": "List of stock ticker symbols (e.g., ['TSLA', 'AAPL'])."}
|
| 44 |
+
)
|
| 45 |
+
timeframe: str = Field(
|
| 46 |
+
...,
|
| 47 |
+
json_schema_extra={"description": "Time period (e.g., '1d', '1mo', '1y')."}
|
| 48 |
+
)
|
| 49 |
+
action: str = Field(
|
| 50 |
+
...,
|
| 51 |
+
json_schema_extra={"description": "Action to be performed (e.g., 'fetch', 'plot')."}
|
| 52 |
+
)
|
| 53 |
|
| 54 |
|
| 55 |
query_parsing_task = Task(
|