Translation Scenarios
Recommendations for translation and text polishing:
- Clearly specify source/target languages, tone, and domain in the prompt
- Use a terminology glossary to ensure consistency
- For large documents, translate in segments and then review/merge
Example
from openai import OpenAI
client = OpenAI(api_key="...", base_url="https://api.manysky.top/v1")
resp = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Translate this sentence into English: Please tell me how to use Qiyiguo AI."}]
)
print(resp.choices[0].message.content)