Skip to content

Commit

Permalink
Merge branch 'main' into gpu-support
Browse files Browse the repository at this point in the history
  • Loading branch information
gaby authored Dec 27, 2023
2 parents 9701d12 + b63c749 commit 0f3358a
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 77 deletions.
11 changes: 4 additions & 7 deletions api/src/serge/routers/chat.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

from typing import Optional
from fastapi import APIRouter, HTTPException
from langchain.memory import RedisChatMessageHistory
Expand Down Expand Up @@ -30,13 +32,8 @@ async def create_new_chat(
init_prompt: str = "Below is an instruction that describes a task. Write a response that appropriately completes the request.",
n_threads: int = 4,
):
try:
client = Llama(
model_path=f"/usr/src/app/weights/{model}.bin",
)
del client
except Exception as exc:
raise ValueError(f"Model can't be found: {exc}")
if not os.path.exists(f"/usr/src/app/weights/{model}.bin"):
raise ValueError(f"Model can't be found: /usr/src/app/weights/{model}.bin")

client = Redis(host="localhost", port=6379, decode_responses=False)

Expand Down
2 changes: 1 addition & 1 deletion scripts/serge.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
LLAMA_PYTHON_VERSION=0.2.23
LLAMA_PYTHON_VERSION=0.2.25
155 changes: 90 additions & 65 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.30.0",
"@types/markdown-it": "^13.0.7",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"autoprefixer": "^10.4.16",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.1",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-svelte": "^2.35.1",
"eslint-plugin-vue": "^9.19.2",
"postcss": "^8.4.32",
Expand All @@ -40,7 +40,7 @@
"@iconify/svelte": "^3.1.6",
"@sveltestack/svelte-query": "^1.6.0",
"clipboard": "^2.0.11",
"daisyui": "^4.4.23",
"daisyui": "^4.4.24",
"highlight.js": "^11.9.0",
"markdown-it": "^14.0.0",
"markdown-it-highlightjs": "^4.0.1",
Expand Down

0 comments on commit 0f3358a

Please sign in to comment.