User Tools

Site Tools


wiki:ai:chatbot-helpdesk-sentiment

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:ai:chatbot-helpdesk-sentiment [2025/06/24 21:00] ddehamerwiki:ai:chatbot-helpdesk-sentiment [2025/07/02 21:10] (current) zhein
Line 1: Line 1:
-====== AI Chatbot wit Sentiment and In Kind Responses ======+====== AI Chatbot with Sentiment and In Kind Responses ====== 
  
 ===== Requirements ===== ===== Requirements =====
Line 24: Line 25:
 Install this from the webpage and follow directions. [[https://dotnet.microsoft.com/en-us/download/dotnet/8.0|dotnet 8.x]] Install this from the webpage and follow directions. [[https://dotnet.microsoft.com/en-us/download/dotnet/8.0|dotnet 8.x]]
  
-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://api.nuget.org/v3/index.json -n nuget.org 
 +npm install -g azure-functions-core-tools@4 --unsafe-perm true 
 +dotnet nuget locals all --clear 
 +dotnet restore 
 +</code> 
 + 
 +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 donfuncplan \+  --name dehamerfuncplan \
   --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 donfuncplan \+  --plan dehamerfuncplan \
   --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 donsentimentai \+  --name dehamersentimentai \
   --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 dehamersentimentai \+  --name dehamersentamentai \
   --resource-group don-test-rg \   --resource-group don-test-rg \
   --query "key1" -o tsv`   --query "key1" -o tsv`
Line 110: Line 123:
  
 export OPENAI_ENDPOINT=https://don-openai-useast.openai.azure.com/ export OPENAI_ENDPOINT=https://don-openai-useast.openai.azure.com/
 +
 +export OPENAI_DEPLOYMENT=gpt-4.1
  
 az functionapp config appsettings set \ az functionapp config appsettings set \
-  --name donfuncapp \+  --name dehamerfuncapp \
   --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("OPENAI_API_ENDPOINT")?.TrimEnd('/'); +        var openaiEndpoint = Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")?.TrimEnd('/'); 
-        var openaiKey = Environment.GetEnvironmentVariable("OPENAI_API_KEY");+        var openaiKey = Environment.GetEnvironmentVariable("OPENAI_KEY");
         var deployment = Environment.GetEnvironmentVariable("OPENAI_DEPLOYMENT");         var deployment = Environment.GetEnvironmentVariable("OPENAI_DEPLOYMENT");
  
Line 553: Line 569:
  
 - Rewrote the function class to eliminate naming conflicts\\ - Set AuthorizationLevel to Anonymous to permit open feedback submission\\ - Used curl to verify responses from the deployed function\\ - Created an HTML frontend to POST feedback to the function endpoint - Rewrote the function class to eliminate naming conflicts\\ - Set AuthorizationLevel to Anonymous to permit open feedback submission\\ - Used curl to verify responses from the deployed function\\ - Created an HTML frontend to POST feedback to the function endpoint
 +
 +==== Architectural Diagram ====
  
 {{:wiki:ai:chatgpt_image_jun_24_2025_05_00_18_pm.png}}\\ \\ {{:wiki:ai:chatgpt_image_jun_24_2025_05_00_18_pm.png}}\\ \\
wiki/ai/chatbot-helpdesk-sentiment.1750798858.txt.gz · Last modified: by ddehamer