feed

package
v0.0.0-...-e9d77fd Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KeySeparator     = []byte("|")
	KeyVerIdentifier = []byte("v2")
)

Functions

This section is empty.

Types

type Feed

type Feed struct {
	Link          string
	TitleOverride string
}

Feed rss or atom feed with an optional replacement title.

type Item

type Item struct {
	FeedTitle string
	FeedURL   string
	Title     string
	Link      string
	Content   string
	Summary   string
	Published time.Time
}

Item an item from a feed and the feed it was parsed from.

func (*Item) GenerateSummary

func (i *Item) GenerateSummary(cfg *c.Config) error

func (*Item) GetKey

func (i *Item) GetKey() []byte

GetKey get the key that should be used for uniquely identifying this feed item suitable for use in a KV store.

type OllamaRequest

type OllamaRequest struct {
	Model  string `json:"model"`
	Stream bool   `json:"stream"`
	Prompt string `json:"prompt"`
}

type OllamaResponse

type OllamaResponse struct {
	Response           string `json:"response"`
	Done               bool   `json:"done"`
	DoneReason         string `json:"done_reason"`
	TotalDuration      uint64 `json:"total_duration"`
	LoadDuration       uint64 `json:"load_duration"`
	PromptEvalDuration uint64 `json:"prompt_eval_duration"`
	EvalCount          uint64 `json:"eval_count"`
	EvalDuration       uint64 `json:"eval_duration"`
}

type SortedFeedItems

type SortedFeedItems []*Item

sortedFeedItems utility functions to sort a list of Item.

func (SortedFeedItems) Len

func (i SortedFeedItems) Len() int

func (SortedFeedItems) Less

func (i SortedFeedItems) Less(x, y int) bool

func (SortedFeedItems) Swap

func (i SortedFeedItems) Swap(x, y int)

Jump to

Keyboard shortcuts

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