Documentation
¶
Index ¶
- func Migrate(db *gorm.DB) error
- type Author
- type FCMMessage
- type FCMService
- type GeminiService
- func (s *GeminiService) AddHistory(history models.GeminiHistoryModel) error
- func (s *GeminiService) CreateAgent(agent *models.GeminiAgent) error
- func (s *GeminiService) DeleteAgent(id string) error
- func (s *GeminiService) DeleteHistory(id string) error
- func (service *GeminiService) GenerateContent(ctx context.Context, input string, userHistories []map[string]any, ...) (string, error)
- func (s *GeminiService) GetAgent(id string) (*models.GeminiAgent, error)
- func (s *GeminiService) GetAgents(request http.Request) (paginate.Page, error)
- func (s *GeminiService) GetHistories(agentID *string, companyID *string) []models.GeminiHistoryModel
- func (s *GeminiService) RefreshHistories()
- func (s *GeminiService) SetResponseMIMEType(mimetype string)
- func (service *GeminiService) SetUpSystemInstruction(systemInstruction string)
- func (s *GeminiService) SetupAPIKey(apiKey string, skipHistory bool)
- func (s *GeminiService) SetupAgentID(agentID string)
- func (service *GeminiService) SetupModel(setTemperature float32, setTopK int32, setTopP float32, ...)
- func (s *GeminiService) SetupSessionCode(sessionCode string)
- func (s *GeminiService) UpdateAgent(id string, agent *models.GeminiAgent) error
- func (s *GeminiService) UpdateHistory(id string, history models.GeminiHistoryModel) error
- func (s *GeminiService) UploadToGemini(path, mimeType string) (string, error)
- type GoogleAPIService
- type Location
- type Photo
- type Place
- type PlacesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FCMMessage ¶
type FCMService ¶
type FCMService struct {
// contains filtered or unexported fields
}
func NewFCMService ¶
func NewFCMService(ctx *context.ERPContext, serverKey, credentialPath *string) *FCMService
func NewFCMServiceV2 ¶
func NewFCMServiceV2(ctx *golangCtx.Context, credentialPath *string) *FCMService
func (*FCMService) SendFCMMessage ¶
func (s *FCMService) SendFCMMessage(token, title, body string) error
func (*FCMService) SendFCMV2Message ¶
func (s *FCMService) SendFCMV2Message(token, title, body string, data map[string]string) error
func (*FCMService) SendFCMV2MessageByUserID ¶
func (s *FCMService) SendFCMV2MessageByUserID(userID, title, body string, data map[string]string) error
type GeminiService ¶
type GeminiService struct {
// contains filtered or unexported fields
}
func NewGeminiService ¶
func NewGeminiService(ctx *erpContext.ERPContext, apiKey string) *GeminiService
func (*GeminiService) AddHistory ¶
func (s *GeminiService) AddHistory(history models.GeminiHistoryModel) error
func (*GeminiService) CreateAgent ¶
func (s *GeminiService) CreateAgent(agent *models.GeminiAgent) error
func (*GeminiService) DeleteAgent ¶
func (s *GeminiService) DeleteAgent(id string) error
func (*GeminiService) DeleteHistory ¶
func (s *GeminiService) DeleteHistory(id string) error
func (*GeminiService) GenerateContent ¶
func (*GeminiService) GetAgent ¶
func (s *GeminiService) GetAgent(id string) (*models.GeminiAgent, error)
func (*GeminiService) GetHistories ¶
func (s *GeminiService) GetHistories(agentID *string, companyID *string) []models.GeminiHistoryModel
func (*GeminiService) RefreshHistories ¶
func (s *GeminiService) RefreshHistories()
func (*GeminiService) SetResponseMIMEType ¶
func (s *GeminiService) SetResponseMIMEType(mimetype string)
func (*GeminiService) SetUpSystemInstruction ¶
func (service *GeminiService) SetUpSystemInstruction(systemInstruction string)
func (*GeminiService) SetupAPIKey ¶
func (s *GeminiService) SetupAPIKey(apiKey string, skipHistory bool)
func (*GeminiService) SetupAgentID ¶
func (s *GeminiService) SetupAgentID(agentID string)
func (*GeminiService) SetupModel ¶
func (*GeminiService) SetupSessionCode ¶
func (s *GeminiService) SetupSessionCode(sessionCode string)
func (*GeminiService) UpdateAgent ¶
func (s *GeminiService) UpdateAgent(id string, agent *models.GeminiAgent) error
func (*GeminiService) UpdateHistory ¶
func (s *GeminiService) UpdateHistory(id string, history models.GeminiHistoryModel) error
func (*GeminiService) UploadToGemini ¶
func (s *GeminiService) UploadToGemini(path, mimeType string) (string, error)
type GoogleAPIService ¶
type GoogleAPIService struct {
// contains filtered or unexported fields
}
func NewGoogleAPIService ¶
func NewGoogleAPIService(ctx *context.ERPContext, apiKey string) *GoogleAPIService
func (*GoogleAPIService) SearchPlace ¶
func (s *GoogleAPIService) SearchPlace(keyword string) (*PlacesResponse, error)
func (*GoogleAPIService) SearchPlaceByCoordinate ¶
func (s *GoogleAPIService) SearchPlaceByCoordinate(latitude float64, longitude float64, maxResult int, radius float64) (*PlacesResponse, error)
func (*GoogleAPIService) SetPlacePhoto ¶
func (s *GoogleAPIService) SetPlacePhoto(placePhoto bool)
type Place ¶
type Place struct {
ID string `json:"id"`
FormattedAddress string `json:"formattedAddress"`
InternationalPhoneNumber string `json:"internationalPhoneNumber"`
Location Location `json:"location"`
DisplayName struct {
Text string `json:"text"`
} `json:"displayName"`
Photos []Photo `json:"photos"`
PhotoURL string `json:"photoUrl"`
}
type PlacesResponse ¶
type PlacesResponse struct {
Places []Place `json:"places"`
}
Click to show internal directories.
Click to hide internal directories.