This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseAgent(): | |
"""Base class for all AI agents in the system.""" | |
def __init__(self, name, role, provider_config, tools): | |
# initialize the agent | |
pass | |
def use_tool(self, tool_name, params): | |
"""Execute a tool with given parameters""" | |
tool = self.tools.get(tool_name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABC, abstractmethod | |
from typing import Any, Dict, Optional, List, Type, get_type_hints, Union | |
from dataclasses import dataclass | |
import inspect | |
import json | |
from functools import wraps | |
@dataclass | |
class ToolResult: | |
success: bool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import time | |
quesitons = [ | |
"What is the area of a circle with radius of 1?", | |
# "What is the temperature in capital of United States of America?", | |
"I would like to learn more about Albert Einstein?", | |
"Does test-time chain-of-thought require special model training?" | |
] |
OlderNewer