extend auto completion agent logic (#3010)
This commit is contained in:
@@ -23,7 +23,7 @@ Reply in JSON format with the following keys:
|
||||
"confidence_float": float, // The confidence of the action. Pick a number between 0.0 and 1.0. 0.0 means no confidence, 1.0 means full confidence.
|
||||
"relevance_float": float, // The relative between the selected element and the provided information. You should consider how much the selected option is related to the user goal, the user details and the context. Pick a number between 0.00 and 1.00. 0.00 means no relevance, 1.00 means full relevance, the precision is 0.01.
|
||||
"value": str, // The value to select.
|
||||
"id": str, // The id of the most relevant and interactable element to take the action. The id must be from "HTML elements". It should be null if no element is relative or there's no auto completion suggestion.
|
||||
"id": str, // The id of the most relevant and interactable element to take the action. The id must be from {{'"IDs for emerging HTML elements"' if new_elements_ids else '"HTML elements"'}}. It should be null if no element is relative or there's no auto completion suggestion.
|
||||
}
|
||||
|
||||
Context:
|
||||
@@ -45,7 +45,12 @@ User details:
|
||||
```
|
||||
{{ navigation_payload_str }}
|
||||
```
|
||||
|
||||
{% if new_elements_ids %}
|
||||
IDs for emerging HTML elements
|
||||
```
|
||||
{{ new_elements_ids }}
|
||||
```
|
||||
{% endif %}
|
||||
HTML elements:
|
||||
```
|
||||
{{ elements }}
|
||||
|
||||
@@ -13,7 +13,7 @@ async def wait_on_persistent_browser_address(
|
||||
session_id: str,
|
||||
organization_id: str,
|
||||
timeout: int = 600,
|
||||
poll_interval: int = 2,
|
||||
poll_interval: float = 2,
|
||||
) -> str | None:
|
||||
persistent_browser_session = await await_browser_session(db, session_id, organization_id, timeout, poll_interval)
|
||||
return persistent_browser_session.browser_address if persistent_browser_session else None
|
||||
@@ -24,7 +24,7 @@ async def await_browser_session(
|
||||
session_id: str,
|
||||
organization_id: str,
|
||||
timeout: int = 600,
|
||||
poll_interval: int = 2,
|
||||
poll_interval: float = 2,
|
||||
) -> PersistentBrowserSession | None:
|
||||
try:
|
||||
async with asyncio.timeout(timeout):
|
||||
|
||||
Reference in New Issue
Block a user