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

Assistants page #559

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Assistants page #559

wants to merge 8 commits into from

Conversation

drnic
Copy link
Contributor

@drnic drnic commented Nov 20, 2024

Feature flag ASSISTANTS_PAGE_FEATURE=true introduces a simple page showing the available Assistants.

When this feature is enabled, the root_path and assistants_path show this page (instead of redirecting to a new conversation with a default assistant):

Screenshot 2024-11-20 at 4 08 10 pm

This PR also includes a default description for each default Assistant.

@krschacht
Copy link
Contributor

I'm curious, what's your motivation for this change? You don't like that going to the root url takes you straight to an assistant?

I'm not opposed to the change. Other people might prefer this mode. But personally, if I have a quick question and I pull up my app, I don't like the extra click before I can start typing the question. So seeing this change just made me wonder if there was an issue you were trying to solve because it might spark new thinking for me.

@drnic
Copy link
Contributor Author

drnic commented Nov 21, 2024

I was exploring what might be possible if each assistant (or "agent" as it might be known elsewhere) had some room to breath on the page; and perhaps go further to exposing the idea that these assistants aren't just "gpt-4o" or "claude-3.5" but pre-configured system prompts (plus more perhaps one day).

The idea for the page came from seeing the magicschool.ai home page (which calls them Tools).

The PR is disabled by default; requiring the feature flag/env var.

It's ok if you don't want to merge it. It was an idea I was working on and figured I could share it publicly as a PR.

@buithehien1991
Copy link

I saw a bug when click on converstation item sidebar
image

@krschacht
Copy link
Contributor

I was exploring what might be possible if each assistant (or "agent" as it might be known elsewhere) had some room to breath on the page; and perhaps go further to exposing the idea that these assistants aren't just "gpt-4o" or "claude-3.5" but pre-configured system prompts (plus more perhaps one day).

The idea for the page came from seeing the magicschool.ai home page (which calls them Tools).

The PR is disabled by default; requiring the feature flag/env var.

It's ok if you don't want to merge it. It was an idea I was working on and figured I could share it publicly as a PR.

Oh, that’s intriguing. The other cool thing about a page like this is when Teams are an entity in the system, this could also be where you see that it’s a private assistant or a team assistant. For example, maybe you’re part of a team which has created a Tech Support assistant which has a custom system prompt and has specific knowledge of how your company’s internal systems are configured and how to access those systems. This page would show a description of all that, make it clear that it’s a Team Assistant, and it also makes it clear that any conversations you have with this assistant are visible to the owner of that assistant. It’s like “this conversation is being recorded for quality assurance purposes” :)

I like this. Let’s merge it in and leave it behind a feature flag, just like you did, while we continue to develop this concept. But three things:

  • take a look at that CSS question that I flagged
  • buithehien might have discovered a bug
  • also, wouldn’t it be better to keep _assistant reserved for the sidebar partial. That maintains consistency with _conversation, makes the diff of this PR smaller, and then your new partial could be something like _assistant_tile

Copy link
Contributor

@krschacht krschacht left a comment

Choose a reason for hiding this comment

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

Oops, I just realized I didn't submit the comment I had written:

<section
id="assistants"
data-controller="radio-behavior transition"
data-radio-behavior-selected-class="relationship !flex"
data-transition-toggle-class="hidden"
class="pt-14 flex flex-col"
class="flex flex-col"
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed you removed this pt-14 and you within the _assistant_sidebar partial, you removed the first hack:

<%= first && 'absolute pt-[17px] left-0 pl-3 w-full z-10 top-0' %>

I remember this being some tricky css to get the sidebar to make the first assistant sticky as the other items scrolled underneath it. Were you able to solve it a different way?

Copy link
Contributor Author

@drnic drnic Nov 24, 2024

Choose a reason for hiding this comment

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

Sorry, I think this idea was getting in my way (since I wanted an "Assistants" header as the first thing) so I dropped it and assumed I'd come back to it later. I'll investigate this.

@mattlindsey
Copy link
Contributor

I like this. Let’s merge it in and leave it behind a feature flag, just like you did, while we continue to develop this concept. But three things:

  • How about also instead of the feature flag, do this like 'My GPTs' on ChatGPT and put a menu item My Assistants next to Settings and Logout? To match the experience in ChatGPT. Or do that later?

@drnic
Copy link
Contributor Author

drnic commented Nov 26, 2024

@buithehien1991 I am unsure how to reproduce your bug sorry. To confirm, this bug only appeared when you switched to this PR's branch? When you switched back to main the bug went away?

@drnic
Copy link
Contributor Author

drnic commented Nov 26, 2024

@krschacht I've rejiggered the sidebar so:

  1. The main column scrolls independently of the sidebar, like https://tailwindcss.com/docs/installation
  2. By default, the first assistant is sticky to the top, until you scroll pass all the assistants and then it too will disappear since you're now scrolling deep into old conversation history.
  3. If new Assistants ASSISTANTS_PAGE_FEATURE feature is enabled, then the "Assistants" header is sticky as above; rather than any particular assistant.

I've also reverted the partial names.

@mattlindsey
Copy link
Contributor

mattlindsey commented Nov 28, 2024

@buithehien1991 I am unsure how to reproduce your bug sorry. To confirm, this bug only appeared when you switched to this PR's branch? When you switched back to main the bug went away?

I also get that Content missing bug when switching to your branch, but it goes away when I switch back to main. It's odd since I'm pretty sure I wasn't getting the bug when I tried your branch earlier. Let me know if you want me to try anything.

P.S. It's strange because if I start the server and initiate a new conversion and ask 1 message before clicking on any of the old conversations, everything works fine.

@krschacht krschacht marked this pull request as draft December 20, 2024 03:04
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