-
Notifications
You must be signed in to change notification settings - Fork 41
FEATURE: Allow for persona & llm selection in bot conversations page #1276
Conversation
| :topic_view, | ||
| :is_bot_pm, | ||
| include_condition: -> do | ||
| object.personal_message && object.topic.custom_fields[TOPIC_AI_BOT_PM_FIELD] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about existing PMs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xfalcox Doesn't mess with them.. they have an existing bot post. This would leave room in the future for us to somehow backfill.. but this is really to address the case of
- PM is sent
- Navigate to PM
- There is no response yet.. we don't have any clue it's a bot PM (and the mechanisms to determine can have false-positive like the case with auto-responder)
I didn't remove the conditionals for checking if there is a bot PM, so old PMs still function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we are adding a permanent custom field just to address the temporary case of detection during the first transition? I don't really agree littering the database permanently is a good strategy in this case.
Can't this be handled by a JS state, URL param, or anything else that has a more appropriate lifetime ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, we can --those all feel a bit hacky. I thought it would be actually useful to have a stable way to know what EXACTLY what PMs are bot conversations going forward.
I can do it another way, but I do want to ask one more time -- is there no value in being able to determine what PMs were started from this page?
assets/javascripts/discourse/controllers/discourse-ai-bot-conversations.js
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,181 @@ | |||
| import Component from "@glimmer/component"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are the big changes in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing just copy/pasted into its own component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply abstracting out the "setting" of values -- they're passed in now. instead of this.composer.metaData["personaId"] = id we have this.args.setPersonaId(id)
assets/javascripts/discourse/components/ai-persona-llm-selector.gjs
Outdated
Show resolved
Hide resolved
…r.gjs Co-authored-by: Sérgio Saquetim <[email protected]>
…into smaller chunks
This PR