Skip to content

AI 聊天服务 AzureOpenAI 範例問題 #2455

Answered by ArgoZhang
james-chao asked this question in Q&A
Discussion options

You must be logged in to vote

@james-chao 这个组件比较特殊,是需要开通 Azure OpenAI 服务的,需要配置如下:

appsettings.json

"AzureOpenAIOption": {
  "Endpoint": "<Endpoint>",
  "Key": "<Key>",
  "DeploymentName": "<DeploymentName>"
}

需要在配置文件中配置这三个配置项,其值为 azure 服务提供,然后就是在代码中获得注入服务进行交互即可

https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Pages/Chats.razor.cs#L17C16-L17C16

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ArgoZhang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants