-
Notifications
You must be signed in to change notification settings - Fork 4
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
Include usage stats #19
Conversation
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.
Just one minor change to a comment header, please. Otherwise, looking great!
@@ -0,0 +1,17 @@ | |||
// |
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.
Please remove this comment header. These comment headers that repeat the name of the file are just noise and don't add any value to the code.
// StreamOptions.swift | ||
// | ||
// | ||
// Created by Ronald Mannak on 5/6/24. |
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.
Feel free to leave this Created by line though. :)
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.
@btfranklin Done!
OpenAI added usage stats to streaming chat completions today. This PR adds a new
usage
stats property to StreamableChatThread that will be set ifcompletion
is called with argumentincludeUsage
to true.Additionally, I've added a
completeIncludeUsage
method to the asyncChatThread
that returns a tuple of the completion and the usage.