

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# modelli Cohere Embed e Cohere Embed v4
<a name="model-parameters-embed"></a>

Fai richieste di inferenza a un modello Embed con [InvokeModel](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html) È necessario l’ID modello per il modello che desideri utilizzare. Per ottenere l’ID modello, consulta [Modelli di fondazione supportati in Amazon Bedrock](models-supported.md). 

**Nota**  
Amazon Bedrock non supporta lo streaming di risposte dai modelli Cohere Embed.

**Topics**
+ [Cohere Embed v4](model-parameters-embed-v4.md)
+ [Cohere Embed v3](model-parameters-embed-v3.md)

# Cohere Embed v4
<a name="model-parameters-embed-v4"></a>

Cohere Embed v4 è un modello di embedding multimodale che supporta input di testo e immagini. È in grado di elaborare contenuti interlacciati di testo e immagini ed è quindi ideale per le applicazioni di comprensione di documenti, di ricerca visiva e di recupero multimodale. Il modello supporta vari tipi di embedding, tra cui i formati float, int8, uint8, binary e ubinary, con dimensioni di output configurabili da 256 a 1536.

L’ID modello per Cohere Embed v4 è `cohere.embed-v4`.

**Note per l’utilizzo aggiuntive**  

+ **Lunghezza del contesto:** sono supportati fino a \$1128.000 token; in caso di RAG, blocchi più piccoli spesso migliorano il recupero e i costi.
+ **Dimensionamento delle immagini:** le immagini con più di 2.458.624 pixel vengono sottocampionate fino a quelle dimensioni; le immagini con meno di 3.136 pixel vengono sovracampionate.
+ **Input interlacciati:** si preferisce il formato inputs.content[] per contenuti multimodali simili a pagine in modo che il contesto del testo, ad esempio nome file o entità, sia gestito con l’immagine.

**Topics**
+ [Richiesta e risposta](#model-parameters-embed-v4-request-response)
+ [Richiesta e risposta per diversi elementi input\$1types](#api-inference-examples-cohere-embed-v4)
+ [Codici di esempio](#code-examples-cohere-embed-v4)

## Richiesta e risposta
<a name="model-parameters-embed-v4-request-response"></a>

------
#### [ Request ]

Tipo di contenuto: application/json

```
{
  "input_type": "search_document | search_query | classification | clustering",
  "texts": ["..."],                      // optional; text-only
  "images": ["data:<mime>;base64,..."],  // optional; image-only
  "inputs": [
    { "content": [
        { "type": "text",      "text": "..." },
        { "type": "image_url", "image_url": {"url": "data:<mime>;base64,..."} }
      ]
    }
  ],                                     // optional; mixed (interleaved) text+image
  "embedding_types": ["float" | "int8" | "uint8" | "binary" | "ubinary"],
  "output_dimension": 256 | 512 | 1024 | 1536,
  "max_tokens": 128000,
  "truncate": "NONE | LEFT | RIGHT"
}
```

**Parameters**  

+ **input\$1type** (necessario): aggiunge token speciali per distinguere i casi d’uso. Valori consentiti: `search_document`, `search_query`, `classification`, `clustering`. Per ricerca/RAG, integra il corpus con `search_document` e le query con `search_query`.
+ **texts** (facoltativo): array di stringhe da incorporare. Il numero massimo per chiamata è 96. Se utilizzi `texts`, non inviare `images` nella stessa chiamata.
+ **images** (facoltativo): array di immagini con URI dati base64 da incorporare. Il numero massimo per chiamata è 96. Non inviare `texts` e `images` insieme. Usa `inputs` per l’interlacciamento.
+ **ingressi** (opzionale; mixed/fused modalità) — Un elenco in cui ogni elemento ha un elenco di parti di contenuto. Ogni parte è `{ "type": "text", "text": ... }` o `{ "type": "image_url", "image_url": {"url": "data:<mime>;base64,..."} }`. Invia qui contenuti interlacciati simili a pagine (ad esempio l’immagine della pagina PDF più didascalia/metadati). Il numero massimo di elementi è 96.
+ **embedding\$1types** (facoltativo): uno o più dei valori `float`, `int8`, `uint8`, `binary`, `ubinary`. Se omesso, restituisce embedding di tipo float.
+ **output\$1dimension** (facoltativo): determina la lunghezza del vettore. Valori consentiti: `256`, `512`, `1024`, `1536` (se non specificato, il valore predefinito è `1536`).
+ **max\$1tokens** (facoltativo): budget per il troncamento per oggetto di input. Il modello supporta fino a \$1128.000 token; blocchi più piccoli per RAG, se appropriato.
+ **truncate** (facoltativo): consente di gestire gli input di lunghezza eccessiva. I valori consentiti sono: `LEFT` (elimina i token a partire dall’inizio), `RIGHT` (elimina i token a partire dalla fine), `NONE` (restituisce un errore se l’input supera il limite).

**Limiti e dimensionamento**  

+ Elementi per richiesta: fino a 96 immagini. Il tipo di file di immagine originale deve essere png, jpeg, webp o gif e può avere una dimensione massima di 5 MB.
+ Dimensione massima della richiesta: \$120 MB di payload totale.
+ Numero massimo di token di input: 128.000 token. I file di immagine vengono convertiti in token, il cui totale deve essere inferiore a 128.000.
+ Immagini: massimo 2.458.624 pixel prima del sottocampionamento; le immagini di dimensioni inferiori a 3.136 pixel vengono sovracampionate. Le immagini devono essere fornite come `data:<mime>;base64,....`
+ Conteggio dei token (per elemento `inputs`): token provenienti da un input di immagine ≈ (pixel dell’immagine ÷ 784) x 4 token da un input di testo e immagine interlacciati = (pixel dell’immagine ÷ 784) x 4 \$1 (token di testo)

**Suggerimento:** ad esempio PDFs, converti ogni pagina in un'immagine e inviala `inputs` insieme ai metadati della pagina (ad esempio, file\$1name, entità) nelle parti di testo adiacenti.

------
#### [ Response ]

Tipo di contenuto: application/json

Se è stato richiesto un solo tipo di embedding, ad esempio solo `float`:

```
{
"id": "string",
"embeddings": [[ /* length = output_dimension */ ]],
"response_type": "embeddings_floats",
"texts": ["..."], // present if text was provided
"inputs": [ { "content": [ ... ] } ] // present if 'inputs' was used
}
```

Se sono stati richiesti più tipi di embedding, ad esempio `["float","int8"]`:

```
{
  "id": "string",
  "embeddings": {
    "float": [[ ... ]],
    "int8":  [[ ... ]]
  },
  "response_type": "embeddings_by_type",
  "texts": ["..."],     // when text used
  "inputs": [ { "content": [ ... ] } ] // when 'inputs' used
}
```
+ Il numero di vettori restituiti corrisponde alla lunghezza dell’array `texts`o al numero di elementi `inputs`.
+ La lunghezza di ogni vettore è uguale a `output_dimension` (valore predefinito `1536`).

------

## Richiesta e risposta per diversi elementi input\$1types
<a name="api-inference-examples-cohere-embed-v4"></a>

**A) Pagina interlacciata (immagine \$1 didascalia) con vettori int8 compatti**

**Richiesta**  


```
{
  "input_type": "search_document",
  "inputs": [
    {
      "content": [
        { "type": "text", "text": "Quarterly ARR growth chart; outlier in Q3." },
        { "type": "image_url", "image_url": {"url": "data:image/png;base64,{{BASE64_PAGE_IMG}}"} }
      ]
    }
  ],
  "embedding_types": ["int8"],
  "output_dimension": 512,
  "truncate": "RIGHT",
  "max_tokens": 128000
}
```

**Risposta (troncata)**  


```
{
  "id": "836a33cc-61ec-4e65-afaf-c4628171a315",
  "embeddings": { "int8": [[ 7, -3, ... ]] },
  "response_type": "embeddings_by_type",
  "inputs": [
    { "content": [
      { "type": "text", "text": "Quarterly ARR growth chart; outlier in Q3." },
      { "type": "image_url", "image_url": {"url": "data:image/png;base64,{{...}}"} }
    ] }
  ]
}
```

**B) Indicizzazione del corpus in solo testo (valori predefiniti: float, dimensioni 1536)**

**Richiesta**  


```
{
  "input_type": "search_document",
  "texts": [
    "RAG system design patterns for insurance claims",
    "Actuarial loss triangles and reserving primer"
  ]
}
```

**Risposta (esempio)**  


```
{
  "response_type": "embeddings_floats",
  "embeddings": [
    [0.0135, -0.0272, ...],   // length 1536
    [0.0047,  0.0189, ...]
  ]
}
```

## Codici di esempio
<a name="code-examples-cohere-embed-v4"></a>

------
#### [ Text input ]

```
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Shows how to generate embeddings using the Cohere Embed v4 model.
"""
import json
import logging
import boto3


from botocore.exceptions import ClientError

logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)


def generate_text_embeddings(model_id, body, region_name):
    """
    Generate text embedding by using the Cohere Embed model.
    Args:
        model_id (str): The model ID to use.
        body (str) : The reqest body to use.
        region_name (str): The AWS region to invoke the model on
    Returns:
        dict: The response from the model.
    """

    logger.info("Generating text embeddings with the Cohere Embed model %s", model_id)

    accept = '*/*'
    content_type = 'application/json'

    bedrock = boto3.client(service_name='bedrock-runtime', region_name=region_name)

    response = bedrock.invoke_model(
        body=body,
        modelId=model_id,
        accept=accept,
        contentType=content_type
    )

    logger.info("Successfully generated embeddings with Cohere model %s", model_id)

    return response


def main():
    """
    Entrypoint for Cohere Embed example.
    """

    logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
    
    region_name = 'us-east-1'

    model_id = 'cohere.embed-v4:0'
    text1 = "hello world"
    text2 = "this is a test"
    input_type = "search_document"
    embedding_types = ["float"]

    try:
        body = json.dumps({
            "texts": [
                text1,
                text2],
            "input_type": input_type,
            "embedding_types": embedding_types
        })
        
        response = generate_text_embeddings(model_id=model_id, body=body, region_name=region_name)

        response_body = json.loads(response.get('body').read())

        print(f"ID: {response_body.get('id')}")
        print(f"Response type: {response_body.get('response_type')}")

        print("Embeddings")
        embeddings = response_body.get('embeddings')
        for i, embedding_type in enumerate(embeddings):
            print(f"\t{embedding_type} Embeddings:")
            print(f"\t{embeddings[embedding_type]}")

        print("Texts")
        for i, text in enumerate(response_body.get('texts')):
            print(f"\tText {i}: {text}")

    except ClientError as err:
        message = err.response["Error"]["Message"]
        logger.error("A client error occurred: %s", message)
        print("A client error occured: " +
              format(message))
    else:
        print(
            f"Finished generating text embeddings with Cohere model {model_id}.")


if __name__ == "__main__":
    main()
```

------
#### [ Mixed modalities ]

```
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Shows how to generate image embeddings using the Cohere Embed v4 model.
"""
import json
import logging
import boto3
import base64


from botocore.exceptions import ClientError

logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)

def get_base64_image_uri(image_file_path: str, image_mime_type: str):
    with open(image_file_path, "rb") as image_file:
        image_bytes = image_file.read()
        base64_image = base64.b64encode(image_bytes).decode("utf-8")
    return f"data:{image_mime_type};base64,{base64_image}"


def generate_embeddings(model_id, body, region_name):
    """
    Generate image embedding by using the Cohere Embed model.
    Args:
        model_id (str): The model ID to use.
        body (str) : The reqest body to use.
        region_name (str): The AWS region to invoke the model on
    Returns:
        dict: The response from the model.
    """

    logger.info("Generating image embeddings with the Cohere Embed model %s", model_id)

    accept = '*/*'
    content_type = 'application/json'

    bedrock = boto3.client(service_name='bedrock-runtime', region_name=region_name)

    response = bedrock.invoke_model(
        body=body,
        modelId=model_id,
        accept=accept,
        contentType=content_type
    )

    logger.info("Successfully generated embeddings with Cohere model %s", model_id)

    return response


def main():
    """
    Entrypoint for Cohere Embed example.
    """

    logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
    
    region_name = 'us-east-1'

    image_file_path = "image.jpg"
    image_mime_type = "image/jpg"
    text = "hello world"

    model_id = 'cohere.embed-v4:0'
    input_type = "search_document"
    image_base64_uri = get_base64_image_uri(image_file_path, image_mime_type)
    embedding_types = ["int8","float"]

    try:
        body = json.dumps({
            "inputs": [
                {
                  "content": [
                    { "type": "text", "text": text },
                    { "type": "image_url", "image_url": {"url": "data:image/png;base64,{{image_base64_uri}}"} }
                  ]
                }
              ],
            "input_type": input_type,
            "embedding_types": embedding_types
        })
        
        response = generate_embeddings(model_id=model_id, body=body, region_name=region_name)

        response_body = json.loads(response.get('body').read())

        print(f"ID: {response_body.get('id')}")
        print(f"Response type: {response_body.get('response_type')}")

        print("Embeddings")
        embeddings = response_body.get('embeddings')
        for i, embedding_type in enumerate(embeddings):
            print(f"\t{embedding_type} Embeddings:")
            print(f"\t{embeddings[embedding_type]}")

        print("inputs")
        for i, input in enumerate(response_body.get('inputs')):
            print(f"\tinput {i}: {input}")

    except ClientError as err:
        message = err.response["Error"]["Message"]
        logger.error("A client error occurred: %s", message)
        print("A client error occured: " +
              format(message))
    else:
        print(
            f"Finished generating embeddings with Cohere model {model_id}.")


if __name__ == "__main__":
    main()
```

------

# Cohere Embed v3
<a name="model-parameters-embed-v3"></a>

**Topics**
+ [Richiesta e risposta](#model-parameters-embed-v3-request-response)
+ [esempio di codice](#api-inference-examples-cohere-embed-v3)

## Richiesta e risposta
<a name="model-parameters-embed-v3-request-response"></a>

------
#### [ Request ]

I modelli Cohere Embed hanno i seguenti parametri di inferenza. 

```
{
    "input_type": "search_document|search_query|classification|clustering|image",
    "texts":[string],
    "images":[image_base64_image_uri]
    "truncate": "NONE|START|END",
    "embedding_types": embedding_types
}
```

I seguenti sono parametri obbligatori.
+ **texts**: un array di stringhe da incorporare nel modello. Per prestazioni ottimali, consigliamo di ridurre la lunghezza di ogni testo a meno di 512 token. 1 token corrisponde a circa 4 caratteri.

  Di seguito sono riportati i limiti di testo per chiamata e per carattere.

**Testi per chiamata**  
    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/it_it/bedrock/latest/userguide/model-parameters-embed-v3.html)

**Caratteri**  
    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/it_it/bedrock/latest/userguide/model-parameters-embed-v3.html)
+ **input\$1type**: aggiunto all’inizio dei token speciali per differenziare i vari tipi. Non conviene mischiare tipi diversi, tranne quelli per la ricerca e il recupero. In questo caso, incorpora il corpus con il tipo `search_document` e le query incorporate con il tipo `search_query`. 
  + `search_document`: nei casi d’uso legati alla ricerca, utilizza `search_document` per codificare i documenti per gli embedding archiviati in un database vettoriale.
  + `search_query`: utilizza `search_query` per interrogare il database vettoriale al fine di trovare i documenti pertinenti.
  + `classification`: utilizza `classification` quando gli incorporamenti sono usati come input per un classificatore di testo.
  + `clustering`: utilizza `clustering` per raggruppare gli incorporamenti.
  + `images`: array di immagini.
    + Un array di URI di dati immagine che il modello deve incorporare. Il numero massimo di immagini per chiamata è 1 (ovvero, il modello supporta solo un’input dell’immagine).
    + L’immagine deve essere un URI dati valido. L’immagine deve essere in formato image/jpeg o image/png e avere una dimensione massima di 5 MB.
    + È necessario fornire solo uno dei due elementi: “immagini” o “testi”.

I seguenti sono parametri opzionali:
+  **truncate**: specifica in che modo l’API gestisce gli input maggiori della lunghezza massima del token. Utilizzare una delle seguenti operazioni:
  + `NONE`: (impostazione predefinita) restituisce un errore quando l’input supera la lunghezza massima del token di input. 
  + `START`: elimina l’inizio dell’input. 
  + `END`: elimina la fine dell’input.

  Se specifichi `START` o`END`, il modello elimina l’input finché quello rimanente non raggiunge esattamente la lunghezza massima del token di input per il modello.
+  **embedding\$1types**: specifica i tipi di embedding che devono essere restituiti. Facoltativo e predefinito è `None`, che restituisce il tipo di risposta `Embed Floats`. Può essere uno o più dei seguenti tipi:
  + `float`: utilizza questo valore per restituire gli embedding float predefiniti. 
  + `int8`: utilizza questo valore per restituire gli embedding int8 firmati. 
  + `uint8`: utilizza questo valore per restituire gli embedding int8 firmati. 
  + `binary`: utilizza questo valore per restituire gli embedding binari firmati. 
  + `ubinary`: utilizza questo valore per restituire gli embedding binari non firmati. 

Per ulteriori informazioni, consulta [https://docs.cohere.com/reference/embed](https://docs.cohere.com/reference/embed) nella documentazione Cohere.

------
#### [ Response ]

Di seguito è riportata la risposta `body` da una chiamata `InvokeModel`.

```
{
    "embeddings": [
        [ array of 1024 floats. ]
    ],
    "id": string,
    "response_type" : "embeddings_floats,
    "texts": [string],
    "images": [image_description]
}
```

La risposta `body` ha i seguenti campi possibili:
+ **id**: un identificatore per la risposta. 
+ **response\$1type**: il tipo di risposta. Questo valore è sempre `embeddings_floats`. 
+ **embeddings**: un array di incorporamenti, ognuno dei quali è un array di numeri a virgola mobile con 1024 elementi. La lunghezza dell’array `embeddings` sarà uguale alla lunghezza dell’array `texts` originale. 
+ **texts**: un array contenente le voci di testo per le quali sono stati restituiti incorporamenti. 
+ **images**: un array di una descrizione per ogni input dell’immagine.

  Un `image_description`image\$1description ha il seguente formato:

  ```
  {
      "width": long,
      "height": long,
      "format": string,
      "bit_depth": long
  }
  ```

  Se l’immagine è stata utilizzata come input, il campo di risposta `“texts”` sarà un array vuoto. Il contrario non è vero (ovvero, quando si utilizzano testi, `“images”` non saranno nella risposta)

Per ulteriori informazioni, consulta [https://docs.cohere.com/reference/embed](https://docs.cohere.com/reference/embed).

------

## esempio di codice
<a name="api-inference-examples-cohere-embed-v3"></a>

Questo esempio mostra come chiamare il modello *Cohere Embed English*.

```
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Shows how to generate text embeddings using the Cohere Embed English model.
"""
import json
import logging
import boto3


from botocore.exceptions import ClientError

logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)


def generate_text_embeddings(model_id, body, region_name):
    """
    Generate text embedding by using the Cohere Embed model.
    Args:
        model_id (str): The model ID to use.
        body (str) : The reqest body to use.
        region_name (str): The AWS region to invoke the model on
    Returns:
        dict: The response from the model.
    """

    logger.info("Generating text embeddings with the Cohere Embed model %s", model_id)

    accept = '*/*'
    content_type = 'application/json'

    bedrock = boto3.client(service_name='bedrock-runtime', region_name=region_name)

    response = bedrock.invoke_model(
        body=body,
        modelId=model_id,
        accept=accept,
        contentType=content_type
    )

    logger.info("Successfully generated embeddings with Cohere model %s", model_id)

    return response


def main():
    """
    Entrypoint for Cohere Embed example.
    """

    logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
    
    region_name = 'us-east-1'

    model_id = 'cohere.embed-english-v3'
    text1 = "hello world"
    text2 = "this is a test"
    input_type = "search_document"
    embedding_types = ["int8", "float"]

    try:
        body = json.dumps({
            "texts": [
                text1,
                text2],
            "input_type": input_type,
            "embedding_types": embedding_types
        })
        
        response = generate_text_embeddings(model_id=model_id, body=body, region_name=region_name)

        response_body = json.loads(response.get('body').read())

        print(f"ID: {response_body.get('id')}")
        print(f"Response type: {response_body.get('response_type')}")

        print("Embeddings")
        embeddings = response_body.get('embeddings')
        for i, embedding_type in enumerate(embeddings):
            print(f"\t{embedding_type} Embeddings:")
            print(f"\t{embeddings[embedding_type]}")

        print("Texts")
        for i, text in enumerate(response_body.get('texts')):
            print(f"\tText {i}: {text}")

    except ClientError as err:
        message = err.response["Error"]["Message"]
        logger.error("A client error occurred: %s", message)
        print("A client error occured: " +
              format(message))
    else:
        print(
            f"Finished generating text embeddings with Cohere model {model_id}.")


if __name__ == "__main__":
    main()
```

**Input dell’immagine**

```
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Shows how to generate image embeddings using the Cohere Embed English model.
"""
import json
import logging
import boto3
import base64


from botocore.exceptions import ClientError

logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)

def get_base64_image_uri(image_file_path: str, image_mime_type: str):
    with open(image_file_path, "rb") as image_file:
        image_bytes = image_file.read()
        base64_image = base64.b64encode(image_bytes).decode("utf-8")
    return f"data:{image_mime_type};base64,{base64_image}"


def generate_image_embeddings(model_id, body, region_name):
    """
    Generate image embedding by using the Cohere Embed model.
    Args:
        model_id (str): The model ID to use.
        body (str) : The reqest body to use.
        region_name (str): The AWS region to invoke the model on
    Returns:
        dict: The response from the model.
    """

    logger.info("Generating image embeddings with the Cohere Embed model %s", model_id)

    accept = '*/*'
    content_type = 'application/json'

    bedrock = boto3.client(service_name='bedrock-runtime', region_name=region_name)

    response = bedrock.invoke_model(
        body=body,
        modelId=model_id,
        accept=accept,
        contentType=content_type
    )

    logger.info("Successfully generated embeddings with Cohere model %s", model_id)

    return response


def main():
    """
    Entrypoint for Cohere Embed example.
    """

    logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
    
    region_name = 'us-east-1'

    image_file_path = "image.jpg"
    image_mime_type = "image/jpg"

    model_id = 'cohere.embed-english-v3'
    input_type = "image"
    images = [get_base64_image_uri(image_file_path, image_mime_type)]
    embedding_types = ["int8", "float"]

    try:
        body = json.dumps({
            "images": images,
            "input_type": input_type,
            "embedding_types": embedding_types
        })
        
        response = generate_image_embeddings(model_id=model_id, body=body, region_name=region_name)

        response_body = json.loads(response.get('body').read())

        print(f"ID: {response_body.get('id')}")
        print(f"Response type: {response_body.get('response_type')}")

        print("Embeddings")
        embeddings = response_body.get('embeddings')
        for i, embedding_type in enumerate(embeddings):
            print(f"\t{embedding_type} Embeddings:")
            print(f"\t{embeddings[embedding_type]}")

        print("Texts")
        for i, text in enumerate(response_body.get('texts')):
            print(f"\tText {i}: {text}")

    except ClientError as err:
        message = err.response["Error"]["Message"]
        logger.error("A client error occurred: %s", message)
        print("A client error occured: " +
              format(message))
    else:
        print(
            f"Finished generating text embeddings with Cohere model {model_id}.")


if __name__ == "__main__":
    main()
```