Skip to content

Commit ca226a3

Browse files
committed
revised based on feedback
1 parent 7fd9cc0 commit ca226a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/ai/get-started-structured-output.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ This AI App Template contains several examples highlighting different structured
199199
200200
This example demonstrates how to use the Azure OpenAI service to extract structured information from a text input. It sets up Azure authentication, initializes the OpenAI client, defines a Pydantic model for the expected output, sends a request to the GPT model, and validates and prints the response. This approach ensures that the extracted information is well-structured and validated, making it easier to work with in downstream applications.
201201
202-
#### 1. Defining the Data Model
202+
#### Defining the data model
203203
204204
Defining a [Pydantic model](https://docs.pydantic.dev/latest/concepts/models/) ensures that the extracted information from the Azure OpenAI service is well-structured and validated. Pydantic models provide a clear schema for the expected output, which helps in:
205205
@@ -746,7 +746,7 @@ completion = client.beta.chat.completions.parse(
746746
- **messages**: A list of messages for the model. The system message gives instructions, and the user message has the image URL.
747747
- **response_format**: The expected response format using the `Receipt` model.
748748

749-
### Parsing and validating the response
749+
#### Parsing and validating the response
750750

751751
Next, the following code snippet parses and validates the response from the GPT model against the `Receipt` model.
752752

0 commit comments

Comments
 (0)