microsoft / OpenAIWorkshop

workshop materials to build intelligent solutions on Open AI
MIT License
476 stars 277 forks source link

where exactly should we load secret.env file? Haizz, my memory is having some trouble, can you repeat what you just said? #137

Open amitlals opened 1 year ago

amitlals commented 1 year ago

Question, where exactly should we load secret.env file?

agent name Lucy starting agent name Jenny agent name Paul starting agent name Jenny agent name Jenny starting agent name Jenny agent name Lucy starting agent name Jenny agent name Paul starting agent name Jenny agent name Jenny starting agent name Jenny Exception as below, will retry The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. Exception as below, will retry The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. Exception as below, will retry The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.

Every response says same Haizz, my memory is having some trouble, can you repeat what you just said?

image

rcy0228 commented 1 year ago

Hi @james-tn do you have any update on this issue? The same obstacle is preventing us as well.

james-tn commented 1 year ago

@rcy0228 @amitlals the secrets.env should be directly under copilot directory. It should have following values if all features are to be used.

AZURE_OPENAI_ENDPOINT="" AZURE_OPENAI_API_KEY="" USE_AZCS="False" AZURE_SEARCH_SERVICE_ENDPOINT="" AZURE_SEARCH_INDEX_NAME="payroll_hr" CACHE_INDEX_NAME="payroll_hr_cache" AZURE_SEARCH_ADMIN_KEY="" AZURE_OPENAI_API_VERSION="2023-07-01-preview" USE_SEMANTIC_CACHE="False" SEMANTIC_HIT_THRESHOLD=0.9

rcy0228 commented 1 year ago

Hi @james-tn cloud please let me know which files we are using for payroll_hr and payroll_hr_cache.

AZURE_SEARCH_INDEX_NAME="payroll_hr" CACHE_INDEX_NAME="payroll_hr_cache"

Should these indexes be created in the search service?

sumitmalik51 commented 1 year ago

Hi @james-tn , does this code deploy the model automatically or we should deploy it manually?

sumitmalik51 commented 1 year ago

I was able to fix the issue after updating the deployment_id value with the actual OpenAI deployment name instead of self.engine but the agent is only able to reply for employee name and id not for further questions, getting the below error

using faiss Exception as below, will retry RetryError[<Future at 0x2708ca62150 state=finished raised InvalidRequestError>]

tried both using azcs and faiss, any idea on the same?

edit:

seems like the issue is with only search_knowldge function using faiss and azcs, I was able to run the queries and got the expected output. thanks

james-tn commented 1 year ago

If you want to use Azure Cognitive Search, you need to setup index and import docVectors.json to AZURE_SEARCH_INDEX_NAME="payroll_hr". If not, just set USE_AZCS="False". There's a feature to use Semantic caching (with ACS) to retrieve same meaning previously asked questions from ACS instead of hitting GPT-4. To use that, need to setup an empty index named payroll_hr_cache and set the variable CACHE_INDEX_NAME="payroll_hr_cache" , then set USE_SEMANTIC_CACHE="True" and SEMANTIC_HIT_THRESHOLD=0.9