This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add usage data to Completion and Embedding APIs (#39)
Also changed EditResult to use the new shared object
- Loading branch information
1 parent
83df513
commit 5e14d4f
Showing
5 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.theokanning.openai; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* The OpenAI resources used by a request | ||
*/ | ||
@Data | ||
public class Usage { | ||
/** | ||
* The number of prompt tokens used. | ||
*/ | ||
long promptTokens; | ||
|
||
/** | ||
* The number of completion tokens used. | ||
*/ | ||
long completionTokens; | ||
|
||
/** | ||
* The number of total tokens used | ||
*/ | ||
long totalTokens; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters