-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1697e37
commit 9754c5c
Showing
5 changed files
with
157 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
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
95 changes: 95 additions & 0 deletions
95
src/main/java/com/github/WhiteMagic2014/gptApi/Chat/pojo/CreateChatCompletionResponse.java
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,95 @@ | ||
package com.github.WhiteMagic2014.gptApi.Chat.pojo; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
/** | ||
* @Description: CreateChatCompletionResponse | ||
* @author: magic chen | ||
* @date: 2024/4/29 16:44 | ||
**/ | ||
public class CreateChatCompletionResponse { | ||
|
||
private Date created; | ||
|
||
private Usage usage; | ||
|
||
private String model; | ||
|
||
private String id; | ||
|
||
private List<ChatCompletionChoice> choices; | ||
|
||
private String systemFingerprint; | ||
|
||
private String object; | ||
|
||
public Date getCreated() { | ||
return created; | ||
} | ||
|
||
public void setCreated(Date created) { | ||
this.created = created; | ||
} | ||
|
||
public Usage getUsage() { | ||
return usage; | ||
} | ||
|
||
public void setUsage(Usage usage) { | ||
this.usage = usage; | ||
} | ||
|
||
public String getModel() { | ||
return model; | ||
} | ||
|
||
public void setModel(String model) { | ||
this.model = model; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public List<ChatCompletionChoice> getChoices() { | ||
return choices; | ||
} | ||
|
||
public void setChoices(List<ChatCompletionChoice> choices) { | ||
this.choices = choices; | ||
} | ||
|
||
public String getSystemFingerprint() { | ||
return systemFingerprint; | ||
} | ||
|
||
public void setSystemFingerprint(String systemFingerprint) { | ||
this.systemFingerprint = systemFingerprint; | ||
} | ||
|
||
public String getObject() { | ||
return object; | ||
} | ||
|
||
public void setObject(String object) { | ||
this.object = object; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "CreateChatCompletionResponse{" + | ||
"created=" + created + | ||
", usage=" + usage + | ||
", model='" + model + '\'' + | ||
", id='" + id + '\'' + | ||
", choices=" + choices + | ||
", systemFingerprint='" + systemFingerprint + '\'' + | ||
", object='" + object + '\'' + | ||
'}'; | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
src/main/java/com/github/WhiteMagic2014/gptApi/Chat/pojo/Usage.java
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,48 @@ | ||
package com.github.WhiteMagic2014.gptApi.Chat.pojo; | ||
|
||
/** | ||
* @Description: token usage | ||
* @author: magic chen | ||
* @date: 2024/4/29 16:49 | ||
**/ | ||
public class Usage { | ||
|
||
private Long promptTokens; | ||
|
||
private Long completionTokens; | ||
|
||
private Long totalTokens; | ||
|
||
public Long getPromptTokens() { | ||
return promptTokens; | ||
} | ||
|
||
public void setPromptTokens(Long promptTokens) { | ||
this.promptTokens = promptTokens; | ||
} | ||
|
||
public Long getCompletionTokens() { | ||
return completionTokens; | ||
} | ||
|
||
public void setCompletionTokens(Long completionTokens) { | ||
this.completionTokens = completionTokens; | ||
} | ||
|
||
public Long getTotalTokens() { | ||
return totalTokens; | ||
} | ||
|
||
public void setTotalTokens(Long totalTokens) { | ||
this.totalTokens = totalTokens; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Usage{" + | ||
"promptTokens=" + promptTokens + | ||
", completionTokens=" + completionTokens + | ||
", totalTokens=" + totalTokens + | ||
'}'; | ||
} | ||
} |