-
Notifications
You must be signed in to change notification settings - Fork 31
AI Tracking Updates #634
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
AI Tracking Updates #634
Conversation
Add Bedrock and OpenAI methods fix npm scripts
| UnderscoreTokenUsage, | ||
| } from './api/metrics'; | ||
|
|
||
| export class LDAIConfigTracker { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to check the base PR, but this should be implementing an interface, and the interface is what the customer is aware of.
| outputTokens: number; | ||
| totalTokens: number; | ||
|
|
||
| constructor(data: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A type of some kind would be good here. Typescript is structural, so it just needs to have the stuff that we need to understand.
| prompt_tokens: number; | ||
| completion_tokens: number; | ||
|
|
||
| constructor(data: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to stop tagging now. But generally we want to avoid any, unless we really need to. Here we know several fields, so we should be able to say we need those.
| "name": "@launchdarkly/ai", | ||
| "version": "0.1.0", | ||
| "description": "LaunchDarkly AI SDK for Node.js", | ||
| "main": "dist/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the package name should follow our normal conventions, likely @launchdarkly/node-server-sdk-ai. I can see this might require some discussion.
Merge AI Tracking updates into overall model config branch.
durationOftrackOpenAIandtrackBedrockConverse.Requirements
Related issues
Provide links to any issues in this repository or elsewhere relating to this pull request.
Describe the solution you've provided
Provide a clear and concise description of what you expect to happen.
Describe alternatives you've considered
Provide a clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the pull request here.