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

fix: standardize token count properties #367

Merged

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Token Count Property Standardization

This PR standardizes token count properties across the codebase and adds proper number type conversion.

Changes

  • Rename token count properties from prompt_tokens/completion_tokens to input_tokens/output_tokens
  • Add Number() conversion for token counts in trace utilities
  • Ensure consistent token property naming across all files

Files Changed

  • components/project/traces/conversation-row.tsx
  • lib/crewai_trace_util.ts
  • lib/dspy_trace_util.ts
  • lib/trace_util.ts

Testing

The changes have been tested locally to ensure proper token counting and type conversion.

Link to Devin run: https://preview.devin.ai/devin/28494df863c64c02b49edab465102056

- Rename token count properties from prompt_tokens/completion_tokens to input_tokens/output_tokens
- Add Number() conversion for token counts in trace utilities
- Ensure consistent token property naming across all files
- Replicate changes from langtrace-internal PR #267
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

@karthikscale3 karthikscale3 merged commit b58d90c into development Dec 12, 2024
@karthikscale3 karthikscale3 deleted the devin/1733618373-fix-token-count-properties branch December 12, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant