Azure OpenAI in Foundry Models
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Exception in thread "main" com.azure.core.exception.ResourceNotFoundException: Status code 404, "{"error":{"code":"DeploymentNotFound", "message":"The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."}}"
at com.azure.core.implementation.http.rest.RestProxyBase.instantiateUnexpectedException(RestProxyBase.java:347)
at com.azure.core.implementation.http.rest.SyncRestProxy.ensureExpectedStatus(SyncRestProxy.java:130)
at com.azure.core.implementation.http.rest.SyncRestProxy.handleRestReturnType(SyncRestProxy.java:213)
at com.azure.core.implementation.http.rest.SyncRestProxy.invoke(SyncRestProxy.java:81)
at com.azure.core.implementation.http.rest.RestProxyBase.invoke(RestProxyBase.java:109)
at com.azure.core.http.rest.RestProxy.invoke(RestProxy.java:91)
at com.sun.proxy.$Proxy3.getChatCompletionsSync(Unknown Source)
at com.azure.ai.openai.implementation.OpenAIClientImpl.getChatCompletionsWithResponse(OpenAIClientImpl.java:897)
在Chat playground是可以正常使用的
但是用java代码调用api就出现上面的错误。
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
解决了,我的
deploymentOrModelId参数传错了,我一直传的是ModelName,没有改成DeploymentName。后来尝试修改了才调用成功。