This is just an example [0] if you want to use embeddings with ChatGPT using langchainJS [1] and chromadb [2]. There weren't many examples so figured I would share this incase it helps someone out.
You can also switch from chromadb to whatever (hnswlib for example is dead simple and you can save embeddings to disk).
I put a telegram bot as an example. Be "responsible" :P and have fun!
[0] This isn't using the Retriever api because I did this a couple weeks ago and it wasn't there, by the way!
[1] https://github.com/hwchase17/langchainjs/
[2] https://trychroma.com/