Skip to content

Commit

Permalink
Merge pull request #295 from l3vels/fix/fine-tuning-error-message
Browse files Browse the repository at this point in the history
Fix/fine tuning error message
  • Loading branch information
Chkhikvadze authored Nov 10, 2023
2 parents 191bb73 + 4fc6144 commit 5ff61b0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions apps/ui/src/components/ChatTypingEffect/Typewriter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ const StyledTypewriterWrapper = styled.div<{ size: string }>`
width: 100%;
color: ${({ theme }) => theme.body.textColorPrimary};
white-space: pre-line;
${p =>
p.size === 'small' &&
css`
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const StyledRoot = styled.div`
}
border-radius: 24px;
max-height: calc(100vh - 300px);
max-height: calc(100vh - 330px);
`

const StyledTable = styled.table`
Expand Down
9 changes: 7 additions & 2 deletions apps/ui/src/pages/Models/FineTuning/useCreateFineTuning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,20 @@ export const useCreateFineTuning = () => {
}

await createFineTuningService(fineTuningInput)

await refetchFineTining()
navigate('/models')
setToast({
message: 'Fine-tuning was Created!',
type: 'positive',
open: true,
})
} catch (e) {
handleErrorAlert('Failed to create Fine-tuning!')
} catch (error: any) {
if (error.networkError && 'result' in error.networkError) {
handleErrorAlert(error.networkError.result.detail)
} else {
handleErrorAlert('Failed to create Fine-tuning!')
}
}

setIsLoading(false)
Expand Down
8 changes: 6 additions & 2 deletions apps/ui/src/pages/Models/FineTuning/useEditFineTuning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ export const useEditFineTuning = () => {
open: true,
})
navigate('/models')
} catch (e) {
handleErrorAlert('Failed To Update Fine-Tuning!')
} catch (error: any) {
if (error.networkError && 'result' in error.networkError) {
handleErrorAlert(error.networkError.result.detail)
} else {
handleErrorAlert('Failed to create Fine-tuning!')
}
}
setIsLoading(false)
}
Expand Down

0 comments on commit 5ff61b0

Please sign in to comment.