diff --git a/doc/user/gitlab_duo_chat.md b/doc/user/gitlab_duo_chat.md index 812388013b67eed8890fa74a4aa404e6b5a3e5d7..343dc86d0a7e85647373b5c60802ab5ca215409a 100644 --- a/doc/user/gitlab_duo_chat.md +++ b/doc/user/gitlab_duo_chat.md @@ -479,3 +479,8 @@ This error occurs when you ask GitLab Duo Chat about resources you don't have ac or about resources that do not exist. Try again, asking about resources you have access to. + +### `I'm sorry, I can't find the answer, but it's my fault, not yours. Please try something different` + +This is a fallback error that occurs when there is a problem with GitLab Duo Chat. +Please try your request again, or leave feedback to help us improve. diff --git a/ee/lib/gitlab/llm/chain/answer.rb b/ee/lib/gitlab/llm/chain/answer.rb index ede9068221ddc9ee3bad6ed6ed76ac9d45fef1b3..271da8d549e112f88a05d98daf41cd5c0268254c 100644 --- a/ee/lib/gitlab/llm/chain/answer.rb +++ b/ee/lib/gitlab/llm/chain/answer.rb @@ -64,7 +64,7 @@ def self.default_final_answer(context:) end def self.default_final_message - s_("AI|I don't see how I can help. Please give better instructions!") + s_("AI|I'm sorry, I can't find the answer, but it's my fault, not yours. Please try something different.") end def self.error_answer(context:, content:) diff --git a/ee/spec/lib/gitlab/llm/chain/answer_spec.rb b/ee/spec/lib/gitlab/llm/chain/answer_spec.rb index 6d0e31756c767dc138390d27bab8cd23f1d17d20..f4929ac5bd034c8a6107ec558779fae98db2b55d 100644 --- a/ee/spec/lib/gitlab/llm/chain/answer_spec.rb +++ b/ee/spec/lib/gitlab/llm/chain/answer_spec.rb @@ -140,9 +140,13 @@ describe '.default_final_answer' do subject(:answer) { described_class.default_final_answer(context: context) } + let(:expected_response) do + "I'm sorry, I can't find the answer, but it's my fault, not yours. Please try something different." + end + it 'returns final answer with the default response' do expect(answer.is_final?).to eq(true) - expect(answer.content).to eq("I don't see how I can help. Please give better instructions!") + expect(answer.content).to eq(expected_response) expect(answer.tool).to be_nil expect(answer.status).to eq(:ok) end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 1c4734ad8584b1202284d9a8ce35959c807b21f7..4dfad1dc470666a58730f75a2876975002eabc2f 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -2158,7 +2158,7 @@ msgstr "" msgid "AI|How was the AI content?" msgstr "" -msgid "AI|I don't see how I can help. Please give better instructions!" +msgid "AI|I'm sorry, I can't find the answer, but it's my fault, not yours. Please try something different." msgstr "" msgid "AI|Populate issue description"