Skip to content

Commit

Permalink
security changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Samvit Jatia authored and Samvit Jatia committed Nov 25, 2024
1 parent 1bec660 commit b308e12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

prompt = hub.pull("hwchase17/openai-functions-agent")

composio_toolset = ComposioToolSet(api_key="fcau1ynif45lumo8txt5o", connected_account_ids={"GMAIL": "1b9c7742-ce8a-4f62-811a-b94ddc67ac5d"})
composio_toolset = ComposioToolSet(api_key="fcau1ynif45lumo8txt5o", connected_account_ids={})
tools = composio_toolset.get_tools(actions=['BROWSER_TOOL_GET_PAGE_DETAILS','BROWSER_TOOL_GOTO_PAGE', 'BROWSER_TOOL_SCROLL_PAGE', 'BROWSER_TOOL_REFRESH_PAGE', 'GMAIL_SEND_EMAIL'])

agent = create_openai_functions_agent(llm, tools, prompt)
Expand All @@ -31,7 +31,7 @@ def get_reviews(url):
\n- Common complaints or issues \
\n- Notable specific feedback about product features \
\nKeep the summary focused on helping potential buyers make an informed decision."
"Format the summary and send the summary using gmail send mail [email protected]"
"Format the summary and send the summary using gmail send mail <add email here>"
]

for task in tasks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

prompt = hub.pull("hwchase17/openai-functions-agent")

composio_toolset = ComposioToolSet(api_key="fcau1ynif45lumo8txt5o")
composio_toolset = ComposioToolSet(api_key="fcau1ynif45lumo8txt5o", connected_account_ids={})
tools = composio_toolset.get_tools(actions=['BROWSER_TOOL_GET_PAGE_DETAILS','BROWSER_TOOL_GOTO_PAGE', 'BROWSER_TOOL_SCROLL_PAGE', 'BROWSER_TOOL_REFRESH_PAGE', 'SLACK_SENDS_A_MESSAGE_TO_A_SLACK_CHANNEL'])
openai_client = OpenAI()

Expand All @@ -30,14 +30,14 @@ def handle_slack_message(event: TriggerEventData):
payload = event.payload
message = payload.get("text", "")
channel_id = payload.get("channel", "")
if channel_id != "C08260VRBKQ":
if channel_id != "<add channel id here>":
return
print(message)
print(channel_id)
composio_toolset.execute_action(
action=Action.SLACK_SENDS_A_MESSAGE_TO_A_SLACK_CHANNEL,
params={
"channel": "C08260VRBKQ",
"channel": "<add channel id here>",
"text": f"Collating responses using the composio browser tool......."
},
)
Expand All @@ -58,7 +58,7 @@ def get_reviews(url):
\n- Common complaints or issues \
\n- Notable specific feedback about product features \
\nKeep the summary focused on helping potential buyers make an informed decision."
"Format the summary and send the summary to the slack channel with id C08260VRBKQ"
"Format the summary and send the summary to the slack channel with id <add channel id here>"
]

for task in tasks:
Expand Down

0 comments on commit b308e12

Please sign in to comment.