Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ai cost data moved from custom app to inline ps #27574

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugin-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"graphile-worker": "0.13.0",
"ioredis": "^4.27.6",
"ipaddr.js": "^2.1.0",
"js-big-decimal": "^2.2.0",
"kafkajs": "^2.2.0",
"kafkajs-snappy": "^1.1.0",
"lru-cache": "^6.0.0",
Expand Down
10 changes: 9 additions & 1 deletion plugin-server/pnpm-lock.yaml

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

55 changes: 55 additions & 0 deletions plugin-server/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1270,3 +1270,58 @@ export type AppMetric2Type = {
| 'fetch'
count: number
}

interface TextOperator {
operator: 'equals' | 'startsWith' | 'includes'
value: string
}

export interface ModelDetails {
matches: string[]
searchTerms: string[]
info: {
releaseDate: string
maxTokens?: number
description: string
tradeOffs: string[]
benchmarks: {
[key: string]: number
}
capabilities: string[]
strengths: string[]
weaknesses: string[]
recommendations: string[]
}
}

export type ModelDetailsMap = {
[key: string]: ModelDetails
}

export interface ModelRow {
model: TextOperator
cost: {
prompt_token: number
completion_token: number
}
showInPlayground?: boolean
targetUrl?: string
dateRange?: {
start: string
end: string
}
}

export interface ModelRow {
model: TextOperator
cost: {
prompt_token: number
completion_token: number
}
showInPlayground?: boolean
targetUrl?: string
dateRange?: {
start: string
end: string
}
}
Loading
Loading