This is a simple game that leverages DocArray v2 and the OpenAI embeddings API, similar to Semantle.
pip install -r requirements.txt
- Set your
OPENAPI_API_KEY
environment variable. python game.py
- A target word will be chosen from the top 10,000 words in English.
- Your task is to guess the target. You'll be given an input field.
- If you get it wrong, you'll see how close your guess is. Hot is closer, cold is further.
- When you guess correctly you win the game.
- To get a hint, type
/hint
and GPT will generate a hint for you. - To get the answer, type
/answer
. - To exit, type
/exit
or/quit
.
Cosine similarity
- Hints