api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatRequest

type ChatRequest struct {
	Model       string  `json:"model"`
	Prompt      string  `json:"prompt"`
	System      string  `json:"system_prompt"`
	Temperature float64 `json:"temperature"`
	TopP        float64 `json:"top_p"`
	TopK        int     `json:"top_k"`
	MaxTokens   int     `json:"max_tokens"`
	Stream      bool    `json:"stream"` // If true, use WebSocket
}

ChatRequest is the payload sent by the UI to start generation

type ChatResponse

type ChatResponse struct {
	Content string `json:"content"`
	Done    bool   `json:"done"`
}

ChatResponse is a single chunk of generated text

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

ErrorResponse is a standard error wrapper

type ModelDownloadRequest

type ModelDownloadRequest struct {
	Url  string `json:"url"`
	Name string `json:"name"`
}

ModelDownloadRequest triggers a new download

Jump to

Keyboard shortcuts

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