more require
This commit is contained in:
Binary file not shown.
@@ -2,13 +2,9 @@ import sys
|
||||
import os
|
||||
current_directory = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.append(current_directory)
|
||||
from flask_socketio import SocketIO, join_room, emit, Namespace
|
||||
import agentscope
|
||||
from agentscope.message import Msg
|
||||
import os
|
||||
import asyncio
|
||||
import threading
|
||||
import json
|
||||
|
||||
from agent.flex_service_toolkit import *
|
||||
from AlgoriAgent.projects.algoriAgent.agent.algori_agent import *
|
||||
@@ -51,7 +47,6 @@ def tool_name_to_tool(tool_name_list):
|
||||
continue
|
||||
if tool_name == "judge":
|
||||
tools.append(judge)
|
||||
|
||||
return tools
|
||||
|
||||
def tool_name_to_tool_with_args(tool_name_list, tool_args_list) -> list[tuple[Callable, dict]]:
|
||||
@@ -60,9 +55,9 @@ def tool_name_to_tool_with_args(tool_name_list, tool_args_list) -> list[tuple[Ca
|
||||
if tool_name == "":
|
||||
continue
|
||||
if tool_name == "judge":
|
||||
tools.append((judge, {"course_id": tool_args[0], "lesson_id": tool_args[1], "name": tool_args[2]}))
|
||||
|
||||
tools.append((judge, {"name": tool_args[0]}))
|
||||
return tools
|
||||
|
||||
class AgentManager:
|
||||
def __init__(self,max_iter = 5, app=None, socketio=None):
|
||||
|
||||
|
||||
Binary file not shown.
@@ -5,15 +5,13 @@ from agentscope.service import (
|
||||
ServiceExecStatus,
|
||||
)
|
||||
import os
|
||||
def judge(filepath:str, name: str, course_id: str, lesson_id: str, root_path:str):
|
||||
def judge(filepath:str, name: str, course_id: str, root_path:str):
|
||||
"""Call this method to judge the student's solution after they have completed the problem.
|
||||
|
||||
Args:
|
||||
filepath (`str`): The path to the file containing the student's solution.
|
||||
name (`str`): The name of the problem.
|
||||
course_id (`str`): The id of the course.
|
||||
lesson_id (`str`): The id of the lesson.
|
||||
root_path (`str`): The root path of the user's workspace project.
|
||||
|
||||
Returns:
|
||||
Report `tuple(int,str)`: The report of the student's solution.
|
||||
|
||||
Reference in New Issue
Block a user