Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexcg1/semantle-docarray
Semantle in DocArray and GPT
https://github.com/alexcg1/semantle-docarray
Last synced: 16 days ago
JSON representation
Semantle in DocArray and GPT
- Host: GitHub
- URL: https://github.com/alexcg1/semantle-docarray
- Owner: alexcg1
- License: apache-2.0
- Created: 2023-04-24T12:34:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-08T13:00:08.000Z (over 1 year ago)
- Last Synced: 2024-10-16T03:41:07.528Z (about 1 month ago)
- Language: Python
- Size: 118 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Semantle-DocArray
This is a simple game that leverages [DocArray v2](https://docs.docarray.org/) and the [OpenAI embeddings API](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings), similar to [Semantle](https://semantle.com/).
![](demo.gif)
## How do I play?
1. `pip install -r requirements.txt`
2. Set your `OPENAPI_API_KEY` environment variable.
3. `python game.py`
4. A target word will be chosen from the top 10,000 words in English.
5. Your task is to guess the target. You'll be given an input field.
6. If you get it wrong, you'll see how close your guess is. Hot is closer, cold is further.
7. When you guess correctly you win the game.## Tips
- 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`.## FAQ
### What similarity metric do you use?
Cosine similarity
## TODO
- [ ] Hints