openai-python
openai-python copied to clipboard
The official Python library for the OpenAI API
Streamed chat completions use a different response structure vs non-streamed, i.e. deltas, which caused KeyError exceptions. Also these token deltas may have roles, and there may be empty deltas at...
Fix for issue https://github.com/openai/openai-python/issues/303 Originally, the Audio endpoint does not pass the api_key into the request ``` import openai key = ... with open("sample.wav", "rb") as audio_file: transcript = openai.Audio.transcribe("whisper-1",...
### Describe the bug I followed the instructions from https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb but got an error: openai.error.InvalidRequestError: Must provide an 'engine' or 'deployment_id' parameter to create a ### To Reproduce using a...
Add disclaimer on ChatML doc
### Describe the bug When making a call to the ChatCompletion create method, e.g.: ``` response = openai.ChatCompletion.create( model=self.model_id, messages=self.get_formatted_messages(), timeout=10 ) ``` The timeout is `pop`d off of the...
### Describe the bug When using the ChatGPT api with asynchronous calls, I do not receive rate error limits, instead the code seems stuck. ### To Reproduce Here are 2...
### Describe the bug I delete model but don't disappear from list. ### To Reproduce List ### Code snippets ```Python { "created_at": 1679331655, "fine_tuned_model": "curie:ft-personal-2023-03-20-17-13-10", "hyperparams": { "batch_size": 1, "learning_rate_multiplier":...
### Describe the feature or improvement you're requesting Currently, in order to create `openai` connection, we need to do the following: ```python import openai openai.organization = "ORG" openai.api_key = os.getenv("KEY")...
Adding a devcontainer/Codespaces setup will allow beginners to immediately use OpenAI's API without worrying about setting up their environment. The setup includes cloning the `openai-cookbook` repository and installing most of...
Chat completions on Azure have been released to the public under a preview version '2023-03-15-preview': [Reference](https://techcommunity.microsoft.com/t5/ai-cognitive-services-blog/working-with-gpt-4-and-chatgpt-models-on-azure-preview/ba-p/3773595) Thus we would like to have this preview version as the default.