Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtistSongPair ¶
type ExtractArtistAndSongBody ¶
type ExtractArtistAndSongBody struct {
VideoTitles []string `json:"videoTitles"`
}
type OpenAIClient ¶
type OpenAIClient struct {
AppContext *utils.AppContext
}
func NewOpenAIClient ¶
func NewOpenAIClient(appCtx *utils.AppContext) *OpenAIClient
func (*OpenAIClient) ExtractArtistAndSongFromVideoTitle ¶
func (c *OpenAIClient) ExtractArtistAndSongFromVideoTitle(videoTitles []string) ([]ArtistSongPair, error)
Prompts the OpenAI API with a list of video titles from which it will extract artist names and song titles
type OpenAIHandler ¶
type OpenAIHandler struct {
// contains filtered or unexported fields
}
func NewOpenAIHandler ¶
func NewOpenAIHandler(openAIService *OpenAIService) *OpenAIHandler
func (*OpenAIHandler) ExtractArtistAndSongFromVideoTitleHandler ¶
func (h *OpenAIHandler) ExtractArtistAndSongFromVideoTitleHandler(c *gin.Context)
type OpenAIService ¶
type OpenAIService struct {
OpenAIClient *OpenAIClient
}
func NewOpenAIService ¶
func NewOpenAIService(openAIClient *OpenAIClient) *OpenAIService
func (*OpenAIService) ExtractArtistAndSongFromVideoTitle ¶
func (s *OpenAIService) ExtractArtistAndSongFromVideoTitle(videoTitles []string) ([]ArtistSongPair, error)
Click to show internal directories.
Click to hide internal directories.