Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToCreateGptMessageResPb ¶
func ToCreateGptMessageResPb(data CreateGptMessageRes) *v1.CreateGptMessageRes
Types ¶
type ChatgptChoiceMessageRes ¶
type ChatgptChoiceRes ¶
type ChatgptChoiceRes struct {
FinishReason string `json:"finish_reason"`
Index string `json:"index"`
Message *ChatgptChoiceMessageRes `json:"message"`
}
type ChatgptMessageReq ¶
type ChatgptUsageRes ¶
type CreateGptMessageReq ¶
type CreateGptMessageReq struct {
Model string `json:"model"`
Messages []*ChatgptMessageReq `json:"messages"`
}
func ToDomainCreateGptMessageReq ¶
func ToDomainCreateGptMessageReq(data interface{}) *CreateGptMessageReq
ToDomainExample 将pb结构体转换为domain包下的Example结构体
type CreateGptMessageRes ¶
type CreateGptMessageRes struct {
Id string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Model string `json:"model"`
Usage *ChatgptUsageRes `json:"usage"`
Choices []*ChatgptChoiceRes `json:"choices"`
Error ErrorRes `json:"error"`
}
Click to show internal directories.
Click to hide internal directories.