Documentation ¶
Index ¶
- func ToContentRepo(req []Content) (res []repository.Content)
- func ToWebServicePromtGPTMsgRequest(req []MessageRequest) (res []gpt4_webservice.MessageReq)
- func ToWebServiceUserPromtGPTContentRequest(req []Content) (res []gpt4_webservice.Content)
- type Choices
- type Content
- type GPT4PromptResponse
- type ImageURL
- type Message
- type MessageRequest
- type ServicePromGPTResponse
- type ServicePromptRequest
- type Usage
- type UserPromGPTResponse
- type UserPromtGPTRequest
- type UserTokenUsage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToContentRepo ¶
func ToContentRepo(req []Content) (res []repository.Content)
func ToWebServicePromtGPTMsgRequest ¶
func ToWebServicePromtGPTMsgRequest(req []MessageRequest) (res []gpt4_webservice.MessageReq)
func ToWebServiceUserPromtGPTContentRequest ¶
func ToWebServiceUserPromtGPTContentRequest(req []Content) (res []gpt4_webservice.Content)
Types ¶
type Choices ¶
func ToCoreChoices ¶
func ToCoreChoices(c []gpt4_webservice.Choices) []Choices
type GPT4PromptResponse ¶
type GPT4PromptResponse struct { ID string `json:"id"` Object string `json:"object"` Created float64 `json:"created"` Model string `json:"model"` Choices []Choices `json:"choices"` Usage Usage `json:"usage"` }
func ToCoreGPT4PromptResponse ¶
func ToCoreGPT4PromptResponse(p gpt4_webservice.GPT4PromptResponseDao) GPT4PromptResponse
type MessageRequest ¶
type ServicePromGPTResponse ¶
type ServicePromGPTResponse struct { GPT4PromptResponse UserID string `json:"user_id"` }
type ServicePromptRequest ¶
type Usage ¶
type Usage struct { CompletionTokens int `json:"completion_tokens"` PromptTokens int `json:"prompt_tokens"` TotalTokens int `json:"total_tokens"` }
func ToCoreUsage ¶
func ToCoreUsage(u gpt4_webservice.Usage) Usage
type UserPromGPTResponse ¶
type UserPromGPTResponse struct { GPT4PromptResponse UserID string `json:"user_id"` }
type UserPromtGPTRequest ¶
type UserTokenUsage ¶
Click to show internal directories.
Click to hide internal directories.