Skip to content
代码片段 群组 项目
未验证 提交 c26ec62f 编辑于 作者: Doug Stull's avatar Doug Stull 提交者: GitLab
浏览文件

Merge branch '450915-remove-flag' into 'master'

Remove ai_prompt_current_page_skip_reader flag

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/149970



Merged-by: default avatarDoug Stull <dstull@gitlab.com>
Approved-by: default avatarDillon Wheeler <dwheeler@gitlab.com>
Approved-by: default avatarDoug Stull <dstull@gitlab.com>
Reviewed-by: default avatarDillon Wheeler <dwheeler@gitlab.com>
Co-authored-by: default avatarMark Chao <mchao@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -16,13 +16,6 @@ def serialize_for_ai(user:, content_limit:) ...@@ -16,13 +16,6 @@ def serialize_for_ai(user:, content_limit:)
end end
def current_page_sentence def current_page_sentence
unless Feature.enabled?(:ai_prompt_current_page_skip_reader)
return <<~SENTENCE
The user is currently on a page that shows an epic which has a description, comments, etc. Which the user might reference for example as "current", "this" or "that".
Here is additional data in <resource></resource> tags about the resource the user is working with:
SENTENCE
end
<<~SENTENCE <<~SENTENCE
The user is currently on a page that displays an epic with a description, comments, etc., which the user might refer to, for example, as 'current', 'this' or 'that'. The data is provided in <resource></resource> tags, and if it is sufficient in answering the question, utilize it instead of using the 'EpicReader' tool. The user is currently on a page that displays an epic with a description, comments, etc., which the user might refer to, for example, as 'current', 'this' or 'that'. The data is provided in <resource></resource> tags, and if it is sufficient in answering the question, utilize it instead of using the 'EpicReader' tool.
SENTENCE SENTENCE
......
...@@ -16,13 +16,6 @@ def serialize_for_ai(user:, content_limit:) ...@@ -16,13 +16,6 @@ def serialize_for_ai(user:, content_limit:)
end end
def current_page_sentence def current_page_sentence
unless Feature.enabled?(:ai_prompt_current_page_skip_reader)
return <<~SENTENCE
The user is currently on a page that shows an issue which has a description, comments, etc. Which the user might reference for example as "current", "this" or "that".
Here is additional data in <resource></resource> tags about the resource the user is working with:
SENTENCE
end
<<~SENTENCE <<~SENTENCE
The user is currently on a page that displays an issue with a description, comments, etc., which the user might refer to, for example, as 'current', 'this' or 'that'. The data is provided in <resource></resource> tags, and if it is sufficient in answering the question, utilize it instead of using the 'IssueReader' tool. The user is currently on a page that displays an issue with a description, comments, etc., which the user might refer to, for example, as 'current', 'this' or 'that'. The data is provided in <resource></resource> tags, and if it is sufficient in answering the question, utilize it instead of using the 'IssueReader' tool.
SENTENCE SENTENCE
......
---
name: ai_prompt_current_page_skip_reader
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/450915
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/147474
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/451084
milestone: '16.10'
group: group::duo chat
type: gitlab_com_derisk
default_enabled: false
...@@ -27,13 +27,5 @@ ...@@ -27,13 +27,5 @@
it 'returns prompt' do it 'returns prompt' do
expect(wrapped_epic.current_page_sentence).to include("utilize it instead of using the 'EpicReader' tool") expect(wrapped_epic.current_page_sentence).to include("utilize it instead of using the 'EpicReader' tool")
end end
context 'when ai_prompt_current_page_skip_reader is off' do
it 'returns older prompt' do
stub_feature_flags(ai_prompt_current_page_skip_reader: false)
expect(wrapped_epic.current_page_sentence).to include('Here is additional data in <resource></resource> tags')
end
end
end end
end end
...@@ -26,13 +26,5 @@ ...@@ -26,13 +26,5 @@
it 'returns prompt' do it 'returns prompt' do
expect(wrapped_issue.current_page_sentence).to include("utilize it instead of using the 'IssueReader' tool") expect(wrapped_issue.current_page_sentence).to include("utilize it instead of using the 'IssueReader' tool")
end end
context 'when ai_prompt_current_page_skip_reader is off' do
it 'returns older prompt' do
stub_feature_flags(ai_prompt_current_page_skip_reader: false)
expect(wrapped_issue.current_page_sentence).to include('Here is additional data in <resource></resource>')
end
end
end end
end end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册