Template system for chat gpt ASP.NET Core
Hi all, I'm creating application when user can create template where he can prompt chat gpt, each template has tags for example I can have two tags $username (every user can have same tag with different value) and $question. So template looks like this:
User: username: {{ $username }} question: {{ $question }} Assistant:when I render this prompt it will look something like this:
User: username: TJacken question: Who is American president? Assistant:"username" tag value is something what I need to preserve, "question" is something what will change for each request. I need advice is this table setup correct? Should I create third table with many-to-many relationship where I would hold template_id, tag_id and tag_value? Or there is better approach to this problem? Need to create tables with EF Core this is not problem, I just need to know I'm on the good track 🙂
7 Replies
I wanted to inform you that I am taking the necessary steps to reclaim my username "MODiX," including any legal actions required with Discord. I wanted to provide this information in advance.
I am committed to following all legal procedures and regulations throughout this process. It is possible that I may need to pursue legal routes or engage in formal procedures to regain my desired username.
Thank you for your understanding and cooperation. I will keep you updated on the process. Feel free to reach out if you have any questions.
ignore that bot message 😄
the bot uses $ for tags, and
$username
is some tag which got prompted. use $code for code blocks or just `text` for inline code which the bot ignoresTo post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/Ah, good to know for next time.
Or maybe this is better approach?
i dont see if that adds any value, compared to your initial design
i dont see anything wrong with the initial picture you posted, except that tag has a
template_id
. tags should be reusable across templates
this adds an unnecessary indirection when value could be in template_tag just fineYou are right added template_id in tag accidentally.