Skip to content

Commit

Permalink
chore: remove beta flag from posthog integration and update Availabil…
Browse files Browse the repository at this point in the history
…ity Banner
  • Loading branch information
marcklingen committed Dec 21, 2024
1 parent f116afc commit e576e7b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 55 deletions.
41 changes: 6 additions & 35 deletions components/availability.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,18 @@ const availabilities: {
shortLabel: "Enterprise",
Icon: Check,
},
{
id: "pro",
label: "Pro & Enterprise",
shortLabel: "Pro & Enterprise",
Icon: Check,
},
{ id: "full", label: "Full", Icon: Check },
{ id: "private-beta", label: "Private Beta", Icon: Check },
{ id: "public-beta", label: "Public Beta", Icon: Check },
{ id: "not-available", label: "Not Available", Icon: X },
];

export function AvailabilitySidebar(props: {
frontMatter: Record<string, any>;
}) {
const relevantFrontMatter = Object.entries(props.frontMatter)
.filter(([key, value]) => key.startsWith("availability"))
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});

if (Object.keys(relevantFrontMatter).length === 0) return null;

return (
<div className="flex flex-col space-y-2 text-primary/60 w-full align-middle border-y py-2">
<div className="font-bold">Availability</div>
<ul className="flex flex-col space-y-1">
{plans
.filter((plan) => `availability.${plan.id}` in relevantFrontMatter)
.map((plan) => {
const availability = availabilities.find(
(availability) =>
relevantFrontMatter[`availability.${plan.id}`] ===
availability.id
);
if (!availability) return null;
return (
<li key={plan.id} className="flex flex-row gap-2">
<availability.Icon className="w-4 h-4 inline-block" />
<div className="font-bold">{plan.label}</div>
<div>{availability.label}</div>
</li>
);
})}
</ul>
</div>
);
}

export function AvailabilityBanner(props: {
availability: Record<
(typeof plans)[number]["id"],
Expand Down
12 changes: 4 additions & 8 deletions pages/docs/analytics/posthog.mdx
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
---
title: PostHog for LLM Apps with Langfuse (open source)
description: Display your Langfuse metrics in Posthog dashboards.
availability.hobby: public-beta
availability.pro: public-beta
availability.team: public-beta
availability.selfHosted: not-available
---

# PostHog Integration

<AvailabilityBanner
availability={{
hobby: "public-beta",
pro: "public-beta",
team: "public-beta",
selfHosted: "ee",
hobby: "full",
pro: "full",
team: "full",
selfHosted: "pro",
}}
/>

Expand Down
2 changes: 1 addition & 1 deletion pages/docs/datasets/prompt-experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: Run prompt experiments on datasets with LLM-as-a-Judge evaluations.
hobby: "public-beta",
pro: "public-beta",
team: "public-beta",
selfHosted: "ee",
selfHosted: "pro",
}}
/>

Expand Down
2 changes: 1 addition & 1 deletion pages/docs/playground.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: Test, iterate, and compare different prompts and models within the
hobby: "full",
pro: "full",
team: "full",
selfHosted: "ee",
selfHosted: "pro",
}}
/>

Expand Down
2 changes: 1 addition & 1 deletion pages/docs/scores/annotation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Upon completing annotation click on the `Scores` tab to view a table of all the
hobby: "full",
pro: "full",
team: "full",
selfHosted: "ee",
selfHosted: "pro",
}}
/>

Expand Down
2 changes: 1 addition & 1 deletion pages/docs/scores/model-based-evals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: Langfuse (open source) helps run model-based evaluations (llm-as-a-
hobby: "full",
pro: "full",
team: "full",
selfHosted: "ee",
selfHosted: "pro",
}}
/>

Expand Down
9 changes: 1 addition & 8 deletions theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ import { GeistSans } from "geist/font/sans";
import IconDiscord from "./components/icons/discord";
import FooterMenu from "./components/FooterMenu";
import Link from "next/link";
import {
AvailabilityBanner,
AvailabilitySidebar,
} from "./components/availability";
import { AvailabilityBanner } from "./components/availability";
import { CloudflareVideo, Video } from "./components/Video";
// import InkeepCustomTrigger from "./components/inkeep/InkeepCustomTrigger";
import InkeepSearchBar from "./components/inkeep/InkeepSearchBar";
Expand Down Expand Up @@ -72,10 +69,6 @@ const config: DocsThemeConfig = {
},
toc: {
backToTop: true,
extraContent: () => {
const { frontMatter } = useConfig();
return <AvailabilitySidebar frontMatter={frontMatter} />;
},
},
docsRepositoryBase: "https://github.com/langfuse/langfuse-docs/tree/main",
footer: {
Expand Down

0 comments on commit e576e7b

Please sign in to comment.