Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/lobehub/lobe-chat
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 22, 2024
2 parents 75fcc03 + a4311ea commit 83c6b08
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

# Changelog

### [Version 1.19.22](https://github.com/lobehub/lobe-chat/compare/v1.19.21...v1.19.22)

<sup>Released on **2024-09-22**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix ollama model download panel.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

- **misc**: Fix ollama model download panel, closes [#4070](https://github.com/lobehub/lobe-chat/issues/4070) ([fc33336](https://github.com/lobehub/lobe-chat/commit/fc33336))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

### [Version 1.19.21](https://github.com/lobehub/lobe-chat/compare/v1.19.20...v1.19.21)

<sup>Released on **2024-09-21**</sup>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lobehub/chat",
"version": "1.19.21",
"version": "1.19.22",
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
"keywords": [
"framework",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const OllamaModelForm = memo<OllamaModelFormProps>(({ id, model }) => {
const [total, setTotal] = useState(0);
const { remainingTime, downloadSpeed } = useDownloadMonitor(total, completed);
const percent = useMemo(() => {
return total ? Number(((completed / total) * 100).toFixed(0)) : 0;
return total ? Number(((completed / total) * 100).toFixed(1)) : 0;
}, [completed, total]);

const [delAndRegenerateMessage, deleteMessage] = useChatStore((s) => [
Expand Down Expand Up @@ -114,8 +114,8 @@ const OllamaModelForm = memo<OllamaModelFormProps>(({ id, model }) => {
!total
? t('ollama.unlock.starting')
: t('ollama.unlock.downloaded', {
completed: formatSize(completed),
total: formatSize(total),
completed: formatSize(completed, 2),
total: formatSize(total, 2),
})}
</Button>
{isDownloading ? (
Expand Down
2 changes: 1 addition & 1 deletion src/features/Conversation/Error/OllamaBizError/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface OllamaErrorResponse {
error: OllamaError;
}

const UNRESOLVED_MODEL_REGEXP = /model '([\w+,-_]+)' not found/;
const UNRESOLVED_MODEL_REGEXP = /model "([\w+,-_]+)" not found/;

const OllamaBizError = memo<ChatMessage>(({ error, id }) => {
const errorBody: OllamaErrorResponse = (error as any)?.body;
Expand Down

0 comments on commit 83c6b08

Please sign in to comment.