The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Improve MultiOn client toolkit prompts (#9222)
Divyansh Garg9529483c2aec
diff --git a/libs/langchain/langchain/tools/multion/create_session.py b/libs/langchain/langchain/tools/multion/create_session.pyindex a434d5edb0..17717cf5eb 100644--- a/libs/langchain/langchain/tools/multion/create_session.py+++ b/libs/langchain/langchain/tools/multion/create_session.py@@ -40,9 +40,14 @@ class MultionCreateSession(BaseTool):"""name: str = "create_multion_session"- description: str = """Use this tool to create a new Multion Browser Window \- with provided fields.Always the first step to run \- any activities that can be done using browser."""+ description: str = """+ Create a new web browsing session based on a user's command or request. \+ The command should include the full info required for the session. \+ Also include an url (defaults to google.com if no better option) \+ to start the session. \+ Use this tool to create a new Browser Window with provided fields. \+ Always the first step to run any activities that can be done using browser.+ """args_schema: Type[CreateSessionSchema] = CreateSessionSchemadef _run(diff --git a/libs/langchain/langchain/tools/multion/update_session.py b/libs/langchain/langchain/tools/multion/update_session.pyindex 0a2f304127..9382879518 100644--- a/libs/langchain/langchain/tools/multion/update_session.py+++ b/libs/langchain/langchain/tools/multion/update_session.py@@ -44,10 +44,10 @@ class MultionUpdateSession(BaseTool):name: str = "update_multion_session"description: str = """Use this tool to update \- a existing corresponding \- Multion Browser Window with provided fields. \- Note:TabId is got from one of the previous Browser window creation."""+an existing corresponding Multion Browser Window with provided fields. \+Note: TabId must be received from previous Browser window creation."""args_schema: Type[UpdateSessionSchema] = UpdateSessionSchema+ tabId: str = ""def _run(self,@@ -63,9 +63,10 @@ class MultionUpdateSession(BaseTool):self.tabId = tabIdreturn contentexcept Exception as e:- print(f"{e}, creating a new session")- response = multion.new_session({"input": query, "url": url})- self.tabID = response["tabId"]- return {"tabId": response["tabId"], "Response": response["message"]}+ print(f"{e}, retrying...")+ return {"error": f"{e}", "Response": "retrying..."}+ # response = multion.new_session({"input": query, "url": url})+ # self.tabID = response["tabId"]+ # return {"tabId": response["tabId"], "Response": response["message"]}except Exception as e:raise Exception(f"An error occurred: {e}")