File tree Expand file tree Collapse file tree
src/uipath_langchain/agent/tools/internal_tools Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import logging
12import mimetypes
23import uuid
34from typing import Any , cast
3839 extract_text_content ,
3940)
4041
42+ logger = logging .getLogger ("uipath" )
43+
4144ANALYZE_FILES_SYSTEM_MESSAGE = (
4245 "Process the provided files to complete the given task. "
4346 "Analyze the files contents thoroughly to deliver an accurate response "
@@ -81,6 +84,13 @@ async def tool_fn(**kwargs: Any):
8184 if not files :
8285 return {"analysisResult" : "No attachments provided to analyze." }
8386
87+ try :
88+ client = UiPath ()
89+ deployed_policy = await client .automation_ops .get_deployed_policy_async ()
90+ logger .info ("AutomationOps deployed policy response: %s" , deployed_policy )
91+ except Exception :
92+ logger .exception ("Failed to fetch AutomationOps deployed policy" )
93+
8494 try :
8595 human_message = HumanMessage (content = analysis_task )
8696 human_message_with_files = await add_files_to_message (human_message , files )
You can’t perform that action at this time.
0 commit comments