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.4.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.4-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openai_requests_utils-0.0.4.tar.gz
  • Upload date:
  • Size: 6.3 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.4.tar.gz
Algorithm Hash digest
SHA256 d978600ad88c1840dbe40e865ac2f822a32e5f4c97f21205a7b83d8f7032274e
MD5 2f9dcf53676aedceaeaf1a89e30b2193
BLAKE2b-256 7fd65e9db33ad369217864aaaf4113e7a495ef7a86e476f116b59dbce6f608b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openai_requests_utils-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 83ee8a8f29bfbe0d96042b3839ef0d00775f9e6b34669c16ab32550f52af3a81
MD5 376c8e4033ae9f3d15b4eb3f265d5a98
BLAKE2b-256 8acd52ff0b4027104f08e0637b7882acc1507ad748f24f69a82bcdd884b5bfd2

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