Translate via Azure Openai
Project description
azure-openai-tr
Translate via Azure Openai
Install it
pip install azure-openai-tr
# pip install git+https://github.com/ffreemt/azure-openai-tr
# poetry add git+https://github.com/ffreemt/azure-openai-tr
# git clone https://github.com/ffreemt/azure-openai-tr && cd azure-openai-tr
Use it
from azure_openai_tr import azure_openai_tr
print(azure_openai_tr("test this and that")
# '测试这个和那个。'
print(azure_openai_tr("Hey ya", temperature=.2))
# 嘿,你好
print(azure_openai_tr("Hey ya", temperature=.8))
# 嗨啊
print(azure_openai_tr("Hey ya", temperature=.8))
# 嘿 ya
print(azure_openai_tr("test this and that", to_lang='German', temperature=.8))
# Teste dies und jenes.
print(azure_openai_tr("test this and that", to_lang='German', temperature=.8))
# Teste dies und das.
print(azure_openai_tr("test this and that", to_lang='German', temperature=.1))
# Teste dies und das.
print(azure_openai_tr("test this and that", to_lang='中文', temperature=.8, template='翻成 {to_lang}, 列出3个版本\n {text}'))
# 1. 测试这个和那个
# 2. 检验这个和那个
# 3. 试验这个和那个
Check source code for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for azure_openai_tr-0.1.0a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9978d274696bf564b70abcfd73b69a17e3cd5d59eebd67daf1e76b3d7781842 |
|
MD5 | 65a763cb9b2bb73366af0e97da21836c |
|
BLAKE2b-256 | 46c3723bf1ce27b35dcc402b367695da9e525dfa61b4148e50d2099024e487ad |