azure openai
时间: 2023-08-30 14:07:49 浏览: 59
Azure OpenAI是微软提供的OpenAI服务,与OpenAI公司提供的API服务是一样的。微软是OpenAI公司的大股东,因此微软提供的OpenAI服务也是建立在Azure OpenAI的基础上的。Azure OpenAI提供了训练和推理等功能,支持chat.openai.com等应用背后的支持也是由Azure提供的。***
相关问题
Azure openai
Azure OpenAI是微软提供的一项服务,它与OpenAI公司提供的API服务是一样的。微软是OpenAI公司的大股东,因此Azure OpenAI背后的支持也是由Azure提供的,包括训练和推理等功能。微软还在Azure OpenAI的基础上开发了其他服务,如Github Copilot等。如果你想了解更多关于Azure OpenAI的信息,可以访问Azure OpenAI官网:https://azure.microsoft.com/zh-cn/products/cognitive-services/openai-service/。\[2\]
#### 引用[.reference_title]
- *1* [来 Azure 学习 OpenAI 三 - 用 Python 调用 Azure OpenAi API](https://blog.csdn.net/chenjambo/article/details/130185519)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [Azure OpenAI 详细申请与使用教程,打造个人专属 ChatGPT 方案](https://blog.csdn.net/qq_39164154/article/details/130913879)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
Azure openai C#
在使用Azure OpenAI的C#语言中,你需要先申请Azure和Azure OpenAI,并获取相应的密钥和终结点。然后,你可以使用OpenAI的SDK来初始化并调用补全模型。以下是一个示例代码:
```csharp
using OpenAI;
OpenAI.Configuration.ApiKey = "REPLACE_WITH_YOUR_API_KEY_HERE"; // Azure的密钥
OpenAI.Configuration.ApiBase = "REPLACE_WITH_YOUR_ENDPOINT_HERE"; // Azure的终结点
OpenAI.Configuration.ApiType = "azure";
OpenAI.Configuration.ApiVersion = "2023-03-15-preview"; // API版本,未来可能会变
string model = ""; // 模型的部署名
// 调用补全模型
CompletionResponse completion = OpenAI.Completion.Create(
engine: model,
prompt: "你的输入文本",
maxTokens: 10
);
Console.WriteLine(completion.Choices\[0\].Text);
```
请注意,你需要将`REPLACE_WITH_YOUR_API_KEY_HERE`和`REPLACE_WITH_YOUR_ENDPOINT_HERE`替换为你自己的Azure密钥和终结点。另外,你还需要根据你的需求设置模型的部署名和输入文本。
#### 引用[.reference_title]
- *1* *2* [来 Azure 学习 OpenAI 三 - 用 Python 调用 Azure OpenAi API](https://blog.csdn.net/chenjambo/article/details/130185519)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [来 Azure 学习 OpenAI 四 - 用 Embedding 赋能 GPT](https://blog.csdn.net/chenjambo/article/details/130776554)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)