TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Tell HN: ChatGPT supports input type other then text

2 点作者 kburman超过 2 年前
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

toshvelaga超过 2 年前
Ahhh I just did the same thing :)