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.8.tar.gz (6.4 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.8-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openai_requests_utils-0.0.8.tar.gz
  • Upload date:
  • Size: 6.4 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.8.tar.gz
Algorithm Hash digest
SHA256 e954aa587c8abfc488bf04ce55a1be19eb8e2a60544ee937c5f497e4b233fc5b
MD5 e88d2aae9d0b1051dde5393af8f529fb
BLAKE2b-256 cc4bfab41d01f1c29706155b4a998fe1956cfedc8fb32513e6b428512cae87e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openai_requests_utils-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 31b9c5909e42d544fa66c754d530d60ab0d2d63f1d59f8445369d0f76b908e95
MD5 e898e918103ed7acc72fc6b79f4551b8
BLAKE2b-256 4343ffaa7e046ae3828f2b11bbdd560ee8dfa920f99430195463311c6245c55d

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