diff --git a/frontend/app/blog/page.tsx b/frontend/app/blog/page.tsx index d046d947..d7852280 100644 --- a/frontend/app/blog/page.tsx +++ b/frontend/app/blog/page.tsx @@ -30,11 +30,11 @@ export default async function BlogsPage() { return <>
-
+
{posts.map((post, index) => ( - {post.data.image && {post.data.title}} + {post.data.image && {post.data.title}} {post.data.title} diff --git a/frontend/components/evaluator/evaluator-editor.tsx b/frontend/components/evaluator/evaluator-editor.tsx index 94417224..ad4d45aa 100644 --- a/frontend/components/evaluator/evaluator-editor.tsx +++ b/frontend/components/evaluator/evaluator-editor.tsx @@ -37,6 +37,7 @@ export function EvaluatorEditor({ const [output, setOutput] = useState(''); const runnableGraph = useRef(null); const [isRunning, setIsRunning] = useState(false); + const [wasTypeCast, setWasTypeCast] = useState(false); useEffect(() => { setInputs(`{ @@ -110,11 +111,11 @@ export function EvaluatorEditor({ let value = res['outputs']['output']['value']; - // python return True or False but we parse it into JSON as true/false - if (value === 'true') { - value = 'True'; - } else if (value === 'false') { - value = 'False'; + if (typeof value !== 'string') { + setWasTypeCast(true); + value = JSON.stringify(value); + } else { + setWasTypeCast(false); } setOutput(value); @@ -207,6 +208,11 @@ export function EvaluatorEditor({ Run test
+ {wasTypeCast && ( +
+ Output was cast to string +
+ )} ( - 'def main(span_input, span_output):\n return True' + '# has to return a string matching one of the expected values\ndef main(span_input, span_output):\n return "correct"' ); diff --git a/frontend/components/landing/footer.tsx b/frontend/components/landing/footer.tsx index 18b102d4..8601cf5c 100644 --- a/frontend/components/landing/footer.tsx +++ b/frontend/components/landing/footer.tsx @@ -1,16 +1,10 @@ -import Image from 'next/image'; - -import noise from '@/assets/landing/noise2.jpeg'; export default function Footer() { return (
-
-
- -
+
-
+
Contact us diff --git a/frontend/components/landing/landing.tsx b/frontend/components/landing/landing.tsx index 0a80af54..572f17e0 100644 --- a/frontend/components/landing/landing.tsx +++ b/frontend/components/landing/landing.tsx @@ -39,7 +39,9 @@ const sections: Section[] = [ { id: 'traces', title: 'Trace', - description: 'Tracing your LLM application provides visibility into execution steps while collecting valuable data for evaluations, few-shot examples, and fine-tuning.', + description: `Tracing your LLM application provides visibility into every + execution step while collecting valuable data for evaluations, few-shot examples, and fine-tuning. + With Laminar, you can start tracing with just 2 lines of code.`, pythonCodeExample: `from lmnr import Laminar, observe # automatically traces common LLM frameworks and SDKs @@ -47,7 +49,9 @@ Laminar.initialize(project_api_key="...") @observe() # you can also manually trace any function def my_function(...): -...`, + ... + +`, tsCodeExample: `import { Laminar, observe } from '@lmnr-ai/lmnr'; // automatically traces common LLM frameworks and SDKs @@ -64,7 +68,9 @@ const myFunction = observe({name: 'myFunc'}, async () => { { id: 'evals', title: 'Evaluate', - description: 'Evaluations are unit tests for your LLM application. They help you answer questions like "Did my last change improve the performance?". Run custom evals via code, CLI, or CI/CD pipeline.', + description: `Evaluations are unit tests for your LLM application. + They help you answer questions like "Did my last change improve the performance?". + With Laminar, you can run custom evals via code, CLI, or CI/CD pipeline.`, image: evals, pythonCodeExample: `from lmnr import evaluate @@ -90,7 +96,8 @@ evaluate({ { id: 'labels', title: 'Label', - description: 'Label LLM outputs to identify successes and failures. Build datasets for fine-tuning, prompt examples, and targeted improvements. Use human labels for evaluations.', + description: `With Laminar, you can label LLM outputs to identify successes and failures. + Build datasets for fine-tuning and few-shot examples. Use human labels as evaluation scores.`, image: labels, docsLink: 'https://docs.lmnr.ai/labels/introduction', pythonCodeExample: `from lmnr import Laminar @@ -101,6 +108,7 @@ with Laminar.with_labels(my_labels): openai_client.chat.completions.create( messages=[ ... ] ) + `, tsCodeExample: `import { Laminar, withLabels} from '@lmnr-ai/lmnr'; @@ -221,27 +229,27 @@ export default function Landing() {
-
-
+
+
Building with LLMs?
- + Then, you might be
-
+
Struggling to monitor LLM calls in production. Don't know how last prompt change affected performance. Lacking data for fine-tuning and prompt engineering.
+

+ Laminar is a single solution for
+ tracing, evaluating, and labeling
+ LLM products. +

-

- Laminar is a single solution for
- tracing, evaluating, and labeling
- LLM products. -

@@ -253,24 +261,24 @@ export default function Landing() { className="w-full h-full object-cover" />
-
-
-
- {sections.map((section, i) => ( - - ))} -
+
+
+ {sections.map((section, i) => ( + + ))} +
+
-

{selectedSection.title}

-

+

{selectedSection.title}

+

{selectedSection.description}

{selectedSection.docsLink && ( @@ -287,15 +295,15 @@ export default function Landing() {
)}
-
-
- +
+ +
-
+
{selectedSection.title} -
@@ -530,6 +537,7 @@ function CodeTabs({ pythonCode, tsCode }: { pythonCode?: string; tsCode?: string className="bg-black border-white" code={pythonCode || ''} language="python" + copyable={false} /> )} {selectedLang === 'typescript' && ( @@ -537,6 +545,7 @@ function CodeTabs({ pythonCode, tsCode }: { pythonCode?: string; tsCode?: string className="bg-black border-white" code={tsCode || ''} language="javascript" + copyable={false} /> )}
diff --git a/frontend/components/ui/code-highlighter.tsx b/frontend/components/ui/code-highlighter.tsx index 6aa08035..65e1212c 100644 --- a/frontend/components/ui/code-highlighter.tsx +++ b/frontend/components/ui/code-highlighter.tsx @@ -21,13 +21,15 @@ export default function CodeHighlighter({ return (
- + {copyable && ( + + )}