Skip to content

Commit

Permalink
Release 3.0.14 (#307)
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 <[email protected]>

* 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 <[email protected]>

* minor

* minor (#282)

* add vercel ai pricing (#283)

* fix (#284)

* Fixes (#289)

* Add `Gemini` Cost table (#291)

* add gemini cost tables

* remove protobuf helper

* Fixing token counts if `output_tokens` is `0` + adding embedding cost tables (#292)

* make tracing endpoint `route.ts` oTel compatible backend. (#298)

* make tracing endpoint `route.ts` oTel compatible backend.

* handle null events

* fallback for status code

* remove console statement

* Upload csv feature (#265)

* all changes for upload csv feature

* upddated package.json.lock

* updated package.lock.json

* update package lock

* fixes

* validation

---------

Co-authored-by: Oluwadabira Akinwumi <[email protected]>
Co-authored-by: Karthik Kalyanaraman <[email protected]>

* Update package lock (#299)

* all changes for upload csv feature

* upddated package.json.lock

* updated package.lock.json

* update package lock

* fixes

* validation

* validation

---------

Co-authored-by: Oluwadabira Akinwumi <[email protected]>

* add proto files inside `next.config.mjs` and migrate protofiles to root level (#302)

* Support xAI (#306)

* support xai

* support xai

---------

Co-authored-by: dylan <[email protected]>
Co-authored-by: dylanzuber-scale3 <[email protected]>
Co-authored-by: Ali Waleed <[email protected]>
Co-authored-by: dabiras3 <[email protected]>
Co-authored-by: Oluwadabira Akinwumi <[email protected]>
  • Loading branch information
6 people authored Oct 22, 2024
1 parent b6ec4ff commit 2ddf8da
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 0 deletions.
16 changes: 16 additions & 0 deletions components/shared/vendor-metadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,22 @@ export function VendorLogo({
);
}

if (vendor.includes("xai")) {
const color = vendorColor("vercel");
return (
<Image
alt="XAI Logo"
src="/xai.png"
width={30}
height={30}
className={cn(
`${color} p-[3px]`,
variant === "circular" ? "rounded-full" : "rounded-md"
)}
/>
);
}

if (vendor.includes("embedchain")) {
const color = vendorColor("embedchain");
return (
Expand Down
7 changes: 7 additions & 0 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ export const OPENAI_PRICING: Record<string, CostTableEntry> = {

};

export const XAI_PRICING: Record<string, CostTableEntry> = {
"grok-beta": {
input: 0.005,
output: 0.015,
},
};

export const ANTHROPIC_PRICING: Record<string, CostTableEntry> = {
"claude-3-haiku": {
input: 0.00025,
Expand Down
10 changes: 10 additions & 0 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
OPENAI_PRICING,
PERPLEXITY_PRICING,
SpanStatusCode,
XAI_PRICING,
} from "./constants";

export function cn(...inputs: ClassValue[]) {
Expand Down Expand Up @@ -527,6 +528,8 @@ export function calculatePriceFromUsage(
vendor = "anthropic";
} else if (model.includes("mistral")) {
vendor = "mistral"; // Assuming there is a MISTRAL_PRICING object
} else if (model.includes("grok")) {
vendor = "xai";
} else if (model.includes("gemini")) {
vendor =
model.includes("flash") || model.includes("pro")
Expand Down Expand Up @@ -635,6 +638,8 @@ export function calculatePriceFromUsage(
costTable = AZURE_PRICING[correctModel];
} else if (vendor === "gemini") {
costTable = GEMINI_PRICING[model];
} else if (vendor === "xai") {
costTable = XAI_PRICING[model];
}
if (costTable) {
const total =
Expand Down Expand Up @@ -756,6 +761,11 @@ export function getVendorFromSpan(span: Span): string {
serviceName.includes("perplexity")
) {
vendor = "perplexity";
} else if (
span.name.includes("xai") ||
serviceName.includes("xai")
) {
vendor = "xai";
} else if (span.name.includes("openai") || serviceName.includes("openai")) {
vendor = "openai";
} else if (
Expand Down
155 changes: 155 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/xai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2ddf8da

Please sign in to comment.