microsoft / microsoft/semantic-kernel-java

Bug: Issue with API Version Compatibility When Using AzureOpenAI

Open
#244 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug triage
Dominant language
Java
Stars
276
Forks
56
Avg merge
17h 45m
Merged PRs (30d)
4

Description

Describe the bug
I am currently working with the Azure GPT-35-Turbo and encountered an issue while trying to implement an example from the Microsoft Semantic Kernel Java SDK. Specifically, I was following the example provided here

To Reproduce
Upon execution, I received the following error messages indicating a problem related to the API version compatibility:

14:56:37 WARN  c.m.s.s.KernelFunctionFromPrompt - Something went wrong while rendering the semantic function or while executing the text completion. Function: null.genapi. Error: Status code 400, "response_format value as json_schema is enabled only for api versions 2024-08-01-preview and later"
Exception in thread "main" com.azure.core.exception.HttpResponseException: Status code 400, "response_format value as json_schema is enabled only for api versions 2024-08-01-preview and later"

It appears that the response_format value json_schema is only enabled for API versions "2024-08-01-preview" and later. The error logs suggest that the current API version I am using does not support this feature.

Expected behavior
An additional parameter to specify the API version to use by the client.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the response-schema example at semantickernel-concepts/semantickernel-syntax-examples/src/main/java/com/microsoft/semantickernel/samples/syntaxexamples/chatcompletion/responseschema/Example_ChatWithResponseFormat.java and trace how the AzureOpenAI client is configured. Reproduce the API-version error, then verify that the client can accept the required API version and that the example runs with json_schema.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.