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

Uploaded Python 3

File details

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

File metadata

  • Download URL: openai_requests_utils-0.0.2.tar.gz
  • Upload date:
  • Size: 5.7 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.2.tar.gz
Algorithm Hash digest
SHA256 1da8fbebf8ac435f713bd051855b6618256b483b6301259dfc0ea1a7c55549d5
MD5 5aef05facd45cea9862ee5382fc6c0db
BLAKE2b-256 e8ff1a2ef07d3d2949660e875e91927719fe2170eee921137a1f39fa160d469b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openai_requests_utils-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e13511009cf5ebd716e51581a7341ce702a5575dc73fa68f9bd6c3c6e83521a9
MD5 62fcd38c698b4730499d1c1dfcd7717f
BLAKE2b-256 47048db81c945da8bf44e3ec1ff8e7411ac0a89d6912781755006c6c61f33a1f

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