ai

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveCategory

func ResolveCategory(repo *store.Repository, aiTags []string, cats []*store.Category) string

Types

type AnalysisResult

type AnalysisResult struct {
	Summary   string   `json:"summary"`
	Tags      []string `json:"tags"`
	Platforms []string `json:"platforms"`
}

type BatchAnalyzer

type BatchAnalyzer struct {
	// contains filtered or unexported fields
}

func NewBatchAnalyzer

func NewBatchAnalyzer(svc *Service, s store.Store, gh *github.Client, concurrency int) *BatchAnalyzer

func (*BatchAnalyzer) Run

func (b *BatchAnalyzer) Run(ctx context.Context, repos []*store.Repository, opts BatchOpts) (*BatchResult, error)

type BatchOpts

type BatchOpts struct {
	Force      bool
	Limit      int
	OnProgress func(done, total int, curName string)
}

type BatchResult

type BatchResult struct {
	Total   int
	Success int
	Failed  int
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseURL, apiKey, model string) *Client

func (*Client) Complete

func (c *Client) Complete(ctx context.Context, messages []Message) (string, error)

type Message

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

type SearchHit

type SearchHit struct {
	Repo  *store.Repository
	Score float64
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(client *Client, gh *github.Client) *Service

func (*Service) AnalyzeRepository

func (s *Service) AnalyzeRepository(ctx context.Context, repo *store.Repository, readme string, cats []*store.Category) (*AnalysisResult, error)

func (*Service) Search

func (s *Service) Search(ctx context.Context, query string, repos []*store.Repository) ([]*SearchHit, error)

Jump to

Keyboard shortcuts

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