Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure setting issue #98

Closed
likemuuxi opened this issue Jul 5, 2023 · 21 comments
Closed

Azure setting issue #98

likemuuxi opened this issue Jul 5, 2023 · 21 comments

Comments

@likemuuxi
Copy link

Help: Can you add an example of Azure settings? I'm not sure about the corresponding relationship between the settings options

@logancyang
Copy link
Owner

logancyang commented Jul 5, 2023

Take the example I have in the video demo
image

This is your instance name: under Azure OpenAI resource see this below
image

This is your deployment name: under Azure AI Studio see this below
image

Let me know if this helps!

@likemuuxi
Copy link
Author

likemuuxi commented Jul 5, 2023 via email

@logancyang
Copy link
Owner

@likemuuxi can you show me your Azure pages just like the ones I posted?

@likemuuxi
Copy link
Author

image
image
image

@logancyang
Copy link
Owner

Looks alright to me. Are you able to curl it?

curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/completions?api-version=VERSION\
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_API_KEY" \
  -d "{
  \"prompt\": \"Once upon a time\",
  \"max_tokens\": 5
}"

replace the params with yours

@likemuuxi
Copy link
Author

https://chatgpt327-3.openai.azure.com/openai/deployments/GPT35/completions?api-version=2023-06-25\
{
"error": {
"code": "404",
"message": "Resource not found"
}
}

image
Click on the domain name as shown in the picture, but I am still able to use the model.

@logancyang
Copy link
Owner

No you need to curl it, clicking on the link won't work. Can you show me your terminal with the curl response?

@likemuuxi
Copy link
Author

image

@logancyang
Copy link
Owner

Ok curl doesn't work, means your params are not correct. Are you sure about the api-version? Can you make sure all your params are correct by testing using this curl command. Once this works, you will be able to use it properly in copilot.

@logancyang
Copy link
Owner

logancyang commented Jul 11, 2023

FYI, I saw 404 myself when I have wrong API version. It is not the model version you see in Azure page apparently. Try "2023-05-15" like I used in the video demo?

@likemuuxi
Copy link
Author

FYI, I saw 404 myself when I have wrong API version. It is not the model version you see in Azure page apparently. Try "2023-05-15" like I used in the video demo?

This doesn't work, I wonder if it could be a problem with the deployment region of the model, as it affects API calls

@likemuuxi
Copy link
Author

image
Can be changed to this parameter input format.

@logancyang
Copy link
Owner

There's not much I can do to help debug your deployment. One helpful thing I tried was Azure's support chat, they are quite helpful, just let them help you figure out the right params, make sure curl works, and you will be able to use this plugin without an issue. Closing for now since this is not a Copilot issue.

But I see Azure params can be hard to get right at first. Will put the curl command example in the FAQ.

@likemuuxi
Copy link
Author

There's not much I can do to help debug your deployment. One helpful thing I tried was Azure's support chat, they are quite helpful, just let them help you figure out the right params, make sure curl works, and you will be able to use this plugin without an issue. Closing for now since this is not a Copilot issue.

But I see Azure params can be hard to get right at first. Will put the curl command example in the FAQ.

Thank you for your patient answer. I received inspiration and found various versions of the API on the following page. After modification, it can be used normally
https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#completions

@lil-i321
Copy link

There's not much I can do to help debug your deployment. One helpful thing I tried was Azure's support chat, they are quite helpful, just let them help you figure out the right params, make sure curl works, and you will be able to use this plugin without an issue. Closing for now since this is not a Copilot issue.
But I see Azure params can be hard to get right at first. Will put the curl command example in the FAQ.

Thank you for your patient answer. I received inspiration and found various versions of the API on the following page. After modification, it can be used normally https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#completions

你好,请问你是怎么解决这个问题的?我也遇到了同样的问题:“LangChain error: 404.”
我的终结点链接是这个:
https://chatg230808.openai.azure.com/openai/deployments/gpt313/chat/completions?api-version=2023-03-15-preview

@likemuuxi
Copy link
Author

There's not much I can do to help debug your deployment. One helpful thing I tried was Azure's support chat, they are quite helpful, just let them help you figure out the right params, make sure curl works, and you will be able to use this plugin without an issue. Closing for now since this is not a Copilot issue.
But I see Azure params can be hard to get right at first. Will put the curl command example in the FAQ.

Thank you for your patient answer. I received inspiration and found various versions of the API on the following page. After modification, it can be used normally https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#completions

你好,请问你是怎么解决这个问题的?我也遇到了同样的问题:“LangChain error: 404.” 我的终结点链接是这个: https://chatg230808.openai.azure.com/openai/deployments/gpt313/chat/completions?api-version=2023-03-15-preview

尝试修改插件中的Azure OPENAI API Version 其为下列中的一个 自行尝试
image

@lil-i321
Copy link

lil-i321 commented Aug 11, 2023

There's not much I can do to help debug your deployment. One helpful thing I tried was Azure's support chat, they are quite helpful, just let them help you figure out the right params, make sure curl works, and you will be able to use this plugin without an issue. Closing for now since this is not a Copilot issue.
But I see Azure params can be hard to get right at first. Will put the curl command example in the FAQ.

我用了对应的api version,并在本插件中设置了token length,完全ok了。
BYW
如何修改api version 呢?我部署了3个 3.5模型 ,api version 都是[2023-03-15-preview],不同的 api version 有什么区别吗?

@likemuuxi
Copy link
Author

我用了对应的api version,并在本插件中设置了token length,完全ok了。
BYW
如何修改api version 呢?我部署了3个 3.5模型 ,api version 都是[2023-03-15-preview],不同的 api version 有什么区别吗?

可以使用即可,不用在意api version 具体区别我想应该去查阅帮助文档

@lil-i321
Copy link

yes,谢谢了,在Azure 部署模型中 没有找到变更api version 的入口。

@john-crouch
Copy link

john-crouch commented Dec 21, 2023

You can get all the necessary info in one fell swoop by:

  1. Navigate to the Azure OpenAI portal
  2. Select "Completions"
  3. Click "View Code"
  4. Copy the endpoint URL (this contains all required infos):

https://{Open AI Instance name}.openai.azure.com/openai/deployments/{deployment name}/completions?api-version={api version}

  1. Copy the API key as well.

image
image
image

@thinkthinking
Copy link

Take the example I have in the video demo image

This is your instance name: under Azure OpenAI resource see this below image

This is your deployment name: under Azure AI Studio see this below image

Let me know if this helps!

it works, thank you
@logancyang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants