Skip to content

Getting error message trying to use examples from Readme #139

Closed
@konung

Description

@konung

Describe the bug
Hi .
Getting error messages from OpenAI endpoints trying to use simple examples from Readme verbatum

To Reproduce

client = OpenAI::Client.new(access_token: API_KEY_NG_PERSONAL)
response = client.images.generate(parameters: { prompt: "A baby sea otter cooking pasta wearing a hat of some sort" })

=> {"error"=>
       {"code"=>nil,
         "message"=>"'{\"prompt\":\"A baby sea otter cooking pasta wearing a hat of some sort\"}' is not of type 'object'",      
         "param"=>nil, 
         "type"=>"invalid_request_error"}}`

Expected behavior
Supposed to get a proper response as described in Readme :)

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • macosx - Ventura
  • Ruby 3.1.2 & Ruby 3.2.0

Extra Details

If I run:

client.embeddings(
       parameters: {
           model: "babbage-similarity",
           input: "The food was delicious and the waiter..."
       }
   )

works as expected. So I assume my setup is ok, the issues is with client.images.generate request itself?

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