- Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed as not planned
Labels
bugSomething isn't workingSomething isn't working
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
client.chac.completions.list() raised Exception:
openai.APIStatusError: Error code: 405 - {'error': {'message': 'Only POST requests are accepted.', 'type': 'invalid_request_error', 'param': None, 'code': 'method_not_supported'}}
BTW: How could it possible that no one notice this bug since 1.31.0?
To Reproduce
Completely follow the tutorial in OpenAI API Reference:
from openai import OpenAI client = OpenAI(api_key="your_key") completions = client.chat.completions.list()Code snippets
OS
Windows 11
Python version
Python 3.12.2
Library version
openai v1.31.0 & openai 2.6.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working