55)
66from patchwork .common .tools .api_tool import APIRequestTool
77from patchwork .step import Step
8- from patchwork .steps .ManageEngine .typed import ManageEngineInputs , ManageEngineOutputs
98
9+ from .typed import ManageEngineInputs , ManageEngineOutputs
1010
11- class ManageEngineStep (
12- Step , input_class = ManageEngineInputs , output_class = ManageEngineOutputs
13- ):
11+
12+ class ManageEngineStep (Step , input_class = ManageEngineInputs , output_class = ManageEngineOutputs ):
1413 def __init__ (self , inputs : ManageEngineInputs ):
1514 super ().__init__ (inputs )
1615
17- if not inputs .get ("access_token " ):
18- raise ValueError ("access_token is required" )
16+ if not inputs .get ("me_access_token " ):
17+ raise ValueError ("me_access_token is required" )
1918 if not inputs .get ("user_prompt" ):
2019 raise ValueError ("user_prompt is required" )
2120
@@ -29,7 +28,7 @@ def __init__(self, inputs: ManageEngineInputs):
2928 )
3029
3130 self .headers = {
32- "Authorization" : f"Zoho-oauthtoken { inputs .get ('access_token ' )} " ,
31+ "Authorization" : f"Zoho-oauthtoken { inputs .get ('me_access_token ' )} " ,
3332 "Content-Type" : "application/x-www-form-urlencoded" ,
3433 "Accept" : "application/vnd.manageengine.sdp.v3+json" ,
3534 }
@@ -47,9 +46,7 @@ def __init__(self, inputs: ManageEngineInputs):
4746 AgentConfig (
4847 name = "ManageEngine Assistant" ,
4948 tool_set = dict (
50- make_api_request = APIRequestTool (
51- headers = self .headers , data_prefix = "input_data="
52- ),
49+ make_api_request = APIRequestTool (headers = self .headers , data_prefix = "input_data=" ),
5350 ),
5451 system_prompt = """\
5552 You are an senior software developer helping the program manager to interact with ManageEngine ServiceDesk via the ServiceDeskPlus API.
0 commit comments