diff --git a/src/Directory.Build.props b/src/Directory.Build.props index b900ed4..14cd573 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,6 @@ - 2.9.2 + 2.9.3 enable enable 12 diff --git a/src/modules/OpenAI.ChatGpt.Modules.StructuredResponse/OpenAiClientExtensions.GetStructuredResponse.cs b/src/modules/OpenAI.ChatGpt.Modules.StructuredResponse/OpenAiClientExtensions.GetStructuredResponse.cs index abaf2d3..e32f5e6 100644 --- a/src/modules/OpenAI.ChatGpt.Modules.StructuredResponse/OpenAiClientExtensions.GetStructuredResponse.cs +++ b/src/modules/OpenAI.ChatGpt.Modules.StructuredResponse/OpenAiClientExtensions.GetStructuredResponse.cs @@ -193,14 +193,14 @@ private static TObject DeserializeOrThrow(JsonSerializerOptions? jsonDe private static string GetAdditionalJsonResponsePrompt( string responseFormat, IEnumerable? examples, JsonSerializerOptions? jsonSerializerOptions) { - var res = $"\n\nYour response MUST be STRICTLY compact JSON with escaped strings. " + - $"Here is the response structure (JSON Schema): \n```json{responseFormat}```"; + var res = $"\n\nYour output must be strictly in valid, readable, iterable RFC8259 compliant JSON without any extra text. " + + $"Here is the output structure (JSON Schema):\n```json\n{responseFormat}\n```"; if (examples is not null) { jsonSerializerOptions ??= JsonDefaultSerializerOptions; var examplesString = string.Join("\n", examples.Select(it => JsonSerializer.Serialize(it, jsonSerializerOptions))); - res += $"\n\nHere are some examples:\n```json\n{examplesString}\n```"; + res += $"\n\nExamples:\n```json\n{examplesString}\n```"; } return res;