feat: add product strategy, agent skills (3 SKILL.md), and Chrome browser extension
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
# 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:
|
||||
```json
|
||||
{
|
||||
"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:
|
||||
```json
|
||||
{
|
||||
"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:
|
||||
|
||||
```bash
|
||||
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
|
||||
Reference in New Issue
Block a user