-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: first model provider banner & model provider pages improvements (…
…#789) * feat: first model provider banners ux chore: add link to model provider site chore: add appropriate links to model providers and otto azure doc chore: add Default Model button & user friendly labels feat: open default model aliases on config completion feat: add icon to configure model header Update ModelProviderIcon.tsx * chore: nits & add shadcn alert component * chore: remove border and slight padding fix on scroll area * chore: styling fix again
- Loading branch information
1 parent
9e69b19
commit 5a34236
Showing
11 changed files
with
429 additions
and
113 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
ui/admin/app/components/agent/FirstModelProviderBanner.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Link } from "@remix-run/react"; | ||
import { $path } from "remix-routes"; | ||
|
||
import { TypographyH3, TypographyP } from "~/components/Typography"; | ||
import { OttoLogo } from "~/components/branding/OttoLogo"; | ||
import { Button } from "~/components/ui/button"; | ||
|
||
export function FirstModelProviderBanner() { | ||
return ( | ||
<div className="w-full"> | ||
<div className="flex justify-center w-full"> | ||
<div className="flex flex-row p-4 min-h-36 justify-end items-center w-[calc(100%-4rem)] rounded-sm mx-8 mt-4 bg-secondary relative overflow-hidden gap-4 max-w-screen-md"> | ||
<OttoLogo | ||
hideText | ||
classNames={{ | ||
root: "absolute opacity-45 top-[-5rem] left-[-7.5rem]", | ||
image: "h-80 w-80", | ||
}} | ||
/> | ||
<div className="flex flex-col pl-48"> | ||
<TypographyH3 className="mb-0.5"> | ||
Ready to create your first Agent? | ||
</TypographyH3> | ||
<TypographyP className="text-sm font-light mb-2"> | ||
You're almost there! To start creating or using{" "} | ||
agents, you'll need access to a LLM (Large | ||
Language Model) <b>Model Provider</b>. Luckily, we | ||
support a variety of providers to help get you | ||
started. | ||
</TypographyP> | ||
<Button className="mt-0 w-fit px-10"> | ||
<Link to={$path("/model-providers")}> | ||
Get Started | ||
</Link> | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
ui/admin/app/components/model-providers/ModelProviderIcon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { BoxesIcon } from "lucide-react"; | ||
|
||
import { ModelProvider } from "~/lib/model/modelProviders"; | ||
import { cn } from "~/lib/utils"; | ||
|
||
import { CommonModelProviderIds } from "~/components/model-providers/constants"; | ||
|
||
export function ModelProviderIcon({ | ||
modelProvider, | ||
size = "md", | ||
}: { | ||
modelProvider: ModelProvider; | ||
size?: "md" | "lg"; | ||
}) { | ||
return modelProvider.icon ? ( | ||
<img | ||
src={modelProvider.icon} | ||
alt={modelProvider.name} | ||
className={cn({ | ||
"w-6 h-6": size === "md", | ||
"w-16 h-16": size === "lg", | ||
"dark:invert": | ||
modelProvider.id !== CommonModelProviderIds.AZURE_OPENAI, | ||
})} | ||
/> | ||
) : ( | ||
<BoxesIcon className="w-16 h-16 color-primary" /> | ||
); | ||
} |
Oops, something went wrong.