Skip to content

Commit 04a435d

Browse files
committed
update
1 parent f43cbbe commit 04a435d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/ai-services/openai/how-to/responses.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ curl -X GET https://YOUR-RESOURCE-NAME.openai.azure.com/openai/responses/{respon
301301

302302
## Delete response
303303

304-
By default response data is retained for 30 days. To delete a response, you can use `response.delete("{response_id})`
304+
By default response data is retained for 30 days. To delete a response, you can use `response.delete"("{response_id})`
305305

306306
```python
307307
from openai import AzureOpenAI
@@ -711,7 +711,7 @@ def validate_coordinates(x, y):
711711

712712
This simple utility attempts to prevent out-of-bounds errors by clamping coordinates to the window dimensions.
713713

714-
### Action Handling
714+
### Action handling
715715

716716
The core of our browser automation is the action handler that processes various types of user interactions and convert them into actions within the browser.
717717

@@ -811,7 +811,7 @@ This function attempts to handle various types of actions such as:
811811
- Key presses (including combinations).
812812
- Typing text.
813813

814-
### Screenshot Capture
814+
### Screenshot capture
815815

816816
In order for the model to be able to see what it's interacting with the model needs a way to capture screenshots. For this code we're using Playwright to capture the screenshots and we're limiting the view to just the content in the browser window. The screenshot won't include the url bar or other aspects of the browser GUI. If you need the model to see outside the main browser window you could augment the model by creating your own screenshot function.
817817

@@ -824,7 +824,7 @@ async def take_screenshot(page):
824824

825825
This function captures the current browser state as an image and returns it as a base64-encoded string, ready to be sent to the model. We'll constantly do this in a loop after each step allowing the model to see if the command it tried to execute was successful or not, which then allows it to adjust based on the contents of the screenshot.
826826

827-
### Model Response Processing
827+
### Model response processing
828828

829829
This function processes the model's responses and executes the requested actions:
830830

@@ -966,7 +966,7 @@ In this section we have added code that:
966966
- Sends the updated state back to the model.
967967
- Repeats this process for multiple iterations.
968968

969-
## Main Function
969+
### Main function
970970

971971
The main function coordinates the entire process:
972972

@@ -1067,7 +1067,7 @@ The main function:
10671067
- Repeats until the user exits.
10681068
- Ensures the browser is properly closed.
10691069

1070-
### Complete Script
1070+
### Complete script
10711071

10721072
> [!CAUTION]
10731073
> This code is experimental and for demonstration purposes only. It's only intended to illustrate the basic flow of the responses API and the `computer-use-preview` model. While you can execute this code on your local computer, we strongly recommend running this code on a low privilege virtual machine with no access to sensitive data. This code is for basic testing purposes only.

0 commit comments

Comments
 (0)