chatgpt-journal
chatgpt-journal copied to clipboard
Add pictures to journal entries
As a user I want to be able to add pictures to my entries so I can create better memories.
Implementation details:
- it would be cool if the pictures would be included in the embeddings of the entry
Now that GATs have been stabilized, on nightly we can redesign the Graph
methods to use associated types with impl Trait
to about boxing.
However, right now I'm experiencing this issue when using impl Borrow<Self::Vertex>
as vertex arguments to functions.
This might not be a hard blocker, as the workaround is to either take the vertices as owned argument or references. However, impl Borrow<Self::Vertex>
is preferable for usability.
We have a problem with using GATs + impl Trait
:
We have optional methods that also use the GATs to define their return iterator type.
However, when not implementing these functions manually, we have to give the iterator GAT a type. If we try to give it impl ...
type, without using it anywhere, we get the error: unconstrained opaque type ... must be used in combination with a concrete type within the same impl
.
It therefore seems impossible to use optional methods with GATs + impl
type. Even if we use associate type defaults, where we set the default to impl ..
we get an error 'impl Trait' only allowed in function and inherent method return types, not in type
.
So, at best we need associate type default, but it will only work if it allows impl
in the default.
The newest version of Rust now allows impl trait
in trait return position. This means we are no longer dependent on TAI or GATs as stated above. This issue is therefore solved. See 05acd06b69771db875e183cc1916e4348b245389.