logancyang/obsidian-copilot

Azure setting issue

likemuuxi opened this issue · 21 comments

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

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 can you show me your Azure pages just like the ones I posted?

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

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.

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

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.

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?

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

image
Can be changed to this parameter input format.

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.

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

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

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

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 有什么区别吗?

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

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

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

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

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