Closed majuansari closed 2 months ago
Continue format of the request sent is incorrect: https://github.com/continuedev/continue/issues/1350
I get the same error when trying to use Completions playground with the only deployment as gpt-4o -- it is not a selectable deployment.
Also note the https://go.microsoft.com/fwlink/?linkid=2197993 link provided is stale, last updated in February.
@mpaine-act if you look at the logs the API URL is https://majuoai-66.openai.azure.com/openai/deployments/gpt-4o/completions?api-version=2024-02-01 which is wrong
Instead of deployments/gpt4o/completions it should be
deployments/gpt-4o/chat/completion
chat is missed out in uri for some reason
curl --location --request POST 'https://XX.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-02-15-preview' \ --header 'Content-Type: application/json' \ --header 'api-key: XXX' \ --data-raw '{ "messages": [{"role":"system","content":"You are an AI assistant that helps people find information."},{"role":"user","content":"Hi"}], "max_tokens": 800, "temperature": 0.7, "frequency_penalty": 0, "presence_penalty": 0, "top_p": 0.95, "stop": null }'
Just for reference this Curl API also returning value fine.
@majuansari just made a fix here that should solve this in the next release
im not sure if that fixes that? The issue is at the URI not at the message received level. im still having this same issue (for vscode)
Before submitting your bug report
Relevant environment info
Description
With Azure open ai config { "title": "Azure OpenAI", "provider": "openai", "model": "gpt-4o (v2024-05-13)", "apiBase": "https://xxxx.openai.azure.com", "engine": "gpt-4o", "apiVersion": "2024-02-01", "apiType": "azure", "apiKey": "" },
We are not able to do inline edit. Getting following error
Error: HTTP 400 Bad Request from https://majuoai-66.openai.azure.com/openai/deployments/gpt-4o/completions?api-version=2024-02-01 {"error":{"code":"OperationNotSupported","message":"The completion operation does not work with the specified model, gpt-4o. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993."}}
To reproduce
Preset command + I and do inline edit . Every time this reproducible with the above config.
Log output