hiyaryan / the-cdj

The Cognitive Distortion Journal (CDJ) is a smart journaling tool that helps remedy distorted thinking. It can feel impossible to follow the CBT technique of labeling distorted thinking and finding alternative modes of thought (i.e. reframing) while cognitive distortions are occurring. The CDJ does that work for you. -- The CDJ is in beta testing!!
https://thecdj.app
3 stars 0 forks source link

Send tags to 1106 on new analysis to cross reference new entries with old ones. #95

Open hiyaryan opened 7 months ago

hiyaryan commented 7 months ago

Tags from previous journal entries can be sent with each new entry post to gpt 1106. gpt 1106 can then take the entry, and cross it with the tags. If any of the tags match the tags of the new entry analysis that gpt 1106 will construct, gpt 1106 can make an api call and retrieve any entry that contains those tags. When gpt 1106 makes an analysis for the new entry, it can mention in its analysis that this post is related to an older entry. This indicates that the user may be struggling with similar cognitive distortions. This can be useful in signaling to the user that this may be a core problem for them to address. For example, if gpt 1106 notices that a user is consistently struggling with generalizations, it can bring it to the users attention which could be a very enlightening experience, and one that could greatly benefit any real on going therapy sessions. The user will be able to bring to therapy some clarity on a specific problem that could help the therapist create a more effective recovery plan for the patient.

hiyaryan commented 7 months ago

As a general thought regarding when making api calls with 1106, consider how it will be making those. Will these be along the same protected routes users make api calls on? If so, 1106 will need a way to authenticate itself. Also it doesn't make sense to do it this way, because those routes are only for authorized users to access their entries. That means that there should be special endpoints that only the LLM has access to. These routes must be made extremely secure, access to these routes are strictly restricted to the llm and admin. This is simply a concept for now, and will likely be improved as soon as development begins on this issue. The solution may not even require making restful api calls.