client

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	UpdatedAt     time.Time `db:"updated_at"`
	ID            string    `db:"id"`
	ChatTitle     string    `db:"title"`
	SystemMessage string    `db:"system_message"`
	ModelName     string    `db:"model_name"`
	IsAnonymous   bool      `db:"is_anonymous"`
	IsMultiModal  bool      `db:"is_multi_modal"`
}

func (Chat) Description

func (i Chat) Description() string

func (Chat) FilterValue

func (i Chat) FilterValue() string

func (Chat) Title

func (i Chat) Title() string

Implements the bubbletea.ListItem interface

type Gollama

type Gollama struct {
	API     api.OllamaAPI
	Program *tea.Program
	DB      *sqlx.DB
}
var GollamaInstance Gollama

func (*Gollama) Connect

func (g *Gollama) Connect(api api.OllamaAPI, program *tea.Program)

func (*Gollama) CreateChat

func (g *Gollama) CreateChat(chat Chat) error

creates a new chat in the sqlite database with the given Chat struct

func (*Gollama) DeleteChat added in v0.1.11

func (g *Gollama) DeleteChat(id string) error

deletes a chat from the sqlite database with the given ID

func (*Gollama) InitDB

func (g *Gollama) InitDB() error

Initializes the sqlite database

func (*Gollama) ListChats

func (g *Gollama) ListChats() ([]Chat, error)

queries the sqlite database for all chats, ordered by newest to oldest

func (*Gollama) Migrate

func (g *Gollama) Migrate() error

Jump to

Keyboard shortcuts

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