Skip to content

Commit

Permalink
Release 3.0.9 (#286)
Browse files Browse the repository at this point in the history
* Pagination bug

* Bug fix

* Update package

* Bugfixes

* Add migration file

* adding ability to add to dataset from traces tab

* fixing z-index bug

* fixing llm parsing, disable button for non llm traces

* cleaning up api providers page

* more bug fixes, auditing models

* adding api key auth to create project api key (#270)

* Improvements to prompt playground (#272)

* fixing static text area, fixing overlap

* creating custo ui for playground taces

* fetching traces on dialog open

* fixes

* fixes

* fixes

---------

Co-authored-by: Karthik Kalyanaraman <karthik@scale3labs.com>

* fix

* fix

* support for o1-preview and o1-mini (#275)

* fixing live prompt bug (#277)

* DSPy enhancements (#280)

* DSPy experiments

* LiteLLM support

* eval charts

* experiment metrics

* empty state

* minor fix

* fix

* clearing invite form fields on send (#279)

* Track project creation count metrics (#271)

* adding posthog

* bug fixes, adding new env vars

* adding posthog api key to dockerfile

* updating read me

* removing sensitive data

* removing more data

* adding sign up count by team

* minor

* update

* fixes

---------

Co-authored-by: Karthik Kalyanaraman <karthik@scale3labs.com>

* minor

* minor (#282)

* add vercel ai pricing (#283)

* fix (#284)

---------

Co-authored-by: dylan <dylan@scale3labs.com>
Co-authored-by: dylanzuber-scale3 <116033320+dylanzuber-scale3@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 26, 2024
1 parent aa8af77 commit 68075a0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export const metadata: Metadata = {
};

export default function Layout({ children }: { children: React.ReactNode }) {
return <LayoutClient children={children} />;
return <LayoutClient>{children}</LayoutClient>;
}
22 changes: 20 additions & 2 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,26 @@ export function calculatePriceFromUsage(
): any {
if (!model) return { total: 0, input: 0, output: 0 };
let costTable: CostTableEntry | undefined = undefined;

if (vendor === "litellm") {
if (vendor === "ai") {
if (model.startsWith("gpt-4") || model.includes("gpt-4")) {
vendor = "openai";
} else if (model.includes("claude")) {
vendor = "anthropic";
} else if (model.includes("mistral")) {
vendor = "mistral"; // Assuming there is a MISTRAL_PRICING object
} else if (model.includes("gemini")) {
vendor =
model.includes("flash") || model.includes("pro")
? "google generative ai"
: "google vertex";
} else if (
model.includes("llama") ||
model.includes("mixtral") ||
model.includes("gemma2")
) {
vendor = "groq";
}
} else if (vendor === "litellm") {
let correctModel = model;
if (model.includes("gpt") || model.includes("o1")) {
if (model.includes("gpt-4o-mini")) {
Expand Down

0 comments on commit 68075a0

Please sign in to comment.