1
0
This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
chatgpt-to-api/typings/chatgpt/response.go
2023-06-10 04:26:54 +08:00

44 lines
1.2 KiB
Go

package chatgpt
type ChatGPTResponse struct {
Message Message `json:"message"`
ConversationID string `json:"conversation_id"`
Error interface{} `json:"error"`
}
type Message struct {
ID string `json:"id"`
Author Author `json:"author"`
CreateTime float64 `json:"create_time"`
UpdateTime interface{} `json:"update_time"`
Content Content `json:"content"`
EndTurn interface{} `json:"end_turn"`
Weight float64 `json:"weight"`
Metadata Metadata `json:"metadata"`
Recipient string `json:"recipient"`
}
type Content struct {
ContentType string `json:"content_type"`
Parts []string `json:"parts"`
}
type Author struct {
Role string `json:"role"`
Name interface{} `json:"name"`
Metadata map[string]interface{} `json:"metadata"`
}
type Metadata struct {
Timestamp string `json:"timestamp_"`
MessageType string `json:"message_type"`
FinishDetails *FinishDetails `json:"finish_details"`
ModelSlug string `json:"model_slug"`
Recipient string `json:"recipient"`
}
type FinishDetails struct {
Type string `json:"type"`
Stop string `json:"stop"`
}