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 apps/desktop/src/components/assistant-ui/thread/user-message-selection.test.ts from Wellz1000/hermes-2: direct link, hf CLI and curl.
- Browser
- Download file 779 Bytes
-
https://huggingface.co/Wellz1000/hermes-2/resolve/main/apps/desktop/src/components/assistant-ui/thread/user-message-selection.test.ts
- Command line
-
hf download hf://Wellz1000/hermes-2/apps/desktop/src/components/assistant-ui/thread/user-message-selection.test.ts
-
curl -L -o user-message-selection.test.ts https://huggingface.co/Wellz1000/hermes-2/resolve/main/apps/desktop/src/components/assistant-ui/thread/user-message-selection.test.ts
779 Bytes
| import { afterEach, describe, expect, it } from 'vitest' | |
| import { hasTextSelection } from './user-message' | |
| afterEach(() => { | |
| window.getSelection()?.removeAllRanges() | |
| document.body.replaceChildren() | |
| }) | |
| describe('hasTextSelection', () => { | |
| it('is false with nothing highlighted', () => { | |
| expect(hasTextSelection()).toBe(false) | |
| }) | |
| it('is true once the user has a live range', () => { | |
| const node = document.createElement('span') | |
| node.textContent = 'copy me' | |
| document.body.appendChild(node) | |
| const range = document.createRange() | |
| range.selectNodeContents(node) | |
| const selection = window.getSelection()! | |
| selection.removeAllRanges() | |
| selection.addRange(range) | |
| expect(hasTextSelection()).toBe(true) | |
| }) | |
| }) | |