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.3.tar.gz (5.6 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.3-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for openai_requests_utils-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2d5c1845ecdfaed89ad920b3c7df9b984be38a8c7462ac7382a3c6a6e413f642
MD5 45b0e7767c30dde2c9bc7897964913f9
BLAKE2b-256 32ee6442ad0c490ac8dda801a7b3de92d31e2d9c53691af6f45a3dbb38c67a30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openai_requests_utils-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ad98a14294bc3be433142d76236469c41c5a05cdb1916b31c73050d251222ebf
MD5 5fd395121eca840176bd290ea0e2abed
BLAKE2b-256 444d8c10f4dc9d910ac73535db934a1efd27cfb1b17a39b668147476a445a12c

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