Skip to content

Commit c2067aa

Browse files
Apply suggestions from code review
Co-authored-by: SamyOubouaziz <[email protected]>
1 parent 2c3d0a9 commit c2067aa

File tree

2 files changed

+8
-8
lines changed
  • tutorials
    • how-to-implement-rag-generativeapis
    • processing-images-structured-outputs-pixtral

2 files changed

+8
-8
lines changed

tutorials/how-to-implement-rag-generativeapis/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,9 @@ Streaming responses:
342342
You can customize the streaming behavior further, such as implementing progress indicators or more sophisticated UI elements for applications.
343343

344344
#### Example use cases
345-
- Customer support: Use a custom prompt to answer customer queries effectively, making the interactions feel more personalized and engaging.
346-
- Research assistance: Tailor prompts to provide concise summaries or detailed explanations on specific topics, enhancing your research capabilities.
347-
- Content generation: Personalize prompts for creative writing, generating responses that align with specific themes or tones.
345+
- Customer support: use a custom prompt to answer customer queries effectively, making the interactions feel more personalized and engaging.
346+
- Research assistance: tailor prompts to provide concise summaries or detailed explanations on specific topics, enhancing your research capabilities.
347+
- Content generation: personalize prompts for creative writing, generating responses that align with specific themes or tones.
348348

349349
## Conclusion
350350

tutorials/processing-images-structured-outputs-pixtral/index.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
meta:
3-
title: Processing Images and Getting Structured Outputs with Pixtral Vision Model
3+
title: Processing images and getting structured outputs with Pixtral vision model
44
description: Learn how to use Mistral's Pixtral vision model to automatically generate a product catalog from images.
55
content:
6-
h1: Processing Images and Getting Structured Outputs with Pixtral Vision Model
6+
h1: Processing images and getting structured outputs with Pixtral vision model
77
paragraph: Discover how to leverage Mistral's Pixtral vision model to analyze images and generate comprehensive structured outputs.
88
tags: AI vision-model image-processing Pixtral Mistral structured-data
99
categories:
@@ -52,7 +52,7 @@ Before we dive into using Pixtral, let's set up our Python environment and insta
5252

5353
## Defining the data model
5454

55-
We'll start by defining our data model using Pydantic. This will ensure that our structured output has a consistent format and that all required fields are present.
55+
We'll start by defining our data model using `pydantic`. This will ensure that our structured output has a consistent format and that all required fields are present.
5656

5757
Create a new file called `models.py` and add the following code:
5858

@@ -126,7 +126,7 @@ def get_pixtral_client():
126126
return client
127127
```
128128

129-
Make sure to set the `SCALEWAY_API_KEY` and `SCALEWAY_INFERENCE_ENDPOINT_URL` environment variables with your actual API key from Scaleway's IAM and the appropriate endpoint URL for Scaleway Managed Inference or Generative APIs service.
129+
Make sure to set the `SCALEWAY_API_KEY` and `SCALEWAY_INFERENCE_ENDPOINT_URL` environment variables with your actual API key from Scaleway IAM, and the appropriate endpoint URL for Scaleway Managed Inference or Generative APIs service.
130130

131131
## Creating the image processor
132132

@@ -220,7 +220,7 @@ This script does the following:
220220
2. Defines a function to process images using the Pixtral model.
221221
3. Creates a prompt that instructs the model on how to analyze the images and what information to extract.
222222
4. Sends the images and prompt to the Pixtral model and receives the generated structured data.
223-
5. Validates the received data against our Pydantic models.
223+
5. Validates the received data against our `pydantic` models.
224224
6. Saves the generated structured output to a JSON file.
225225

226226
## Running the image processor

0 commit comments

Comments
 (0)