Skip to main content

Translate via Azure Openai

Project description

azure-openai-tr

pytestpythonCode style: blackLicense: MITPyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azure_openai_tr-0.1.0a1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

azure_openai_tr-0.1.0a1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file azure_openai_tr-0.1.0a1.tar.gz.

File metadata

  • Download URL: azure_openai_tr-0.1.0a1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.10 Windows/10

File hashes

Hashes for azure_openai_tr-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 dac74bf343f8a96d727a26586cc44c09ef2853692b2169d7aec2bc81714cd9f9
MD5 63be249d8f41f26648e0b748594df8a3
BLAKE2b-256 e2cae340e5d6be5ddff98e10be1c35a0bfae3ac32c2f358d2d5ec6d575108e8a

See more details on using hashes here.

File details

Details for the file azure_openai_tr-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: azure_openai_tr-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.10 Windows/10

File hashes

Hashes for azure_openai_tr-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 309c80f192de1c26ccafecf4735e2f2c074371240b9a2fd6229294465ac89bcb
MD5 febdfb760b2febdb7f059209a3084992
BLAKE2b-256 4f071d13d39d35d1ea35f23fc3ec67dc12e32341831532274e8f09c09e82be90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page