Documentation
¶
Index ¶
- Constants
- Variables
- func CreateGenAIClient() error
- func GenerateContentFromFile(c context.Context, file *multipart.FileHeader) (*genai.GenerateContentResponse, error)
- func GetStories(userID string) ([]string, error)
- func LoadChatHistory(userID, sessionID string) ([]*genai.Content, error)
- func LoadMessages(sessionID string) ([]models.Message, error)
- func SaveFileData(userID, sessionID string, file *multipart.FileHeader) error
- func SaveMessage(userID, sessionID string, message models.Message) error
Constants ¶
View Source
const (
ModelName = "gemini-1.5-flash-001"
)
Variables ¶
View Source
var GenaiClient *genai.Client
Functions ¶
func CreateGenAIClient ¶
func CreateGenAIClient() error
func GenerateContentFromFile ¶
func GenerateContentFromFile( c context.Context, file *multipart.FileHeader, ) (*genai.GenerateContentResponse, error)
func GetStories ¶
func LoadChatHistory ¶
LoadChatHistory loads chat history from PostgreSQL database
func LoadMessages ¶
LoadMessage load messages from PostgreSQL database
func SaveFileData ¶
func SaveFileData(userID, sessionID string, file *multipart.FileHeader) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.