Cleanup chat history before sending it to LLM in V2 agent
What does this MR do and why?
Fix for Gracefully handle null content in Duo Chat history (#478619 - closed) it also contains backported deduplication history functionality
Original code: cleanup and deduplication
Note: this is a fix for a bug for a feature that is still behind a feature flag
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Turn on the feature flag
v2_chat_agent_integration
- Open chat and ask it different questions.
- Open new tab and observe chat history
Related to #478619 (closed)
Merge request reports
Activity
changed milestone to %17.4
assigned to @brytannia
requested review from @lesley-r
removed featureaddition label
added pipelinetier-1 label
@lesley-r could you please review this MR? it's a port of the functionality introduced by you. I wasn't able to just copy past your code as in this module messages are
AiMessage
objects and not hash, so I needed to adjust the approach. Let me know what you think!- Resolved by Sean Arnold
1 Warning The master pipeline status page reported failures in - graphql-verify
- feature-flags-usage
- haml-lint
- rspec-all frontend_fixture 6/7
- rspec-all frontend_fixture 2/7
- rspec-all frontend_fixture 1/7
- setup-test-env-fips
- setup-test-env
- rails-production-server-boot-puma-cng
- rails-production-server-boot-puma-example
- webpack-dev-server
- jest-build-cache
- rspec-ee integration pg14 9/9
If these jobs fail in your merge request with the same errors, then they are not caused by your changes.
Please check for any on-going incidents in the incident issue tracker or in the#master-broken
Slack channel.1 Message CHANGELOG missing: If this merge request needs a changelog entry, add the
Changelog
trailer to the commit message you want to add to the changelog.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Reviewer roulette
Category Reviewer Maintainer backend @bucoleary
(UTC-4, 6 hours behind author)
@vshushlin
(UTC+2, same timezone as author)
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangermentioned in epic gitlab-org#13533 (closed)
@brytannia Looks good to me!
@seanarnold I was wondering if you can do the backend maintainer review. Thank you!
requested review from @seanarnold
removed review request for @seanarnold
added pipeline:mr-approved label
added pipelinetier-2 label and removed pipelinetier-1 label
Before you set this MR to auto-merge
This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.
Before you set this MR to auto-merge, please check the following:
- You are the last maintainer of this merge request
- The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
- This pipeline is recent enough (created in the last 8 hours)
If all the criteria above apply, please set auto-merge for this merge request.
See pipeline tiers and merging a merge request for more details.
requested review from @seanarnold
removed review request for @lesley-r
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 426ed285expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Verify | 44 | 0 | 2 | 0 | 46 | ✅ | | Plan | 74 | 0 | 1 | 0 | 75 | ✅ | | Data Stores | 31 | 0 | 1 | 0 | 32 | ✅ | | Create | 128 | 0 | 16 | 0 | 144 | ✅ | | Package | 20 | 0 | 12 | 0 | 32 | ✅ | | Govern | 72 | 0 | 0 | 0 | 72 | ✅ | | Secure | 4 | 0 | 0 | 0 | 4 | ✅ | | Fulfillment | 2 | 0 | 0 | 0 | 2 | ✅ | | Release | 5 | 0 | 0 | 0 | 5 | ✅ | | Monitor | 8 | 0 | 0 | 0 | 8 | ✅ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | | Manage | 1 | 0 | 1 | 0 | 2 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 391 | 0 | 33 | 0 | 424 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
- Resolved by Sean Arnold
added pipelinetier-3 pipeline:run-e2e-omnibus-once labels and removed pipelinetier-2 label
aborted automatic add to merge train because the source branch was updated. Learn more.
added 2870 commits
-
d0f92c37...cbdc963d - 2868 commits from branch
master
- a2bee8d6 - Cleanup chat history before sending it to LLM
- 426ed285 - Clarify on confusing messages/conversations
-
d0f92c37...cbdc963d - 2868 commits from branch
@tigerwnz I rebased this now can't approve - do you mind approving?
started a merge train
mentioned in commit e1b11e1f
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-staging label and removed workflowproduction label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label