You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asvishnyakov
changed the title
.Net: Bug:
HTTP 400 error "Invalid 'response_format.json_schema.name'" when generic type is used for ResponseFormat
Oct 24, 2024
Describe the bug
OpenAI API fails with error if generic type is used for
ResponseFormat
:To Reproduce
Use any generic type as ResponseFormat. For example:
Expected behavior
This issue is caused by use of
GetType().Name
atsemantic-kernel/dotnet/src/Connectors/Connectors.OpenAI/Core/ClientCore.ChatCompletion.cs
Line 560 in c304c8b
which results into
Cart`1
json schema name with`
symbol, while OpenAI API allows only alphanumberic values and_
or-
symbols.Platform
The text was updated successfully, but these errors were encountered: