remove the the check that makes sure file url is coming from payload (#624)

This commit is contained in:
Kerem Yilmaz
2024-07-18 18:19:14 -07:00
committed by GitHub
parent f146247fe9
commit 50ff8dc441
4 changed files with 22 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
import asyncio
import json
import os
import urllib.parse
import uuid
from datetime import datetime, timedelta
from typing import Any, Awaitable, Callable, List
@@ -320,7 +321,8 @@ async def handle_upload_file_action(
# In order to make sure we don't log the secret value, we log the action with the original value action.file_url
# ************************************************************************************************************** #
file_url = await get_actual_value_of_parameter_if_secret(task, action.file_url)
if file_url not in str(task.navigation_payload):
decoded_url = urllib.parse.unquote(file_url)
if file_url not in str(task.navigation_payload) and decoded_url not in str(task.navigation_payload):
LOG.warning(
"LLM might be imagining the file url, which is not in navigation payload",
action=action,