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.test.ts from Wellz1000/hermes-2: direct link, hf CLI and curl.
- Browser
- Download file 783 Bytes
-
https://huggingface.co/Wellz1000/hermes-2/resolve/main/web/src/lib/session-refresh.test.ts
- Command line
-
hf download hf://Wellz1000/hermes-2/web/src/lib/session-refresh.test.ts
-
curl -L -o session-refresh.test.ts https://huggingface.co/Wellz1000/hermes-2/resolve/main/web/src/lib/session-refresh.test.ts
783 Bytes
| import { describe, it, expect } from "vitest"; | |
| import { shouldRefreshSessions } from "./session-refresh"; | |
| describe("shouldRefreshSessions", () => { | |
| it("returns false on the first poll (no baseline yet)", () => { | |
| expect(shouldRefreshSessions(null, "s2")).toBe(false); | |
| }); | |
| it("returns false when the current response has no sessions", () => { | |
| expect(shouldRefreshSessions("s1", null)).toBe(false); | |
| expect(shouldRefreshSessions(null, null)).toBe(false); | |
| }); | |
| it("returns false when the newest session id is unchanged", () => { | |
| expect(shouldRefreshSessions("s1", "s1")).toBe(false); | |
| }); | |
| it("returns true when a new session appears at the head of the list", () => { | |
| expect(shouldRefreshSessions("s1", "s2")).toBe(true); | |
| }); | |
| }); | |