Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContentTypeText ContentType = "text" RoleUser Role = "user" RoleAssistant Role = "assistant" )
Functions ¶
This section is empty.
Types ¶
type ContentType ¶
type ContentType string
type ConversationJSONBody ¶
type ConversationResponse ¶
type ConversationResponse struct { Message Prompt `json:"message"` ConversationId string `json:"conversation_id"` Error error `json:"error,omitempty"` }
func GetConversationResponse ¶
func GetConversationResponse(content []byte) (*ConversationResponse, error)
func (*ConversationResponse) GetMessage ¶
func (r *ConversationResponse) GetMessage() *string
type Prompt ¶
type Prompt struct { Content PromptContent `json:"content"` Id string `json:"id"` Role Role `json:"role"` }
type PromptContent ¶
type PromptContent struct { ContentType ContentType `json:"content_type"` Parts []string `json:"parts"` }
type SessionResult ¶
Click to show internal directories.
Click to hide internal directories.