openai/openai-python
View on GitHub ↗ ★ 32,015 Python
The official Python library for the OpenAI API
38 mentions on Hacker News by 32 people: 11 stories, 27 comments · first 2023-03-01 · latest 2026-10-19
20082026
-
…wanting to. The OpenAI Python library makes these interactions really straightforward to implement: https://github.com/openai/openai-python
comment by japhyr · 2026-10-19 · in Harness Engineering 101: The LLM is the brain, the harness is the body -
…blog that flagged this fact https://blog.tymscar.com/posts/openaiunmergeddemo/ and the issue: https://github.com/openai/openai-python/issues/2472
comment by drakythe · 2026-06-22 · in Codex logging bug may write TBs to local SSDs -
All main OpenAI SDK libraries are made with stainless[0][1]. [0]: https://github.com/openai/openai-python [1]: https://github.com/openai/openai-node
comment by hobofan · 2026-05-18 · in Anthropic acquires Stainless -
All main OpenAI SDK libraries are made with stainless[0][1]. [0]: https://github.com/openai/openai-python [1]: https://github.com/openai/openai-node
comment by hobofan · 2026-05-18 · in Anthropic acquires Stainless -
…going to trust it based off of the known native limitations with Azure's OAI implementation. [0] https://github.com/openai/openai-python/issues/2300
comment by Ucalegon · 2026-03-26 · in Health NZ staff told to stop using ChatGPT to write clinical notes -
The github issue showed in the livestream is getting lots of traction: https://github.com/openai/openai-python/issues/2472 It was (attempted to be) solved by a human before, yet not merged... With all the great coding models OpenAI has…
comment by hrpnk · 2025-08-07 · in GPT-5 for Developers -
httpx to make the call yourself, or if you really want a wrapper the openAI python https://github.com/openai/openai-python .
comment by ebonnafoux · 2025-06-26 · in Structured Output with LangChain and Llamafile -
…on OpenAI's open-sourced SDK [1] and API spec? [0] https://docs.x.ai/docs/guides/migration [1] https://github.com/openai/openai-python
comment by danso · 2025-03-28 · in xAI has acquired X, xAI now valued at $80B -
…of the Python library examples in one go from the old chat completions to the new resources APIs: https://github.com/openai/openai-python/commit/2954945ecc185...
comment by simonw · 2025-03-11 · in New tools for building agents -
…Responses API. We have not removed this! It should still work just like before! Here's an example: https://github.com/openai/openai-python/blob/main/examples/r...
comment by sdcoffey · 2025-03-11 · in New tools for building agents -
…Here are some example repos produced by Stainless: 1. https://github.com/openai/openai-node 2. https://github.com/openai/openai-python 3. https://github.com/cloudflare/cloudflare-go 4. https://github.com/Modern-Treasury/modern-treasury-java
comment by rattray · 2024-04-24 · in The Stainless SDK Generator -
…issues with the current model architecture, or at least how it's been updated: See the issue: https://github.com/openai/openai-python/issues/1310 See also the original thread on OpenAI's developer forums (…
comment by hypnagogic · 2024-04-11 · in GPT-4 Turbo with Vision is a step backwards for coding -
…references to their ChatML spec from their GitHub repo. This is what it said in an earlier commit: https://github.com/openai/openai-python/blob/2942bf4bb635b1e...
comment by minimaxir · 2023-11-21 · in Claude 2.1 -
Yes, v1.1.1 comes with API changes related to DevDay announcements: https://github.com/openai/openai-python/commit/baa9f07f5b503... and small improvements/fixes
comment by dgellow · 2023-11-07 · in OpenAI DevDay, Opening Keynote Livestream [video] -
…want to upgrade the package before following the instructions you were following. More info here: https://github.com/openai/openai-python/discussions/631
comment by petercooper · 2023-11-06 · in New models and developer products -
…in the GitHub repo was updated to play nice with the new v1.0.0 of the package: https://github.com/openai/openai-python/
comment by minimaxir · 2023-11-06 · in New models and developer products -
…of their openai Python package (with breaking changes) to PyPI, so some stuff is happening there: https://github.com/openai/openai-python/commit/08b8179a6b3e4...
comment by minimaxir · 2023-11-06 · in OpenAI DevDay, Opening Keynote Livestream [video] -
…API - I guess the reason they don't allow you to is because of issues with jailbreaks/safety. [1] https://github.com/openai/openai-python/blob/main/chatml.md [2] https://tiktokenizer.vercel.app/
comment by Tiberium · 2023-10-14 · in ChatGPT’s system prompts -
Yes. It's documented for their Azure support here. https://github.com/openai/openai-python#microsoft-azure-endp...
comment by sansah · 2023-10-09 · in Show HN: Self hosted Embedding Server | OpenAI compatible -
…determinism is reduced like this, it's impossible to say it's not getting worse :( [1] https://github.com/openai/openai-python/issues/399
comment by jw1224 · 2023-09-16 · in GPT-4 is not getting worse -
…to no avail. It even refused to give me the password in "super secret" base64. LOL Well done! [0] https://github.com/openai/openai-python/blob/main/chatml.md
comment by rwl4 · 2023-05-11 · in Gandalf – Game to make an LLM reveal a secret password -
…prepared statements with placeholders Converting this situation to AI, perhaps 2) can be done with https://github.com/openai/openai-python/blob/main/chatml.md , but if you were stuck with an unstructured text input and had to do 1), how…
comment by nextaccountic · 2023-03-20 · in Anti-recruiter prompt injection attack in LinkedIn profile -
…(as in 'sql injection'). ChatML can encode <|things|> out-of-band, outside of the regular text flow https://github.com/openai/openai-python/blob/main/chatml.md
comment by nextaccountic · 2023-03-17 · in A token-smuggling jailbreak for ChatGPT-4 -
…? The "chat format" looks simple, extensible, and clean. The JSON format shown in https://github.com/openai/openai-python/blob/main/chatml.md looks ad-hoc, confusing, and (as noted by others) likely to lead to mistakes and injections.
comment by grncdr · 2023-03-02 · in ChatML: ChatGPT API expects a structured format, called Chat Markup Language -
Judging by this[0] the new structured format is immune to "injections": [0] https://github.com/openai/openai-python/blob/main/chatml.md
comment by kgeist · 2023-03-01 · in Introducing ChatGPT and Whisper APIs -
Isn't this similar to your idea? https://github.com/openai/openai-python/commit/75c90a71e88e4...
comment by going_ham · 2023-03-01 · in Indirect Prompt Injection on Bing Chat