Skip to main content

Some simple utils packaging OpenAI util.

Project description

Util list:

  • count_tokens: GPT系列模型下,计算文本使用的token
  • calculate_total_tokens: GPT系列模型下,计算多轮对话使用的token
  • CommonGPTModel: 常见的 GPT 模型使用名称
  • os_environ_setting: API key 的环境变量设置,或者进行代理IP和端口设置(必须先于 chat_with_llm 进行调用;或者自己手动进行了 api key 的配置,就不用调用了)
  • chat_with_llm: 与 LLM 进行文本对话

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

tq_openai_utils-0.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

tq_openai_utils-0.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file tq_openai_utils-0.0.1.tar.gz.

File metadata

  • Download URL: tq_openai_utils-0.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for tq_openai_utils-0.0.1.tar.gz
Algorithm Hash digest
SHA256 826c479dbb550715d6bbb9d7849da59c6ac19ffc44d8ec813a4057c6db0fcb14
MD5 3aad7533b88d2c844272337a6d5fe69c
BLAKE2b-256 ea43df945db8580740c6c3b05d3c05e2b8b5becb7478c469f81069f7e4dadeae

See more details on using hashes here.

File details

Details for the file tq_openai_utils-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tq_openai_utils-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9e57556fe7fd63244565a6ddcea88ee53f101549b97190f46ed9b53062286064
MD5 2799bd363c4f4455a97111257ced6be6
BLAKE2b-256 4554cad4e654da73981d927c1ddfcdaafa43c595ad31c365d94cf6beb109a8cf

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