llm

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package llm contains the logic for sending requests to the LLM.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chat

func Chat(conf *utils.AppConf, w io.Writer) error

Chat sends the user's prompt to the LLM and writes the response to the provided writer. It also handles tool calls and image data.

func DataURLOfImageFile

func DataURLOfImageFile(filePath string) string

DataURLOfImageFile reads an image file and returns a data URL.

func ExtractCodeBlock

func ExtractCodeBlock(text []byte) []byte

ExtractCodeBlock extracts the first code block from the given text. It returns the code block without the backticks.

func MGet added in v0.2.8

func MGet[V any](m any, key string, defaultValue V) V

Types

This section is empty.

Jump to

Keyboard shortcuts

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