from Hacker News

Tell HN: ChatGPT supports input type other then text

by kburman on 12/11/22, 1:39 PM with 1 comments

While playing around with chatgpt API I got this error

``` { "detail": [ { "loc": [ "body", "messages", 0, "content" ], "msg": "No match for discriminator 'content_type' and value 'picture' (allowed values: 'text', 'code', 'tether_browsing_code', 'tether_browsing_display', 'tether_quote', 'error', 'stdout', 'stderr', 'image', 'execution_output', 'masked_code', 'masked_text', 'unit_test_result', 'system_error')", "type": "value_error.discriminated_union.invalid_discriminator", "ctx": { "discriminator_key": "content_type", "discriminator_value": "picture", "allowed_values": "'text', 'code', 'tether_browsing_code', 'tether_browsing_display', 'tether_quote', 'error', 'stdout', 'stderr', 'image', 'execution_output', 'masked_code', 'masked_text', 'unit_test_result', 'system_error'" } } ] } ```

From the allowed values in error it seems like ChatGPT will be supporting actual browser display and image as input in future.

After this I tried incorrect value for role and got this

``` {"detail":[{"loc":["body","messages",0,"role"],"msg":"value is not a valid enumeration member; permitted: 'unknown', 'user', 'assistant', 'system', 'critic', 'tool'","type":"type_error.enum","ctx":{"enum_values":["unknown","user","assistant","system","critic","tool"]}}]}%

```

  • by toshvelaga on 12/12/22, 8:06 AM

    Ahhh I just did the same thing :)