Skip to content

Commit

Permalink
migrated from earlier repo
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaclen committed Nov 25, 2023
1 parent afcf737 commit da1c096
Show file tree
Hide file tree
Showing 28 changed files with 8,548 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PUBLIC_OLLAMA_URL="http://localhost:11434"
PUBLIC_MODEL="mistral"
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
30 changes: 30 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
};
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

/ai/models
/sessions/*.json
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": false
}
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Hollama

A minimal web-UI for talking to [Ollama](https://github.com/jmorganca/ollama/) servers.

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
32 changes: 32 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Hollama

An implementation of `llama.cpp` using `node-llama-cpp`.

### Instructions

```shell
# Install dependencies
npm i

# macOS (Intel)
# https://withcatai.github.io/node-llama-cpp/guide/Metal#building-node-llama-cpp-with-metal-support-disabled
npx --no node-llama-cpp download --no-metal

# Windows (CUDA)
npx --no node-llama-cpp download --cuda

# Download models
npx ipull https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_K_M.gguf
npx ipull https://huggingface.co/TheBloke/Llama-2-13B-GGUF/resolve/main/llama-2-13b.Q4_K_M.gguf
npx ipull https://huggingface.co/TheBloke/Thespis-Mistral-7B-v0.5-GGUF/resolve/main/thespis-mistral-7b-v0.5.Q4_K_M.gguf
npx ipull https://huggingface.co/TheBloke/MistralLite-7B-GGUF/resolve/main/mistrallite.Q4_K_M.gguf

# Validate model
npx --no node-llama-cpp chat --model ./ai/models/llama-2-7b.Q4_K_M.gguf
npx --no node-llama-cpp chat --model ./ai/models/llama-2-13b.Q4_K_M.gguf
npx --no node-llama-cpp chat --model ./ai/models/thespis-mistral-7b-v0.5.Q4_K_M.gguf
npx --no node-llama-cpp chat --model ./ai/models/mistrallite.Q4_K_M.gguf

# Prompt
Building a website can be done in 10 simple steps:
```
Loading

0 comments on commit da1c096

Please sign in to comment.