1.9 KiB
1.9 KiB
TradeMate Translate & Reply Skill
Translate foreign trade inquiries and generate professional replies.
Description
AI-powered translation and smart reply generation for foreign trade professionals. Supports Chinese-English bidirectional translation with trade-specific context, and generates reply suggestions in multiple tones (professional/friendly).
Triggers
- "translate this" / "翻译"
- "reply to inquiry" / "回复询盘"
- "generate reply" / "生成回复"
- "translate for trade" / "外贸翻译"
Workflow
1. Translate Text
POST /api/v1/translate
Content-Type: application/json
Authorization: Bearer <token>
{
"text": "<text to translate>",
"target_lang": "zh|en",
"context": "trade" // optional, adds trade-specific context
}
Response:
{
"translated_text": "...",
"source_lang": "en",
"provider_used": "sensenova",
"from_cache": false
}
2. Generate Reply
POST /api/v1/translate/reply
Content-Type: application/json
Authorization: Bearer <token>
{
"inquiry": "<customer inquiry text>",
"tone": "professional|friendly",
"count": 2,
"context": {
"product": "<optional product name>",
"price": "<optional price info>"
}
}
Response:
{
"suggestions": [
{"reply": "...", "tone": "professional", "provider": "sensenova"},
{"reply": "...", "tone": "friendly", "provider": "sensenova"}
],
"count": 2
}
3. Extract Info from Inquiry
POST /api/v1/translate/extract
Content-Type: application/json
Authorization: Bearer <token>
{
"text": "<inquiry text>",
"extract_type": "inquiry"
}
Configuration
Requires a running TradeMate backend instance. Set environment variables:
export TRADEMATE_API_URL=http://localhost:8000
export TRADEMATE_API_KEY=<your-api-token>
Notes
- Free tier: limited daily translations
- Pro tier: unlimited usage
- Uses Sensenova (商汤) as default AI provider, falls back to NVIDIA