Documentation
¶
Overview ¶
Package gemini provides a client for Google's Gemini AI API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnifiedPrompt ¶
func UnifiedPrompt() string
UnifiedPrompt returns the streamlined prompt for timezone detection.
Types ¶
type Cache ¶ added in v1.1.0
type Cache interface {
APICall(key string, requestPayload []byte) ([]byte, bool)
SetAPICall(key string, requestPayload []byte, responseData []byte) error
}
Cache defines the cache operations needed by the Gemini client.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a Gemini API client.
type Logger ¶
type Logger interface {
Debug(msg string, args ...any)
Info(msg string, args ...any)
Warn(msg string, args ...any)
Error(msg string, args ...any)
}
Logger defines the logging interface needed by the Gemini client.
type Response ¶
type Response struct {
// Place larger alignment fields first (float64 = 8 bytes)
Latitude float64 `json:"latitude"` // GPS latitude coordinate
Longitude float64 `json:"longitude"` // GPS longitude coordinate
// Boolean field (1 byte, but usually padded)
SuspiciousMismatch bool `json:"suspicious_mismatch"` // Flag for suspicious location patterns
// Strings are pointers (8 bytes each on 64-bit), group them together
DetectedTimezone string `json:"detected_timezone"`
DetectedLocation string `json:"detected_location"`
ConfidenceLevel string `json:"confidence_level"` // "high", "medium", or "low"
DetectionReasoning string `json:"detection_reasoning"`
MismatchReason string `json:"mismatch_reason"` // Explanation if suspicious_mismatch is true
}
Response represents the Gemini API response structure.
Click to show internal directories.
Click to hide internal directories.