Skip to main content

Useful utils to use with openai models

Project description

openai_requests_utils

You need to create an environment variable called "OPENAI_API_KEY" which contains your OpenAI API key. You also need to create a config file called oai_config.json in the same folder as your script to choose the model and the API call parameters. Every parameter except "model" is optional and can be removed.

Example of oai_config.json: { "model": "gpt-3.5-turbo-1106", "max_response_length": 400, "timeout": 10, "temperature": 1, "top_p": 0.95, "presence_penalty": 0.5, "frequency_penalty": 0.5 }

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

openai_requests_utils-0.0.5.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

openai_requests_utils-0.0.5-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file openai_requests_utils-0.0.5.tar.gz.

File metadata

  • Download URL: openai_requests_utils-0.0.5.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.6

File hashes

Hashes for openai_requests_utils-0.0.5.tar.gz
Algorithm Hash digest
SHA256 628540a2e8cc7b1714fbaa204077e741f15bbc9fbd609622bfcb38e7511673e4
MD5 1a6a469426f7143189e6e22cbc3fecf6
BLAKE2b-256 a30ae575c9cb08ff8de541214a10c3fae6505397bf4b3977e68365961bf65847

See more details on using hashes here.

File details

Details for the file openai_requests_utils-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for openai_requests_utils-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 30635ac0f187d50b0b11167aebe53b0f7b581a61a2c227708b5b43beaf753ca3
MD5 79ccc05d9f3788df15999516b34ee093
BLAKE2b-256 ddb2c7247e17245b28ed5e9107e548c0ecf345e8e97110c8b1bed6d93950b5be

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