httphandler

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCompletionHandlers

func RegisterCompletionHandlers(router *http.ServeMux, prefix string, llamaInstance *llamacpp.Llama, middleware HTTPMiddlewareFuncs)

RegisterCompletionHandlers registers HTTP handlers for Completion operations

func RegisterEmbedHandlers

func RegisterEmbedHandlers(router *http.ServeMux, prefix string, llamaInstance *llamacpp.Llama, middleware HTTPMiddlewareFuncs)

RegisterEmbedHandlers registers HTTP handlers for Embed operations

func RegisterHandlers

func RegisterHandlers(router *http.ServeMux, prefix string, llamaInstance *llamacpp.Llama, middleware HTTPMiddlewareFuncs)

RegisterHandlers registers all llama HTTP handlers on the provided router with the given path prefix. The Llama instance must be non-nil.

func RegisterModelHandlers

func RegisterModelHandlers(router *http.ServeMux, prefix string, llamaInstance *llamacpp.Llama, middleware HTTPMiddlewareFuncs)

RegisterModelHandlers registers HTTP handlers for Model operations

func RegisterTokenizerHandlers

func RegisterTokenizerHandlers(router *http.ServeMux, prefix string, llamaInstance *llamacpp.Llama, middleware HTTPMiddlewareFuncs)

RegisterTokenizerHandlers registers HTTP handlers for Tokenize/Detokenize operations

Types

type HTTPMiddlewareFuncs

type HTTPMiddlewareFuncs []func(http.HandlerFunc) http.HandlerFunc

func (HTTPMiddlewareFuncs) Wrap

Jump to

Keyboard shortcuts

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