utils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadImage added in v0.1.1

func DownloadImage(url string, token string) ([]byte, string, error)

func ImageToBase64 added in v0.1.1

func ImageToBase64(data []byte, ext string) string

Types

type Ai

type Ai struct {
	Commands map[string]Command `yaml:"commands"`
	Provider string             `yaml:"provider"`
	OpenAI   OpenAI             `yaml:"openai"`
	VertexAI VertexAI           `yaml:"vertexai"`
}

type Command

type Command struct {
	Description   string `yaml:"description"`
	System_prompt string `yaml:"system_prompt"`
}

type Config

type Config struct {
	System System `yaml:"system"`
	Ai     Ai     `yaml:"ai"`
}

Root structure of information read from config file

func NewConfig

func NewConfig(filename string) (*Config, error)

type OpenAI

type OpenAI struct {
	Model string `yaml:"model"`
}

type System

type System struct {
	Debug SystemDebug `yaml:"debug"`
}

type SystemDebug

type SystemDebug struct {
	Log_level string `yaml:"log_level"`
}

type VertexAI

type VertexAI struct {
	Model   string `yaml:"model"`
	Project string `yaml:"project"`
	Region  string `yaml:"region"`
}

Jump to

Keyboard shortcuts

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