Skip to content

ResponseOutputMessage requires id and status as mandatory even for non-stored responses #585

@rubenmathews

Description

@rubenmathews

When adding the Assistant’s response as input for the create response, the ResponseOutputText build fails, requiring id and status. However, these fields should only be mandatory when store is set to true for the responses API.

            List<ResponseOutputMessage.Content> contents = new ArrayList<>();
            ResponseOutputText build = ResponseOutputText.builder()
                            .text("Sample Text")
                            .annotations(Collections.emptyList())
                            .build();
            contents.add(ResponseOutputMessage.Content.ofOutputText(build));
            ResponseOutputMessage responseOutputMessage = ResponseOutputMessage.builder()
                    .role(JsonValue.from("assistant"))
                    .content(contents)
                    .build();
            return ResponseInputItem.ofResponseOutputMessage(responseOutputMessage);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingspec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions