Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error : An error occurred. Answers can't be saved at this time. If the problem persists, please contact the site administrator. #1261

Open
OlegDStassenko opened this issue Feb 7, 2025 · 9 comments
Labels
bug Something isn't working

Comments

@OlegDStassenko
Copy link

OlegDStassenko commented Feb 7, 2025

Describe the bug

Can't save history :
Error : An error occurred. Answers can't be saved at this time. If the problem persists, please contact the site administrator.

To Reproduce
Active PromptFlow
Active Chat History
Send long message

Screenshots
Image

Configuration: Please provide the following

  • Use PromptFlow Endpoint
  • Chat history enabled
@OlegDStassenko OlegDStassenko added the bug Something isn't working label Feb 7, 2025
@aasedek
Copy link

aasedek commented Feb 8, 2025

This problem usually related to Azure OpenAI API parameters in your .env file, if you share your error trace, I think it will be easier to figure it out.

@mkucukaytekin
Copy link

I got the same problem. Started to happen yesterday all of the sudden.

@OlegDStassenko
Copy link
Author

This problem usually related to Azure OpenAI API parameters in your .env file, if you share your error trace, I think it will be easier to figure it out.

Hi !
Thank you for your fast answer.
I don't see any errors in the logs, but here is my environment variables configuration in the Azure portal

[ { "name": "AUTH_CLIENT_SECRET", "value": "", "slotSetting": false }, { "name": "AZURE_COSMOSDB_ACCOUNT", "value": "db-xxxx", "slotSetting": false }, { "name": "AZURE_COSMOSDB_ACCOUNT_KEY", "value": "xxxx==", "slotSetting": false }, { "name": "AZURE_COSMOSDB_CONVERSATIONS_CONTAINER", "value": "conversations", "slotSetting": false }, { "name": "AZURE_COSMOSDB_DATABASE", "value": "db_conversation_history", "slotSetting": false }, { "name": "AZURE_COSMOSDB_ENABLE_FEEDBACK", "value": "true", "slotSetting": false }, { "name": "AZURE_COSMOSDB_MONGO_VCORE_CONNECTION_STRING", "value": "", "slotSetting": false }, { "name": "AZURE_COSMOSDB_MONGO_VCORE_CONTAINER", "value": "", "slotSetting": false }, { "name": "AZURE_COSMOSDB_MONGO_VCORE_CONTENT_COLUMNS", "value": "", "slotSetting": false }, { "name": "AZURE_COSMOSDB_MONGO_VCORE_DATABASE", "value": "", "slotSetting": false }, { "name": "AZURE_COSMOSDB_MONGO_VCORE_FILENAME_COLUMN", "value": "", "slotSetting": false }, { "name": "AZURE_COSMOSDB_MONGO_VCORE_INDEX", "value": "", "slotSetting": false }, { "name": "AZURE_COSMOSDB_MONGO_VCORE_TITLE_COLUMN", "value": "", "slotSetting": false }, { "name": "AZURE_COSMOSDB_MONGO_VCORE_URL_COLUMN", "value": "", "slotSetting": false }, { "name": "AZURE_COSMOSDB_MONGO_VCORE_VECTOR_COLUMNS", "value": "", "slotSetting": false }, { "name": "AZURE_OPENAI_EMBEDDING_ENDPOINT", "value": "", "slotSetting": false }, { "name": "AZURE_OPENAI_EMBEDDING_KEY", "value": "", "slotSetting": false }, { "name": "AZURE_OPENAI_EMBEDDING_NAME", "value": "", "slotSetting": false }, { "name": "AZURE_OPENAI_ENDPOINT", "value": "https://ai-services-xxx.openai.azure.com/", "slotSetting": false }, { "name": "AZURE_OPENAI_KEY", "value": "xxx", "slotSetting": false }, { "name": "AZURE_OPENAI_MAX_TOKENS", "value": "800", "slotSetting": false }, { "name": "AZURE_OPENAI_MODEL", "value": "gpt-4o-mini", "slotSetting": false }, { "name": "AZURE_OPENAI_MODEL_NAME", "value": "gpt-4o-mini", "slotSetting": false }, { "name": "AZURE_OPENAI_RESOURCE", "value": "ai-services-xxx", "slotSetting": false }, { "name": "AZURE_OPENAI_STOP_SEQUENCE", "value": "", "slotSetting": false }, { "name": "AZURE_OPENAI_STREAM", "value": "false", "slotSetting": false }, { "name": "AZURE_OPENAI_SYSTEM_MESSAGE", "value": "", "slotSetting": false }, { "name": "AZURE_OPENAI_TEMPERATURE", "value": "0.7", "slotSetting": false }, { "name": "AZURE_OPENAI_TOP_P", "value": "0.95", "slotSetting": false }, { "name": "AZURE_SEARCH_CONTENT_COLUMNS", "value": "", "slotSetting": false }, { "name": "AZURE_SEARCH_ENABLE_IN_DOMAIN", "value": "false", "slotSetting": false }, { "name": "AZURE_SEARCH_FILENAME_COLUMN", "value": "", "slotSetting": false }, { "name": "AZURE_SEARCH_INDEX", "value": "", "slotSetting": false }, { "name": "AZURE_SEARCH_KEY", "value": "", "slotSetting": false }, { "name": "AZURE_SEARCH_PERMITTED_GROUPS_COLUMN", "value": "", "slotSetting": false }, { "name": "AZURE_SEARCH_QUERY_TYPE", "value": "", "slotSetting": false }, { "name": "AZURE_SEARCH_SEMANTIC_SEARCH_CONFIG", "value": "", "slotSetting": false }, { "name": "AZURE_SEARCH_SERVICE", "value": "", "slotSetting": false }, { "name": "AZURE_SEARCH_STRICTNESS", "value": "3", "slotSetting": false }, { "name": "AZURE_SEARCH_TITLE_COLUMN", "value": "", "slotSetting": false }, { "name": "AZURE_SEARCH_TOP_K", "value": "5", "slotSetting": false }, { "name": "AZURE_SEARCH_URL_COLUMN", "value": "", "slotSetting": false }, { "name": "AZURE_SEARCH_USE_SEMANTIC_SEARCH", "value": "false", "slotSetting": false }, { "name": "AZURE_SEARCH_VECTOR_COLUMNS", "value": "", "slotSetting": false }, { "name": "DATASOURCE_TYPE", "value": "AzureCognitiveSearch", "slotSetting": false }, { "name": "DiagnosticServices_EXTENSION_VERSION", "value": "~3", "slotSetting": true }, { "name": "ELASTICSEARCH_CONTENT_COLUMNS", "value": "", "slotSetting": false }, { "name": "ELASTICSEARCH_EMBEDDING_MODEL_ID", "value": "", "slotSetting": false }, { "name": "ELASTICSEARCH_ENABLE_IN_DOMAIN", "value": "false", "slotSetting": false }, { "name": "ELASTICSEARCH_ENCODED_API_KEY", "value": "", "slotSetting": false }, { "name": "ELASTICSEARCH_ENDPOINT", "value": "", "slotSetting": false }, { "name": "ELASTICSEARCH_FILENAME_COLUMN", "value": "", "slotSetting": false }, { "name": "ELASTICSEARCH_INDEX", "value": "", "slotSetting": false }, { "name": "ELASTICSEARCH_QUERY_TYPE", "value": "", "slotSetting": false }, { "name": "ELASTICSEARCH_STRICTNESS", "value": "3", "slotSetting": false }, { "name": "ELASTICSEARCH_TITLE_COLUMN", "value": "", "slotSetting": false }, { "name": "ELASTICSEARCH_TOP_K", "value": "5", "slotSetting": false }, { "name": "ELASTICSEARCH_URL_COLUMN", "value": "", "slotSetting": false }, { "name": "ELASTICSEARCH_VECTOR_COLUMNS", "value": "", "slotSetting": false }, { "name": "InstrumentationEngine_EXTENSION_VERSION", "value": "disabled", "slotSetting": true }, { "name": "MONGODB_APP_NAME", "value": "", "slotSetting": false }, { "name": "MONGODB_COLLECTION_NAME", "value": "", "slotSetting": false }, { "name": "MONGODB_CONTENT_COLUMNS", "value": "", "slotSetting": false }, { "name": "MONGODB_DATABASE_NAME", "value": "", "slotSetting": false }, { "name": "MONGODB_ENABLE_IN_DOMAIN", "value": "false", "slotSetting": false }, { "name": "MONGODB_ENDPOINT", "value": "", "slotSetting": false }, { "name": "MONGODB_FILENAME_COLUMN", "value": "", "slotSetting": false }, { "name": "MONGODB_INDEX_NAME", "value": "", "slotSetting": false }, { "name": "MONGODB_PASSWORD", "value": "", "slotSetting": false }, { "name": "MONGODB_STRICTNESS", "value": "3", "slotSetting": false }, { "name": "MONGODB_TITLE_COLUMN", "value": "", "slotSetting": false }, { "name": "MONGODB_TOP_K", "value": "5", "slotSetting": false }, { "name": "MONGODB_URL_COLUMN", "value": "", "slotSetting": false }, { "name": "MONGODB_USERNAME", "value": "", "slotSetting": false }, { "name": "MONGODB_VECTOR_COLUMNS", "value": "", "slotSetting": false }, { "name": "PROMPTFLOW_API_KEY", "value": "xxx", "slotSetting": false }, { "name": "PROMPTFLOW_CITATIONS_FIELD_NAME", "value": "documents", "slotSetting": false }, { "name": "PROMPTFLOW_ENDPOINT", "value": "https://endpoint-xxxx.francecentral.inference.ml.azure.com/score", "slotSetting": false }, { "name": "PROMPTFLOW_REQUEST_FIELD_NAME", "value": "query", "slotSetting": false }, { "name": "PROMPTFLOW_RESPONSE_FIELD_NAME", "value": "reply", "slotSetting": false }, { "name": "PROMPTFLOW_RESPONSE_TIMEOUT", "value": "120", "slotSetting": false }, { "name": "SANITIZE_ANSWER", "value": "False", "slotSetting": false }, { "name": "SCM_DO_BUILD_DURING_DEPLOYMENT", "value": "true", "slotSetting": false }, { "name": "SnapshotDebugger_EXTENSION_VERSION", "value": "disabled", "slotSetting": true }, { "name": "UI_CHAT_DESCRIPTION", "value": "Besoin d'informations sur une procédure, un ticket, ou un contact dans Salesforce ... ?", "slotSetting": false }, { "name": "UI_CHAT_TITLE", "value": "Comment puis-je vous aider ?", "slotSetting": false }, { "name": "UI_LOGO", "value": "https://xxx.png", "slotSetting": false }, { "name": "UI_SHOW_CHAT_HISTORY_BUTTON", "value": "True", "slotSetting": false }, { "name": "UI_SHOW_SHARE_BUTTON", "value": "False", "slotSetting": false }, { "name": "UI_TITLE", "value": "NowAssistant", "slotSetting": false }, { "name": "USE_PROMPTFLOW", "value": "true", "slotSetting": false }, { "name": "XDT_MicrosoftApplicationInsights_BaseExtensions", "value": "disabled", "slotSetting": true }, { "name": "XDT_MicrosoftApplicationInsights_Mode", "value": "recommended", "slotSetting": true }, { "name": "XDT_MicrosoftApplicationInsights_PreemptSdk", "value": "disabled", "slotSetting": true } ]

@aasedek
Copy link

aasedek commented Feb 8, 2025

Have you checked your cosmos db network configuration?

@OlegDStassenko
Copy link
Author

OlegDStassenko commented Feb 8, 2025

Yes, I performed a cross-test by connecting an old web app (which I updated today with commit 8727b16) to the same database. Mysteriously, I never get any errors, and everything works perfectly.

However, as soon as I switch to the new application, the problem persists randomly.

For example:

I just tried in a new conversation, and it works:
Image

I try the test again in a new conversation a few seconds later:
Image

I checked by refreshing the page, and the response is not saved in the database. As if either the authentication or the response format was preventing the record from being saved.

Image

@mkucukaytekin
Copy link

mkucukaytekin commented Feb 8, 2025

have you recently changed the app service plan in Azure for your application? This was the only change i did and ended up with this problem. I can't see any error logs in the cosmos db side. for some reason db update operation is failing and can not find any logs for that.
Also, i can not reproduce the problem now :(

@OlegDStassenko
Copy link
Author

Ah, interesting. On my side, I just created a new application in a new subscription / ressource groupe with the same B1 plan.

Here is the old application where everything works:

Image

And here is the new one (where it no longer works).

Image

@mkucukaytekin
Copy link

I'm also using France Central region and had switch of App service plan from Premium v3 P0V3 to Premium v3 P2V3. So, almost identical story with yours.

can you set DEBUG: true in env variable of your app and to see the logs what is causing it?

@mkucukaytekin
Copy link

found it:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants