Skip to content

Commit

Permalink
fix: oops bad line add snuck in
Browse files Browse the repository at this point in the history
  • Loading branch information
amiller68 committed Apr 2, 2024
1 parent 5875750 commit a655064
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 43 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/fmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/yarn
key: ${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-
- name: Install dependencies
run: yarn install
- name: Lint
run: yarn format:check
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"scripts": {
"lint": "eslint --ext .js,.vue ./",
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
"format:check": "prettier --check \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
"test": "echo \"No test specified\" && exit 0",
"dev": "quasar dev",
"build": "quasar build"
Expand All @@ -27,6 +28,7 @@
"dompurify": "^3.0.9",
"ethers": "6.11.1",
"highlight.js": "^11.9.0",
"langchain": "^0.1.30",
"libertai-js": "https://github.com/Libertai/libertai-js",
"marked": "^12.0.0",
"marked-highlight": "^2.1.1",
Expand Down
4 changes: 0 additions & 4 deletions src/pages/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ export default defineComponent({
prompt.value,
chat.value.model,
)) {
console.log(output);
currentMessage.content = output.content;
currentMessage.unfinished = output.unfinished;
Expand Down Expand Up @@ -268,8 +267,6 @@ export default defineComponent({
if (chat.value.title === "") {
setChatName(chat.value.messages[0].content);
}
nextTick(scrollBottom)
}
if (chat.value.messages.length == 1) {
await generatePersonaMessage();
Expand Down Expand Up @@ -333,7 +330,6 @@ export default defineComponent({
};
},
});
</script>
<style>
code.hljs {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export async function complete(prompt, model, stop_sequences, handle_cache) {
temperature: model.temperature,
top_p: model.top_p,
top_k: model.top_k,
min_p: model.min_p
min_p: model.min_p,
};
console.log(model.engine);
if (model.engine == "kobold") {
Expand Down
15 changes: 11 additions & 4 deletions src/utils/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const defaults = {
maxTokens: 8192,
temperature: 0.7,
sampler_order: [6, 0, 1, 3, 4, 2, 5],
min_p: 0.05
min_p: 0.05,
top_p: 0.9,
top_k: 40,
model_type: "knowledge",
Expand All @@ -20,7 +20,6 @@ const defaults = {
pass_credentials: true,
};


const chatml = {
base_prompt:
"<|im_start|>system\nYou are {{char}}, discussing with {{user}}.\n",
Expand All @@ -45,7 +44,15 @@ export default [
"https://curated.aleph.cloud/vm/a8b6d895cfe757d4bc5db9ba30675b5031fe3189a99a14f13d5210c473220caf/completion",
engine: "llamacpp",
pass_credentials: true,
stop_sequences: ["<|im_end|>","<|endoftext|>", "<|", "</|", "<im_end|>","</assistant","</user"]
stop_sequences: [
"<|im_end|>",
"<|endoftext|>",
"<|",
"</|",
"<im_end|>",
"</assistant",
"</user",
],
},
{
...defaults,
Expand Down Expand Up @@ -115,4 +122,4 @@ export default [
pass_credentials: true,
user_append: ": \n",
},
];
];
53 changes: 19 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@
integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==

"@humanwhocodes/object-schema@^2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917"
integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==
version "2.0.3"
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3"
integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==

"@intlify/bundle-utils@^3.1.2":
version "3.4.0"
Expand Down Expand Up @@ -677,9 +677,9 @@
buffer "~6.0.3"

"@solana/web3.js@^1.30.2", "@solana/web3.js@^1.90.0":
version "1.91.2"
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.91.2.tgz#a5cb46a90076faaa284856e24464cac2b68fdc0c"
integrity sha512-WXPl5VXtfNKWM2RkGj7mvX6dKcZURDKe1lWBFAt/RqDBI9Rjr9hr7Y+U+yz2+TyViMmoinfJVlkS4gk2FPDG/g==
version "1.91.3"
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.91.3.tgz#25b8b9dfd88bfa6441c0c02bbdb67abd32bfa0f4"
integrity sha512-Z6FZyW8SWm7RXW5ZSyr1kmpR+eH/F4DhgxV4WPaq5AbAAMnCiiGm36Jb7ACHFXtWzq1a24hBkJ1wnVANjsmdPA==
dependencies:
"@babel/runtime" "^7.23.4"
"@noble/curves" "^1.2.0"
Expand Down Expand Up @@ -779,9 +779,9 @@
"@types/estree" "*"

"@types/eslint@*":
version "8.56.6"
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.6.tgz#d5dc16cac025d313ee101108ba5714ea10eb3ed0"
integrity sha512-ymwc+qb1XkjT/gfoQwxIeHZ6ixH23A+tCT2ADSA/DPVKzAjwYkTXBMCQ/f6fe4wEa85Lhp26VPeUxI7wMhAi7A==
version "8.56.7"
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.7.tgz#c33b5b5a9cfb66881beb7b5be6c34aa3e81d3366"
integrity sha512-SjDvI/x3zsZnOkYZ3lCt9lOZWZLB2jIlNKz+LBgCtDurK0JZcwucxYHn1w2BJkD34dgX9Tjnak0txtq4WTggEA==
dependencies:
"@types/estree" "*"
"@types/json-schema" "*"
Expand Down Expand Up @@ -1941,9 +1941,9 @@ camelcase@^5.3.1:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==

caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599:
version "1.0.30001603"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001603.tgz#605046a5bdc95ba4a92496d67e062522dce43381"
integrity sha512-iL2iSS0eDILMb9n5yKQoTBim9jMZ0Yrk8g0N9K7UzYyWnfIKzXBZD5ngpM37ZcL/cv0Mli8XtVMRYMQAfFpi5Q==
version "1.0.30001605"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz#ca12d7330dd8bcb784557eb9aa64f0037870d9d6"
integrity sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==

caseless@~0.12.0:
version "0.12.0"
Expand Down Expand Up @@ -2483,9 +2483,9 @@ [email protected]:
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==

electron-to-chromium@^1.4.668:
version "1.4.722"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.722.tgz#99ae3484c5fc0f387d39ad98d77e1f259b9f4074"
integrity sha512-5nLE0TWFFpZ80Crhtp4pIp8LXCztjYX41yUcV6b+bKR2PqzjskTMOOlBi1VjBHlvHwS+4gar7kNKOrsbsewEZQ==
version "1.4.723"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.723.tgz#827da30c96b316684d352c3d81430029df01bb8e"
integrity sha512-rxFVtrMGMFROr4qqU6n95rUi9IlfIm+lIAt+hOToy/9r6CDv0XiEcQdC3VP71y1pE5CFTzKV0RvxOGYCPWWHPw==

[email protected]:
version "0.1.7"
Expand Down Expand Up @@ -4876,7 +4876,7 @@ open@^8.4.0:
is-docker "^2.1.1"
is-wsl "^2.2.0"

openai@^4.26.0:
openai@^4.26.0, openai@^4.28.4:
version "4.32.0"
resolved "https://registry.yarnpkg.com/openai/-/openai-4.32.0.tgz#6feaf9fca691979857594517801c4025b4dcb74d"
integrity sha512-TXmBSej7RoQ4GWgKw1Waopx6QRroWlwaLH+PkxCTN45nKNEPFcGUV7VSWQCB/DwWMQVRLSNUAH4BqFYnSCEgkQ==
Expand All @@ -4890,21 +4890,6 @@ openai@^4.26.0:
node-fetch "^2.6.7"
web-streams-polyfill "^3.2.1"

openai@^4.28.4:
version "4.31.0"
resolved "https://registry.yarnpkg.com/openai/-/openai-4.31.0.tgz#5d96045c4eb244fa21f0fff0981043a2c9f09e8c"
integrity sha512-JebkRnRGEGLnJt3+bJ5B7au8nBeZvJjs9baVxDmUZ5+BgafAdy6KDxJGSuyaw/IA+ErqY3jmOH5cDC2mCDJF2w==
dependencies:
"@types/node" "^18.11.18"
"@types/node-fetch" "^2.6.4"
abort-controller "^3.0.0"
agentkeepalive "^4.2.1"
digest-fetch "^1.3.0"
form-data-encoder "1.7.2"
formdata-node "^4.3.2"
node-fetch "^2.6.7"
web-streams-polyfill "^3.2.1"

openapi-types@^12.1.3:
version "12.1.3"
resolved "https://registry.yarnpkg.com/openapi-types/-/openapi-types-12.1.3.tgz#471995eb26c4b97b7bd356aacf7b91b73e777dd3"
Expand Down Expand Up @@ -5904,9 +5889,9 @@ terser-webpack-plugin@^5.3.10:
terser "^5.26.0"

terser@^5.26.0:
version "5.30.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.30.0.tgz#64cb2af71e16ea3d32153f84d990f9be0cdc22bf"
integrity sha512-Y/SblUl5kEyEFzhMAQdsxVHh+utAxd4IuRNJzKywY/4uzSogh3G219jqbDDxYu4MXO9CzY3tSEqmZvW6AoEDJw==
version "5.30.2"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.30.2.tgz#79fc2222c241647cea54ab928ac987ffbe8ce9e2"
integrity sha512-vTDjRKYKip4dOFL5VizdoxHTYDfEXPdz5t+FbxCC5Rp2s+KbEO8w5wqMDPgj7CtFKZuzq7PXv28fZoXfqqBVuw==
dependencies:
"@jridgewell/source-map" "^0.3.3"
acorn "^8.8.2"
Expand Down

0 comments on commit a655064

Please sign in to comment.