Skip to content

[FEATURE] Add support for structured outputs for OpenAI Actions #13707

@malexanderlim

Description

@malexanderlim

https://platform.openai.com/docs/guides/structured-outputs/introduction

OpenAI has released support for structured outputs, which ensures that models generate responses that conform to a supplied JSON schema.

We should update the Chat action to be able to support this new feature:
https://platform.openai.com/docs/api-reference/chat/create

  1. Chat
  • Add new json_schema option for response_format
  • Update Response Format description:
Specify the format that the model must output.
* Text (default): Returns unstructured text output. 
* JSON Object: Ensures the model's output is a valid JSON object.
* JSON Schema (GPT-4o and later): Enables you to define a specific structure for the model's output using a JSON schema. Supported with models `gpt-4o-2024-08-06` and later, and`gpt-4o-mini-2024-07-18` and later.
  • If json_schema is selected, use additionalProps to unfurl the json_schema object.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions