Spaces:
Sleeping
Sleeping
File size: 3,312 Bytes
e3e865e cc6bd3b e3e865e d26c7f3 cc6bd3b d26c7f3 e3e865e cc6bd3b e3e865e d26c7f3 cc6bd3b e3e865e cc6bd3b e3e865e 851947c e3e865e fae0e51 851947c cc6bd3b e3e865e d26c7f3 e3e865e fae0e51 851947c fae0e51 e3e865e d26c7f3 e3e865e fae0e51 cc6bd3b d26c7f3 e3e865e d26c7f3 e3e865e 851947c e3e865e 851947c e3e865e 851947c e3e865e d26c7f3 e3e865e d26c7f3 e3e865e 851947c e3e865e 851947c d26c7f3 e3e865e 851947c e3e865e d26c7f3 e3e865e d26c7f3 e3e865e 851947c |
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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
from typing import List
from itf_agent import IAgent
from toolbox import Toolbox
from args import Args
class Summarizer(IAgent):
def __init__(self, temperature, max_tokens):
super().__init__(temperature, max_tokens, "04_summarizer.txt", Args.primary_llm_interface)
class Researcher(IAgent):
def __init__(self, temperature, max_tokens):
super().__init__(temperature, max_tokens, "05_researcher.txt", Args.primary_llm_interface)
def setup_tools(self) -> List:
return Toolbox.web_search.duck_duck_go_tools
class EncryptionExpert(IAgent):
def __init__(self, temperature, max_tokens):
super().__init__(temperature, max_tokens, "06_encryption_expert.txt", Args.primary_llm_interface)
def setup_tools(self) -> List:
return [
Toolbox.encryption.ascii_encode,
Toolbox.encryption.ascii_decode,
Toolbox.encryption.base64_encode,
Toolbox.encryption.base64_decode,
Toolbox.encryption.caesar_cipher_encode,
Toolbox.encryption.caesar_cipher_decode,
Toolbox.encryption.caesar_cipher_brute_force,
Toolbox.encryption.reverse_string,
Toolbox.math.unit_converter
]
def setup_slaves(self) -> List:
reasoner = Reasoner(self.temperature, self.max_tokens)
return [reasoner]
class MathExpert(IAgent):
def __init__(self, temperature, max_tokens):
super().__init__(temperature, max_tokens, "07_math_expert.txt", Args.primary_llm_interface)
def setup_tools(self) -> List:
return [
Toolbox.math.symbolic_calc,
Toolbox.math.unit_converter,
]
def setup_slaves(self) -> List:
reasoner = Reasoner(self.temperature, self.max_tokens)
return [reasoner]
class Reasoner(IAgent):
def __init__(self, temperature, max_tokens):
super().__init__(temperature, max_tokens, "08_reasoner.txt", Args.primary_llm_interface)
class ImageHandler(IAgent):
def __init__(self, temperature, max_tokens):
super().__init__(temperature, max_tokens, "09_image_handler.txt", Args.vlm_interface)
class VideoHandler(IAgent):
def __init__(self, temperature, max_tokens):
super().__init__(temperature, max_tokens, "10_video_handler.txt", Args.vlm_interface)
class Solver(IAgent):
def __init__(self, temperature, max_tokens):
super().__init__(temperature, max_tokens, "03_solver.txt", Args.primary_llm_interface)
def setup_slaves(self) -> List:
summarizer = Summarizer(self.temperature, self.max_tokens)
researcher = Researcher(self.temperature, self.max_tokens)
encryption_expert = EncryptionExpert(self.temperature, self.max_tokens)
math_expert = MathExpert(self.temperature, self.max_tokens)
reasoner = Reasoner(self.temperature, self.max_tokens)
image_handler = ImageHandler(self.temperature, self.max_tokens)
video_handler = VideoHandler(self.temperature, self.max_tokens)
return [
summarizer,
researcher,
encryption_expert,
math_expert,
reasoner,
image_handler,
video_handler
]
# if __name__ == "__main__":
# pass
|