Skip to content

Commit e0110fa

Browse files
committed
Rename manage engine auth token
1 parent cda91ba commit e0110fa

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

patchwork/steps/ManageEngine/ManageEngineStep.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
)
66
from patchwork.common.tools.api_tool import APIRequestTool
77
from 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.

patchwork/steps/ManageEngine/typed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ManageEngineInputs(TypedDict, total=False):
1111
"""
1212

1313
# Required inputs
14-
access_token: str
14+
me_access_token: str
1515

1616
# Optional configuration
1717
max_agent_calls: int

0 commit comments

Comments
 (0)