TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tell HN: ChatGPT supports input type other then text

2 pointsby kburmanover 2 years ago
While playing around with chatgpt API I got this error<p>``` { &quot;detail&quot;: [ { &quot;loc&quot;: [ &quot;body&quot;, &quot;messages&quot;, 0, &quot;content&quot; ], &quot;msg&quot;: &quot;No match for discriminator &#x27;content_type&#x27; and value &#x27;picture&#x27; (allowed values: &#x27;text&#x27;, &#x27;code&#x27;, &#x27;tether_browsing_code&#x27;, &#x27;tether_browsing_display&#x27;, &#x27;tether_quote&#x27;, &#x27;error&#x27;, &#x27;stdout&#x27;, &#x27;stderr&#x27;, &#x27;image&#x27;, &#x27;execution_output&#x27;, &#x27;masked_code&#x27;, &#x27;masked_text&#x27;, &#x27;unit_test_result&#x27;, &#x27;system_error&#x27;)&quot;, &quot;type&quot;: &quot;value_error.discriminated_union.invalid_discriminator&quot;, &quot;ctx&quot;: { &quot;discriminator_key&quot;: &quot;content_type&quot;, &quot;discriminator_value&quot;: &quot;picture&quot;, &quot;allowed_values&quot;: &quot;&#x27;text&#x27;, &#x27;code&#x27;, &#x27;tether_browsing_code&#x27;, &#x27;tether_browsing_display&#x27;, &#x27;tether_quote&#x27;, &#x27;error&#x27;, &#x27;stdout&#x27;, &#x27;stderr&#x27;, &#x27;image&#x27;, &#x27;execution_output&#x27;, &#x27;masked_code&#x27;, &#x27;masked_text&#x27;, &#x27;unit_test_result&#x27;, &#x27;system_error&#x27;&quot; } } ] } ```<p>From the allowed values in error it seems like ChatGPT will be supporting actual browser display and image as input in future.<p>After this I tried incorrect value for role and got this<p>``` {&quot;detail&quot;:[{&quot;loc&quot;:[&quot;body&quot;,&quot;messages&quot;,0,&quot;role&quot;],&quot;msg&quot;:&quot;value is not a valid enumeration member; permitted: &#x27;unknown&#x27;, &#x27;user&#x27;, &#x27;assistant&#x27;, &#x27;system&#x27;, &#x27;critic&#x27;, &#x27;tool&#x27;&quot;,&quot;type&quot;:&quot;type_error.enum&quot;,&quot;ctx&quot;:{&quot;enum_values&quot;:[&quot;unknown&quot;,&quot;user&quot;,&quot;assistant&quot;,&quot;system&quot;,&quot;critic&quot;,&quot;tool&quot;]}}]}%<p>```

1 comment

toshvelagaover 2 years ago
Ahhh I just did the same thing :)