Skip to content

feat: add missing usage fields #435

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

torstenrudolf
Copy link

@torstenrudolf torstenrudolf commented Apr 4, 2025

Addresses issue #434

Q A
Bug fix? no
New feature? yes
BC breaks? no
Related Issue Fix #434

Note: Could not figure out how to run the tests. Please provide guidance @aallam

Describe your change

Add the missing fields to Usage.kt

What problem is this fixing?

See #434

Copy link
Owner

@aallam aallam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

/**
* Cached tokens present in the prompt.
*/
public val cachedTokens: Int? = null,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add @SerialName for all fields? thanks!

JsonPrimitive("response")
))
))
val schemaJson = JsonObject(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test serialization, add a new test function that uses a sample JSON response and verifies that serialization works correctly; here is an example.

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.

[Feature Request: Add missing usage fields]
2 participants