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

feat: Support Sidebar - Max #27091

Merged
merged 70 commits into from
Jan 27, 2025
Merged

feat: Support Sidebar - Max #27091

merged 70 commits into from
Jan 27, 2025

Conversation

slshults
Copy link
Contributor

@slshults slshults commented Dec 20, 2024

Problem

Support AI Chat for the support sidebar. Help users help themselves, reduce support ticket volume.

CleanShot 2024-12-19 at 18 27 46@2x
CleanShot 2024-12-19 at 18 28 13@2x

CleanShot 2024-12-19 at 18 31 12@2x
CleanShot 2024-12-19 at 18 31 32@2x

Does this work well for both Cloud and self-hosted?

Cloud only

How did you test this code?

Lots of chatting with Max, in two browsers concurrently.

Feature flag in place for a bit more internal testing before we give access to a small set of customers initially.

Edit: Once this review is done, I'll be submitting another PR for this more recent commit

slshults and others added 30 commits December 10, 2024 19:07
…so added 1 line to URL validation in the system prompt.
flashy/blinky behavior seen while typing
after Max had included a codeblock in a response.
a collapsible, "Explore the docs", because
less scrolling is more betterer.
… this commit. Will be pairing with others to revive him.
…n be run on the local with this commit, but can't run Max yet, need to know how to handle secrets correctly.
…ation management, improved token and cache tracking.
…o anthropic API doesn't work in this commit, pushing it to pair with Michael on it.
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (wasn't pushed!)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@slshults
Copy link
Contributor Author

Thanks @skoob13 ! Changes made (checks are still running, but I'll revisit if any fail.)

@slshults slshults requested a review from skoob13 January 21, 2025 23:33
Copy link
Contributor

@skoob13 skoob13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there. Three things:

  • requirements.in/txt got lost. We don't have beautifulsoup and Anthropic SDK installed.
  • You need to run Ruff locally to pass the CI and commit the format changes: ruff check --fix.
  • Some tests seem to be broken, but it might just be a flaky CI.

and low-priority nits if you have time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filename should be snake case. You can use prompt.py because it's already meaningful.

- text blocks for normal conversation
- tool_use blocks for search queries
- tool_result blocks for search results
2. ALWAYSUse XML tags within text blocks for UI display:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should a space be after ALWAYS?

ee/urls.py Outdated
from ee.api import integration
from ee.support_sidebar_max.views import MaxChatViewSet
from .api.rbac import organization_resource_access, role
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some endpoints were removed, so that's why CI fails.

@slshults
Copy link
Contributor Author

slshults commented Jan 24, 2025

Thanks much @skoob13 , each of those is addressed in the latest commits. Regarding the two checks that did not pass:

The python code quality formatting error looks unrelated to my commits (posthog/temporal/tests/batch_exports/test_bigquery_batch_export_workflow.py), and ruff checks pass on my local:

(env) slshults@sls-ubuntu-vm:~/dev/posthog$ ruff check --fix
All checks passed!

The Django tests – Core (persons-on-events off) fail looks unrelated as well (ee/api/test/test_conversation.py, OpenAI-related perhaps?), but let me know.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@slshults slshults requested a review from skoob13 January 24, 2025 17:14
Copy link
Contributor

@skoob13 skoob13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go. Great job!

@slshults slshults merged commit 3a603d3 into master Jan 27, 2025
99 checks passed
@slshults slshults deleted the support-sidebar-max-integration branch January 27, 2025 07:52
timgl pushed a commit that referenced this pull request Jan 28, 2025
Co-authored-by: Michael Matloka <[email protected]>
Co-authored-by: Georgiy Tarasov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants