These are some examples of embeddings using OpenAI models.
Examples are here because I find each to be of some interest, but this is not intended as a tutorial for how to use embeddings.
For instructive examples, see the official OpenAI repository openai-cookbook.
This repository, bedj, is like bed, but this is in Java and less extensive.
The code is in
Main.java
.
It is written to assume your API key is in a file called .api_key
. Do not
commit it to Git! The .gitignore
file excludes it, to help avoid that.