diff --git a/frontend/src/pages/FineTuning/Steps/Confirmation/index.jsx b/frontend/src/pages/FineTuning/Steps/Confirmation/index.jsx index acf4b409..cfb8d970 100644 --- a/frontend/src/pages/FineTuning/Steps/Confirmation/index.jsx +++ b/frontend/src/pages/FineTuning/Steps/Confirmation/index.jsx @@ -1,9 +1,11 @@ import FineTuning from "@/models/experimental/fineTuning"; import { dollarFormat } from "@/utils/numbers"; import showToast from "@/utils/toast"; -import { CheckCircle } from "@phosphor-icons/react"; -import { useState } from "react"; +import { Check } from "@phosphor-icons/react"; +import { useState, useEffect } from "react"; import FineTuningSteps from "../index"; +import CTAButton from "@/components/lib/CTAButton"; +import Workspace from "@/models/workspace"; /** * @param {{settings: import("../index").OrderSettings}} param0 @@ -11,6 +13,18 @@ import FineTuningSteps from "../index"; */ export default function Confirmation({ settings, setSettings, setStep }) { const [loading, setLoading] = useState(false); + const [workspaces, setWorkspaces] = useState([]); + + useEffect(() => { + Workspace.all() + .then((fetchedWorkspaces) => { + setWorkspaces(fetchedWorkspaces); + }) + .catch(() => { + showToast("Failed to fetch workspaces", "error"); + }); + }, []); + async function handleCheckout() { setLoading(true); const data = await FineTuning.createOrder({ @@ -40,107 +54,124 @@ export default function Confirmation({ settings, setSettings, setStep }) { setStep(FineTuningSteps.confirmation.next()); } + const getWorkspaceName = (slug) => { + const workspace = workspaces.find((ws) => ws.slug === slug); + return workspace ? workspace.name : slug; + }; + return (
+
Below are your fine-tuning order details. If you have any questions - before or after ordering your fine-tune you can{" "} + before or after ordering your fine-tune you can checkout the{" "} - checkout the fine-tuning FAQ + fine-tuning FAQ {" "} or email{" "} - + team@mintplexlabs.com .
-Contact e-mail:
-{settings.email}
-Base LLM:
-{settings.baseModel}
-Output model name:
-"{settings.modelName}"
-Training on workspaces:
- {settings.trainingData.slugs.map((slug, i) => { - return ( -- "{slug}" - {i !== settings.trainingData.slugs.length - 1 ? "," : ""} -
- ); - })} +Contact e-mail:
+{settings.email}
- training on positive-feedback chats only. +
Base LLM:
+{settings.baseModel}
+Output model name:
+"{settings.modelName}"
+Training on workspaces:
+Training data:
++ {settings.trainingData.feedback === true + ? "Training on positive-feedback chats only" + : "Training on all chats"}
- ) : ( -- training on all chats. -
- )} +Agreed to Terms and Conditions
-Understand privacy & data handling
-Agreed to Fulfillment terms
++ Agreed to Terms and Conditions +
++ Understand privacy & data handling +
+Agreed to Fulfillment terms
+Total one-time cost:
-+
{dollarFormat(settings.tuningInfo.pricing.usd)} *
+
* price does not include any coupons, incentives, or discounts you can apply at checkout.
+
Once you proceed to checkout, if you do not complete this purchase your data will be deleted from our servers within 1 hour of abandonment of the creation of the checkout in accordance to our privacy and data handling policy.
+