Instructions to use Wellz1000/hermes-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- HERMES
How to use Wellz1000/hermes-2 with HERMES:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download web/src/lib/session-refresh.ts from Wellz1000/hermes-2: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/Wellz1000/hermes-2/resolve/main/web/src/lib/session-refresh.ts
- Command line
-
hf download hf://Wellz1000/hermes-2/web/src/lib/session-refresh.ts
-
curl -L -o session-refresh.ts https://huggingface.co/Wellz1000/hermes-2/resolve/main/web/src/lib/session-refresh.ts
1.03 kB
| /** | |
| * Decide whether the paginated sessions list should be silently | |
| * re-fetched after an overview poll. | |
| * | |
| * The dashboard's FastAPI server and a terminal CLI are separate | |
| * processes that share the same SQLite session DB. There is no | |
| * inter-process push channel, so the Sessions page polls the 50 newest | |
| * sessions every few seconds (the "overview" poll). When that poll | |
| * surfaces a session id at the head of the list that we have not seen | |
| * before, a new session was created in another process and the | |
| * paginated list is stale — refresh it. | |
| * | |
| * Returns false on the very first poll (no baseline yet) and when | |
| * either id is null (empty DB / transient empty response), so we never | |
| * trigger a spurious reload on mount or while the DB is empty. | |
| */ | |
| export function shouldRefreshSessions( | |
| prevNewestId: string | null, | |
| currentNewestId: string | null, | |
| ): boolean { | |
| return ( | |
| prevNewestId !== null && | |
| currentNewestId !== null && | |
| prevNewestId !== currentNewestId | |
| ); | |
| } | |