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/app/settings/ssh-host-selection.test.ts from Wellz1000/hermes-2: direct link, hf CLI and curl.
- Browser
- Download file 1.29 kB
-
https://huggingface.co/Wellz1000/hermes-2/resolve/main/apps/desktop/src/app/settings/ssh-host-selection.test.ts
- Command line
-
hf download hf://Wellz1000/hermes-2/apps/desktop/src/app/settings/ssh-host-selection.test.ts
-
curl -L -o ssh-host-selection.test.ts https://huggingface.co/Wellz1000/hermes-2/resolve/main/apps/desktop/src/app/settings/ssh-host-selection.test.ts
1.29 kB
| import { describe, expect, it } from 'vitest' | |
| import { enrichSelectedSshHost, selectSshHost } from './ssh-host-selection' | |
| const state = { | |
| mode: 'ssh', | |
| sshHost: 'linux-box', | |
| sshUser: 'operator', | |
| sshPort: 2222, | |
| sshKeyPath: '/keys/linux', | |
| sshRemoteHermesPath: '/opt/hermes' | |
| } | |
| describe('selectSshHost', () => { | |
| it('clears host-specific fields when the selected host changes', () => { | |
| expect(selectSshHost(state, 'mac-box')).toEqual({ | |
| mode: 'ssh', | |
| sshHost: 'mac-box', | |
| sshUser: '', | |
| sshPort: null, | |
| sshKeyPath: '', | |
| sshRemoteHermesPath: '' | |
| }) | |
| }) | |
| it('preserves state when reselecting the same host', () => { | |
| expect(selectSshHost(state, state.sshHost)).toBe(state) | |
| }) | |
| it('enriches only the host that produced the ssh config result', () => { | |
| const selected = selectSshHost(state, 'mac-box') | |
| expect( | |
| enrichSelectedSshHost(selected, 'mac-box', { | |
| identityFile: '~/.ssh/id_ed25519', | |
| port: 22, | |
| user: 'hermes' | |
| }) | |
| ).toMatchObject({ | |
| sshHost: 'mac-box', | |
| sshUser: 'hermes', | |
| sshPort: null, | |
| sshKeyPath: '~/.ssh/id_ed25519' | |
| }) | |
| expect(enrichSelectedSshHost(state, 'mac-box', { user: 'wrong' })).toBe(state) | |
| }) | |
| }) | |