Einstieg Doku
This commit is contained in:
0
src/solve/__init__.py
Normal file
0
src/solve/__init__.py
Normal file
30
src/solve/agent.py
Normal file
30
src/solve/agent.py
Normal file
@ -0,0 +1,30 @@
|
||||
# Agenten Plattform
|
||||
#
|
||||
# (c) 2024 Magnus Bender
|
||||
# Institute of Humanities-Centered Artificial Intelligence (CHAI)
|
||||
# Universitaet Hamburg
|
||||
# https://www.chai.uni-hamburg.de/~bender
|
||||
#
|
||||
# source code released under the terms of GNU Public License Version 3
|
||||
# https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
|
||||
from ums.agent import SolveAgent
|
||||
|
||||
from ums.utils.types import Riddle, RiddleData, RiddleSolution, RiddleStatus
|
||||
|
||||
class SimpleSolveAgent(SolveAgent):
|
||||
|
||||
def handle(self, riddle: Riddle, data: RiddleData) -> RiddleSolution:
|
||||
|
||||
if self.message().id == "test":
|
||||
status = RiddleStatus()
|
||||
status.extract.required = False
|
||||
self.sub_riddle(riddle=Riddle(context="Haha", question="Blubber"), status=status)
|
||||
|
||||
return RiddleSolution(solution="Huii", explanation="Blubb")
|
||||
|
||||
|
||||
AGENT_CLASSES = [
|
||||
SimpleSolveAgent
|
||||
]
|
Reference in New Issue
Block a user