返回全部动态

OpenAI Python SDK v3.37.0 发布,Decisions 类型含破坏性变更

原标题:v3.37.0

OpenAI Python SDK Releases一手来源API 更新质量 72

AI 摘要

OpenAI 发布 Python SDK v3.37.0,对 Decisions 类型引入破坏性变更:Live 响应模型中 question 的 instructions 字段现在可以是字符串,也可以是结构化文本、图像或 JSON 片段组成的列表。开发者在使用字符串操作前需先用 isinstance 判断类型,并处理结构化形式;请求输入类型也新增了消息角色和工具历史条目,需要更新穷举类型检查。原有字符串 instructions 和用户消息输入仍受支持。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

## [3.37.0](https://github.com/openai/openai-python/compare/v3.36.1...v3.37.0) (2026-10-22) ### ⚠ BREAKING CHANGES * **api:** This minor release includes a breaking change to Decisions types. In Live response models, question `instructions` can now be a string or a list of structured text, image, or JSON parts; check `isinstance(question.instructions, str)` before using string operations and handle the structured form. Decisions request input types also include additional message roles and to


发布时间:2026-10-23 04:03
抓取时间:2026-10-23 04:06
来源机构:OpenAI
阅读原文github.com