api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient

type ApiClient struct {
	// contains filtered or unexported fields
}

func NewApiClient

func NewApiClient(baseURL string) *ApiClient

func (*ApiClient) Generate

func (a *ApiClient) Generate(payloadBytes []byte) (*http.Response, error)

func (*ApiClient) OllamaModelNames

func (a *ApiClient) OllamaModelNames() ([]string, error)

func (*ApiClient) URL

func (a *ApiClient) URL(suffix string) string

type ResultMsg

type ResultMsg struct {
	Model     string `json:"model"`
	Prompt    string `json:"prompt"`
	CreatedAt string `json:"created_at"`
	Response  string `json:"response"`
	Done      bool   `json:"done"`
}

func (ResultMsg) String

func (r ResultMsg) String() string

type TagModel

type TagModel struct {
	Details struct {
		Format            string      `json:"format"`
		Family            string      `json:"family"`
		Families          interface{} `json:"families"`
		ParameterSize     string      `json:"parameter_size"`
		QuantizationLevel string      `json:"quantization_level"`
	} `json:"details"`
	Name       string `json:"name"`
	ModifiedAt string `json:"modified_at"`
	Digest     string `json:"digest"`
	Size       int64  `json:"size"`
}

type TagResponse

type TagResponse struct {
	Models []TagModel `json:"models"`
}

Jump to

Keyboard shortcuts

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