Skip to content

GPT-5 Readme Example Incorrect #613

@cmdrkeene

Description

@cmdrkeene
# Example Code in Readme
response = client.responses.create(parameters: {
  model: "gpt-5",
  input: "Hello! I'm Szymon!",
  reasoning: {
    "effort": "minimal"
  }
})
puts response.dig("output", 0, "content", 0, "text")
# => Hi Szymon! Great to meet you. How can I help today?

This does not work because the 0-th output with gpt-5 is the reasoning output, and to get the text output, you need to look at the 1-st output element.

This will correctly print the text output

puts response.dig("output", 1, "content", 0, "text")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions