Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@keegangeorge
Copy link
Member

@keegangeorge keegangeorge commented Feb 14, 2024

Instead of making a request to /discourse-ai/prompts.json to fetch the list of available prompts for the AI Helper, we ship the prompts automatically with the CurrentUserSerializer so its available without any delay. Prompts are also cached.

SamSaffron
SamSaffron previously approved these changes Feb 15, 2024
@SamSaffron SamSaffron dismissed their stale review February 15, 2024 00:39

sorry I think we need a test

@SamSaffron
Copy link
Member

we are fiddling with the current user serializer, so we should at least ensure the code is covered and that it is rendered in a spec. I think simplest is to make a get request to current user and then you have it all in JSON format

@keegangeorge keegangeorge merged commit d66915e into main Feb 16, 2024
@keegangeorge keegangeorge deleted the prompts-serialized branch February 16, 2024 18:57
gru2007 added a commit to gru2007/discourse-ai that referenced this pull request Feb 18, 2024
DEV: Make prompts available on `CurrentUserSerializer` (discourse#472)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants