categorization

package
v0.0.0-...-3319ee1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const GPT_MSG_MAX_LEN = 2048

Variables

This section is empty.

Functions

func IsYoutubeUrlToSpecificVideo

func IsYoutubeUrlToSpecificVideo(request string) bool

returns true if url is youtube url to specific video

Types

type ChatGptTagsFetcher

type ChatGptTagsFetcher struct {
	OpenAiApiKey string
}

func (*ChatGptTagsFetcher) Fetch

func (fetcher *ChatGptTagsFetcher) Fetch(text string) ([]string, error)

makes request to chat gpt api about text and returns list of keywords

type KeyWordsFetcher

type KeyWordsFetcher interface {
	Fetch(text string) ([]string, error)
}

KeyWordsFetcher is an interface for fetching keywords from by a certain request

type Message

type Message struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

type YoutubeTagsFetcher

type YoutubeTagsFetcher struct {
	ApiKey string
}

func (*YoutubeTagsFetcher) Fetch

func (fetcher *YoutubeTagsFetcher) Fetch(request string) ([]string, error)

fetches list of tags from Youtube video request must be an url to Youtube video in format https://www.youtube.com/watch?v=... or https://youtu.be/...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL