Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error while importing local model is not shown #3294

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web/hooks/useSendMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ const useSendMessage = () => {
chatCompletionStreaming,
setIsGeneratingResponse,
setShowWarningMultipleModelModal,
setChunkCount,
])

const sendMessage = useCallback(
Expand Down
24 changes: 11 additions & 13 deletions web/screens/Settings/ImportingModelModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ImportingModelModal = () => {
errorMessage = error.message
}

setImportModelError(model.path, errorMessage)
setImportModelError(model.importId, errorMessage)
toaster({
title: 'Import failed',
description: errorMessage,
Expand All @@ -68,18 +68,16 @@ const ImportingModelModal = () => {
))}
</div>

<div>
<div className="flex flex-row gap-2 rounded-b-lg border-t border-[hsla(var(--app-border))] py-2">
<AlertCircle
size={16}
className="mt-1 flex-shrink-0 text-[hsla(var(--warning-bg))]"
/>
<p className="text-[hsla(var(--text-secondary)] font-semibold">
Own your model configurations, use at your own risk.
Misconfigurations may result in lower quality or unexpected
outputs.
</p>
</div>
<div className="flex flex-row gap-2 rounded-b-lg border-t border-[hsla(var(--app-border))] py-2">
<AlertCircle
size={16}
className="mt-1 flex-shrink-0 text-[hsla(var(--warning-bg))]"
/>
<p className="text-[hsla(var(--text-secondary)] font-semibold">
Own your model configurations, use at your own risk.
Misconfigurations may result in lower quality or unexpected
outputs.
</p>
</div>
</Fragment>
}
Expand Down
Loading