hy-mt2-plusを呼び出します。
主な機能
- 指示への追従 - スタイル、形式、用語に関する明示的な要件に対応
- 8Kコンテキストウィンドウ - 最大4Kの入力トークンと4Kの出力トークンをサポート
- 制御された翻訳 - 再現可能なローカライズワークフローに適しています
- OpenAI互換 - MixRouteを通じてChat Completionsを使用
簡単な使用例
- cURL
- Python
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hy-MT2 Plus: 翻訳を細かく制御するワークフロー向けに、優れた指示追従能力を備えたTencentの翻訳モデル。
hy-mt2-plusを呼び出します。
curl "https://api.mixroute.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hy-mt2-plus",
"messages": [
{
"role": "user",
"content": "Translate into Japanese while preserving the formal tone: Our service will be unavailable for maintenance on Friday."
}
],
"max_tokens": 256
}'
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
response = client.chat.completions.create(
model="hy-mt2-plus",
messages=[{"role": "user", "content": "Translate into Japanese while preserving the formal tone: Our service will be unavailable for maintenance on Friday."}],
max_tokens=256,
)
print(response.choices[0].message.content)
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
model | string | はい | モデルID。hy-mt2-plusである必要があります。 |
messages | array | はい | roleとcontentを含む会話メッセージ。 |
max_tokens | integer | いいえ | 生成するトークンの最大数。 |
stream | boolean | いいえ | SSEストリーミングを有効にします。 |