This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:ai:chatbot-helpdesk-sentiment [2025/06/24 21:02] – ddehamer | wiki:ai:chatbot-helpdesk-sentiment [2025/07/02 21:10] (current) – zhein | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== AI Chatbot | + | ====== AI Chatbot |
| ===== Requirements ===== | ===== Requirements ===== | ||
| Line 24: | Line 25: | ||
| Install this from the webpage and follow directions. [[https:// | Install this from the webpage and follow directions. [[https:// | ||
| - | Then these | + | Create a folder in your workspace and save the files at the end of this document. |
| + | |||
| + | Open a terminal, set your folder to the one where the files are saved, then run these commands: | ||
| + | |||
| + | These commands are only needed for Windows users: | ||
| + | <code -> | ||
| + | dotnet nuget add source https:// | ||
| + | npm install -g azure-functions-core-tools@4 --unsafe-perm true | ||
| + | dotnet nuget locals all --clear | ||
| + | dotnet restore | ||
| + | </ | ||
| + | |||
| + | The rest of the instructions are for every OS: | ||
| <code -> | <code -> | ||
| Line 48: | Line 61: | ||
| az functionapp plan create \ | az functionapp plan create \ | ||
| --resource-group don-test-rg \ | --resource-group don-test-rg \ | ||
| - | --name | + | --name |
| --location eastus \ | --location eastus \ | ||
| --sku B1 \ | --sku B1 \ | ||
| Line 60: | Line 73: | ||
| --resource-group don-test-rg \ | --resource-group don-test-rg \ | ||
| --name dehamerfuncapp \ | --name dehamerfuncapp \ | ||
| - | --plan | + | --plan |
| --storage-account dehamerfunctstorage \ | --storage-account dehamerfunctstorage \ | ||
| --runtime dotnet-isolated \ | --runtime dotnet-isolated \ | ||
| Line 79: | Line 92: | ||
| az cognitiveservices account update \ | az cognitiveservices account update \ | ||
| - | --name | + | --name |
| --resource-group don-test-rg \ | --resource-group don-test-rg \ | ||
| --set properties.publicNetworkAccess=Enabled | --set properties.publicNetworkAccess=Enabled | ||
| Line 93: | Line 106: | ||
| export TEXT_ANALYTICS_KEY=`az cognitiveservices account keys list \ | export TEXT_ANALYTICS_KEY=`az cognitiveservices account keys list \ | ||
| - | --name | + | --name |
| --resource-group don-test-rg \ | --resource-group don-test-rg \ | ||
| --query " | --query " | ||
| Line 110: | Line 123: | ||
| export OPENAI_ENDPOINT=https:// | export OPENAI_ENDPOINT=https:// | ||
| + | |||
| + | export OPENAI_DEPLOYMENT=gpt-4.1 | ||
| az functionapp config appsettings set \ | az functionapp config appsettings set \ | ||
| - | --name | + | --name |
| --resource-group don-test-rg \ | --resource-group don-test-rg \ | ||
| --settings \ | --settings \ | ||
| OPENAI_KEY=$OPENAI_KEY \ | OPENAI_KEY=$OPENAI_KEY \ | ||
| OPENAI_ENDPOINT=$OPENAI_ENDPOINT | OPENAI_ENDPOINT=$OPENAI_ENDPOINT | ||
| + | OPENAI_DEPLOYMENT=$OPENAI_DEPLOYMENT | ||
| | | ||
| #Confirm they were set | #Confirm they were set | ||
| Line 186: | Line 202: | ||
| // OpenAI Setup | // OpenAI Setup | ||
| - | var openaiEndpoint = Environment.GetEnvironmentVariable(" | + | var openaiEndpoint = Environment.GetEnvironmentVariable(" |
| - | var openaiKey = Environment.GetEnvironmentVariable(" | + | var openaiKey = Environment.GetEnvironmentVariable(" |
| var deployment = Environment.GetEnvironmentVariable(" | var deployment = Environment.GetEnvironmentVariable(" | ||