Skip to content

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