Spaces:
Running
Running
File size: 3,238 Bytes
1476939 584ea6e 2492556 1476939 584ea6e 25fe98a 1476939 2c0c391 584ea6e 25fe98a 2c0c391 1476939 657847e 1476939 657847e 1476939 657847e 1476939 657847e 1476939 657847e 1476939 657847e 1476939 657847e 1476939 657847e 1476939 657847e 1476939 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
__all__ = ['AgentCostManager']
class AgentCostManager():
dependencies = []
inputSchema = {
"name": "AgentCostManager",
"description": "Retrieves the cost of creating and invoking an agent. Please make sure to use this before creating an agent.",
"parameters": {
"type": "object",
"properties": {},
"required": [],
}
}
costs = {
"llama3.2": {
"description": "The Llama 3.2 instruction-tuned text only models are optimized for multilingual dialogue use cases, including agentic retrieval and summarization tasks. They outperform many of the available open source and closed chat models on common industry benchmarks.",
"create_resource_cost": 50,
"invoke_resource_cost": 30,
},
"mistral": {
"description": "One of the most powerful open source models for its size. It is vastly superior in code and reasoning benchmarks.",
"create_resource_cost": 75,
"invoke_resource_cost": 40,
},
"deepseek-r1": {
"description": "DeepSeek's first-generation reasoning models, achieving performance comparable to OpenAI-o1 across math, code, and reasoning tasks.",
"create_resource_cost": 28,
"invoke_resource_cost": 35,
},
"gemini-2.5-flash-preview-04-17": {
"description": "Adaptive thinking, cost efficiency",
"create_expense_cost": 0,
"invoke_expense_cost": 0.15,
},
"gemini-2.5-pro-preview-05-06": {
"description": "Enhanced thinking and reasoning, multimodal understanding, advanced coding, and more",
"create_expense_cost": 0,
"invoke_expense_cost": 1.25,
},
"gemini-2.0-flash": {
"description": "Next generation features, speed.",
"create_expense_cost": 0,
"invoke_expense_cost": 0.10,
},
"gemini-2.0-flash-lite": {
"description": "Cost efficiency and low latency",
"create_expense_cost": 0,
"invoke_expense_cost": 0.075
},
"gemini-1.5-flash": {
"description": "Fast and versatile performance across a diverse variety of tasks",
"create_expense_cost": 0,
"invoke_expense_cost": 0.075,
},
"gemini-1.5-flash-8b": {
"description": "High volume and lower intelligence tasks",
"create_expense_cost": 0,
"invoke_expense_cost": 0.0375,
},
"gemini-1.5-pro": {
"description": "Complex reasoning tasks requiring more intelligence",
"create_expense_cost": 0,
"invoke_expense_cost": 1.25,
},
"gemini-2.0-flash-live-001": {
"description": "Low-latency bidirectional voice and video interactions",
"create_expense_cost": 0,
"invoke_expense_cost": 0.50,
}
}
def get_costs(self):
return self.costs
def run(self, **kwargs):
return {
"status": "success",
"message": "Cost of creating and invoking an agent",
"output": self.costs,
}
|