

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Mistral Large
<a name="model-card-mistral-ai-mistral-large"></a>

## ![Pixelated icon showing a stylized person or avatar with orange and yellow coloring.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/models/mistralai.png) Mistral AI：Mistral Large
<a name="model-card-mistral-ai-mistral-large-header"></a>

## 模型詳細資訊
<a name="model-card-mistral-ai-mistral-large-details"></a>

Mistral Large 是 Mistral AI 的旗艦模型，具有強大的推理、多語言支援，以及適用於複雜企業任務的 32K 內容時段。如需模型開發和效能的詳細資訊，請參閱[模型/服務卡](https://docs.mistral.ai/getting-started/models)。
+ **模型啟動日期：**2024 年 2 月 26 日
+ **模型 EOL 日期：**不可早於 4/3/2025
+ **最終使用者授權合約和使用條款：**[檢視](https://aws.amazon.com/legal/bedrock/third-party-models/)
+ **模型生命週期：**作用中
+ **內容視窗：**32K 權杖
+ **最大輸出字符：**4K


| **輸入模式** | **輸出模式** | **[支援的 APIs ](bedrock/latest/userguide/apis.html)** | **[支援的端點](bedrock/latest/userguide/endpoints.html)** | 
| --- | --- | --- | --- | 
| ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) 音訊 | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) 內嵌 | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) Responses | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) bedrock-runtime | 
| ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) 影像 | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) 影像 | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) Chat Completions | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) bedrock-mantle | 
| ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) 語音 | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) 語音 | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) Invoke |  | 
| ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) 文字 | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) 文字 | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) Converse |  | 
| ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) 影片 | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) 影片 |  |  | 

**提示**  
我們建議您盡可能將`bedrock-runtime`端點用於新應用程式。如需詳細資訊，請參閱 [Amazon Bedrock 支援的端點](endpoints.md)。

## 功能和功能
<a name="model-card-mistral-ai-mistral-large-capabilities"></a>

***Bedrock 功能***

**使用`bedrock-runtime`端點支援的功能**


| **支援的** | **不支援** | 
| --- | --- | 
|  + ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) [回應串流](bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html)<br />+ ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) [濫用偵測](bedrock/latest/userguide/abuse-detection.html)<br />+ ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) [護欄](bedrock/latest/userguide/guardrails.html)<br />+ ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) [模型評估](bedrock/latest/userguide/evaluation.html)<br />+ ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) [提示管理](bedrock/latest/userguide/prompt-management.html)<br />+ ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) [流程](bedrock/latest/userguide/flows.html)<br />+ ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) [代理程式](bedrock/latest/userguide/agents.html)<br />+ ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) [用戶端工具呼叫](bedrock/latest/userguide/tool-use.html)  |  + ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) [智慧提示路由](bedrock/latest/userguide/prompt-routing.html)<br />+ ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) [提示最佳化](bedrock/latest/userguide/prompt-management-optimize.html)<br />+ ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) [計數字符](bedrock/latest/userguide/count-tokens.html)<br />+ ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) [知識庫](bedrock/latest/userguide/knowledge-base.html)  | 

## 定價
<a name="model-card-mistral-ai-mistral-large-pricing"></a>

如需定價資訊，請參閱 [Amazon Bedrock 定價](https://aws.amazon.com/bedrock/pricing/)頁面。

## 程式設計存取
<a name="model-card-mistral-ai-mistral-large-programmatic-access"></a>

使用以下模型 IDs和端點 URLs以程式設計方式存取此模型。如需可用 APIs和端點的詳細資訊，請參閱[支援的 APIs](bedrock/latest/userguide/apis.html)和[支援的端點](bedrock/latest/userguide/endpoints.html)。


| **端點** | **模型 ID** | **區域端點 URL** | **地理推論 ID** | **全域推論 ID** | 
| --- | --- | --- | --- | --- | 
| bedrock-runtime | mistral.mistral-large-2402-v1:0 | https://bedrock-runtime.{region}.amazonaws.com | 不支援 | 不支援 | 

*例如，如果 region 是 us-east-1 （維吉尼亞北部），則 bedrock-runtime 端點 URL 將為 "https://bedrock-runtime.us-east-1.amazonaws.com"，bedrock-mantle 則為 "https://bedrock-mantle.us-east-1.api.aws/v1"。*

## 服務層
<a name="model-card-mistral-ai-mistral-large-tiers"></a>

Amazon Bedrock 提供多種服務層，以符合您的工作負載需求。**Standard** 提供pay-per-token存取 （設定`"service_tier": "default"`或省略 欄位）。**Priority** 提供價格溢價最快的回應時間 （設定 `"service_tier": "priority"`)。**Flex** 為彈性、non-time-sensitive的工作負載提供較低成本的存取 （設定 `"service_tier": "flex"`)。**預留**會提供專用輸送量與可預測工作負載的期限承諾；它會在帳戶層級設定，而不是根據請求設定 （請聯絡您的 AWS 帳戶團隊啟用）。如需詳細資訊，請參閱 [服務方案](bedrock/latest/userguide/service-tiers-inference.html)。


| **標準** | **優先順序** | **Flex** | **預留** | 
| --- | --- | --- | --- | 
| ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | 

## 區域可用性
<a name="model-card-mistral-ai-mistral-large-regional-availability"></a>

***區域可用性一目了然***

Amazon Bedrock 提供三種推論選項：**為**嚴格合規，區域內將請求保留在單一區域內、在遵守資料駐留時跨區域 （例如美國、歐洲和亞太區域） 的**地理跨區域**路由，以及在沒有駐留限制的情況下在全球任何地方**進行全球跨區域**路由。如需詳細資訊，請參閱 [依模型的區域可用性](models-region-compatibility.md)頁面。


| **區域** | **區域內** | **地理** | **全域** | 
| --- | --- | --- | --- | 
| us-east-1 （維吉尼亞北部） | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | 
| us-west-2 （奧勒岡） | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | 
| ca-central-1 （加拿大） | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | 
| eu-west-1 （愛爾蘭） | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | 
| eu-west-2 （倫敦） | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | 
| eu-west-3 （巴黎） | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | 
| ap-south-1 （孟買） | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | 
| ap-southeast-2 （雪梨） | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | 
| sa-east-1 （聖保羅） | ![Green circle with white checkmark icon.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-yes.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | ![Red circle with white X icon indicating error, cancel, or close action.](http://docs.aws.amazon.com/zh_tw/bedrock/latest/userguide/images/icons/icon-no.png) | 

## 配額和限制
<a name="model-card-mistral-ai-mistral-large-quotas"></a>

 AWS 您的帳戶具有預設配額來維持服務的效能，並確保適當使用 Amazon Bedrock。指派給帳戶的預設配額可能會根據區域因素、付款歷史記錄、詐騙使用量和/或配額[增加請求](bedrock/latest/userguide/quotas-increase.html)的核准而更新。如需詳細資訊，請參閱 [Amazon Bedrock 的配額](quotas.md) 文件並參閱模型[的限制](general/latest/gr/bedrock.html#limits_bedrock)。

## 範例程式碼
<a name="model-card-mistral-ai-mistral-large-sample-code"></a>

**步驟 1 - AWS 帳戶：**如果您已經有 AWS 帳戶，請略過此步驟。如果您是新手 AWS，請註冊 [AWS 帳戶](https://portal.aws.amazon.com/billing/signup)。

**步驟 2 - API 金鑰：**前往 [Amazon Bedrock 主控台](https://console.aws.amazon.com/bedrock/home#/api-keys/long-term/create)並產生長期 API 金鑰。

**步驟 3 - 取得 SDK：**若要使用此入門指南，您必須已安裝 Python。然後，根據您使用的 APIs相關軟體。

```
pip install boto3
```

**步驟 4 - 設定環境變數：**設定您的環境以使用 API 金鑰進行身分驗證。

```
AWS_BEARER_TOKEN_BEDROCK="<provide your Bedrock API key>"
```

**步驟 5 - 執行您的第一個推論請求：**將檔案儲存為 `bedrock-first-request.py`

------
#### [ Invoke API ]

```
import json
import boto3

client = boto3.client('bedrock-runtime', region_name='us-east-1')
response = client.invoke_model(
    modelId='mistral.mistral-large-2402-v1:0',
    body=json.dumps({
            'messages': [{ 'role': 'user', 'content': 'Can you explain the features of Amazon Bedrock?'}],
            'max_tokens': 1024
    })
)
print(json.loads(response['body'].read()))
```

------
#### [ Converse API ]

```
import boto3

client = boto3.client('bedrock-runtime', region_name='us-east-1')
response = client.converse(
    modelId='mistral.mistral-large-2402-v1:0',
    messages=[
        {
            'role': 'user',
            'content': [{'text': 'Can you explain the features of Amazon Bedrock?'}]
        }
    ]
)
print(response)
```

------