Spaces:
Running
Running
File size: 1,150 Bytes
65d450b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | from smolagents import Tool
from typing import Any, Optional
class SimpleTool(Tool):
name = "generate_recommendation_report"
description = "Generates the complete formatted hardware analysis, recommendation report, and live Hugging Face model list."
inputs = {'focus': {'type': 'string', 'nullable': True, 'description': "The user's focus preference: 'balanced', 'coding', 'reasoning', or 'lightweight'."}, 'force_refresh': {'type': 'boolean', 'nullable': True, 'description': 'If True, fetches fresh model data from Hugging Face.'}}
output_type = "string"
def forward(self, focus: 'str' = 'balanced', force_refresh: 'bool' = False) -> 'str':
"""Generates the complete formatted hardware analysis, recommendation report, and live Hugging Face model list.
Args:
focus: The user's focus preference: 'balanced', 'coding', 'reasoning', or 'lightweight'.
force_refresh: If True, fetches fresh model data from Hugging Face.
"""
from agents.bestLocalModel import format_recommendation_report
return format_recommendation_report(focus=focus, force_refresh=force_refresh) |