openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

The official Python library for the OpenAI API

Results 204 openai-python issues
Sort by recently updated
recently updated
newest added

Hello, I noticed a discrepancy in prompt (not completion) token counting. Here's a minimum working example: ``` import os import openai from transformers import GPT2TokenizerFast os.environ["OPENAI_API_KEY"] = "for you" tokenizer...

typing_extensions are only used for Literal which is available in the standard library since Python 3.8

This PR makes data libraries like `numpy` and `pandas` optional dependencies. These libraries add up to 146MB, which makes it challenging to deploy applications using this library in environments with...

mypy doesn't correctly handle try except blocks, so it's necessary to import from the correct module based on the python version. I accidentally broke this in https://github.com/openai/openai-python/pull/154, I am sorry...

I'd like to supply the API key for each request separatly (for different users of the same app), instead of `openai.api_key = ...`. I find this strange behaviour, as documented...

* Set default azure `api_version` to `2022-12-01` * Remove search example from README because search is not longer supported * Changed token authority (see https://github.com/openai/openai-cookbook/commit/3c334e70ddd3f7b9e63e1136bb583d02bd8127bc)

when running the Search.create call I am getting a failure openai.Search.create( model="ada", query="happy", max_rerank=5, file="file-xVMG7P66WxKS1zwzEBKUGGzl" ) here is the failure: InvalidRequestError Traceback (most recent call last) in ----> 1 openai.Search.create(...

Fixes https://github.com/openai/openai-python/issues/160 in the style of all of the other image calls

How to use the api to achieve contextual continuous dialogue like ChatGPT , such as the first call to the API to ask you what your name is, and the...

* Add `deployments.list`, `deployments.get`, `deployments.delete` and `deployments.create` commands to manage deployments for azure endpoints To use the CLI with azure endpoints: ```bash export OPENAI_API_BASE="..." export OPENAI_API_TYPE="azure" export OPENAI_API_KEY="..." ```