Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
feature: Add deprecation banner for GPT and DALL-E (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinderVosDeWael authored Nov 19, 2024
1 parent 3969305 commit 38a9b32
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 29 deletions.
9 changes: 5 additions & 4 deletions src/lib/components/banners/BaseBanner.svelte
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<script lang="ts">
import { modeCurrent } from '@skeletonlabs/skeleton';
import type { Snippet, SvelteComponent } from 'svelte';

Check warning on line 3 in src/lib/components/banners/BaseBanner.svelte

View workflow job for this annotation

GitHub Actions / lint

'SvelteComponent' is defined but never used. Allowed unused vars must match /^_/u
let {
title,
message,
variant
variant,
children
}: {
title: string;
message: string;
variant: 'success' | 'error' | 'warning';
children: Snippet;
} = $props();
const colorLightClass = `alert variant-soft-${variant}`;
Expand All @@ -32,6 +33,6 @@
<aside class={currentClass}>
<div class="alert-message">
<h3 class="h3">{title}</h3>
<p>{message}</p>
{@render children?.()}
</div>
</aside>
9 changes: 4 additions & 5 deletions src/lib/components/banners/BetaBanner.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import BaseBanner from './BaseBanner.svelte';
</script>

<BaseBanner
title="Beta Feature"
message="This feature is currently in beta. If you encounter any issues, please contact [email protected]."
variant="warning"
/>
<BaseBanner title="Beta Feature" variant="warning">
This feature is currently in beta. If you encounter any issues, please contact
[email protected].
</BaseBanner>
11 changes: 11 additions & 0 deletions src/lib/components/banners/DeprecationBanner.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script lang="ts">
import BaseBanner from './BaseBanner.svelte';
</script>

<BaseBanner title="Beta Feature" variant="error">
This feature has been deprecated and will no longer be maintained. Please use
<a
href="https://docbot.childmind.org"
class="underline text-blue-600 hover:text-blue-800 visited:text-purple-600">DocBot</a
> instead.
</BaseBanner>
8 changes: 3 additions & 5 deletions src/lib/components/banners/HasBaaBanner.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import BaseBanner from './BaseBanner.svelte';
</script>

<BaseBanner
title="Business Associate Agreement"
message="Our Business Associate Agreement(s) cover(s) this service. It is safe to upload protected data."
variant="success"
/>
<BaseBanner title="Business Associate Agreement" variant="success">
Our Business Associate Agreement(s) cover(s) this service. It is safe to upload protected data.
</BaseBanner>
9 changes: 4 additions & 5 deletions src/lib/components/banners/NoBaaBanner.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import BaseBanner from './BaseBanner.svelte';
</script>

<BaseBanner
title="Business Associate Agreement"
message="We do not have a Business Associate Agreement (BAA) in place for this service. Please do not upload sensitive data."
variant="error"
/>
<BaseBanner title="Business Associate Agreement" variant="error">
We do not have a Business Associate Agreement (BAA) in place for this service. Please do not
upload sensitive data.
</BaseBanner>
4 changes: 4 additions & 0 deletions src/routes/dalle/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import DeprecationBanner from '$lib/components/banners/DeprecationBanner.svelte';
import FormActionPage from '$lib/components/PageTemplates/FormActionPage.svelte';
import type { SubmitFunction } from '@sveltejs/kit';
Expand All @@ -14,6 +15,9 @@
};
</script>

<div class="mb-2">
<DeprecationBanner />
</div>
<FormActionPage {title} {description} {enhancer}>
<label for="file">Prompt</label>
<textarea
Expand Down
9 changes: 4 additions & 5 deletions src/routes/diarize-submit/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
'Transcribe and diarize files. This process works in batches i.e. it may take several minutes or hours before your files are processed. Once submitted, please navigate to the Diarization retrieval page to download your results. Note that results are deleted one week after finishing.';
</script>

<BaseBanner
title={'Known Bug'}
message={'There is a known bug where large files will crash the server and result in a JSON decode error. A fix is in the works.'}
variant="error"
/>
<BaseBanner title={'Known Bug'} variant="error">
There is a known bug where large files will crash the server and result in a JSON decode error. A
fix is in the works.
</BaseBanner>
<FormActionPage {title} {description} hasBusinessAssociateAgreemment>
<input
class="input block max-w-64"
Expand Down
2 changes: 2 additions & 0 deletions src/routes/gpt/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { getToastStore, type ToastSettings } from '@skeletonlabs/skeleton';
import { browser } from '$app/environment';
import ChatHistory from './ChatHistory.svelte';
import DeprecationBanner from '$lib/components/banners/DeprecationBanner.svelte';
let systemPrompt = $state('');
let model = $state('anthropic.claude-3-5-sonnet-20240620-v1:0');
Expand Down Expand Up @@ -58,6 +59,7 @@
</script>

<div hidden={chat !== null} class="space-y-2">
<DeprecationBanner />
<FormBasePage {title} {description} hasBusinessAssociateAgreemment />
<div class="grid grid-cols-2 gap-4">
<div>
Expand Down
9 changes: 4 additions & 5 deletions src/routes/transcription/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@
};
</script>

<BaseBanner
title={'Known Bug'}
message={'There is a known bug where large files will crash the server and result in a JSON decode error. A fix is in the works.'}
variant="error"
/>
<BaseBanner title={'Known Bug'} variant="error">
There is a known bug where large files will crash the server and result in a JSON decode error. A
fix is in the works.
</BaseBanner>
<FormActionPage {title} {description} {enhancer} hasBusinessAssociateAgreemment>
<input
class="input"
Expand Down

0 comments on commit 38a9b32

Please sign in to comment.