Discover Packages
github.com/adrianliechti/llama
server
ollama
package
Version:
v0.0.0-...-016d517
Opens a new window with list of versions in this module.
Published: May 16, 2024
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type ChatRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
Stream *bool `json:"stream,omitempty"`
Format string `json:"format"`
Options map[string ]interface{} `json:"options"`
}
type ChatResponse struct {
Model string `json:"model"`
CreatedAt time .Time `json:"created_at"`
Message Message `json:"message"`
Done bool `json:"done"`
}
type EmbeddingRequest struct {
Model string `json:"model"`
Prompt string `json:"prompt"`
}
type EmbeddingResponse struct {
Embedding []float64 `json:"embedding"`
}
type Message struct {
Role MessageRole `json:"role"`
Content string `json:"content"`
Images []ImageData `json:"images,omitempty"`
}
type Model struct {
Name string `json:"name"`
Model string `json:"model"`
ModifiedAt time .Time `json:"modified_at"`
Size int64 `json:"size"`
Digest string `json:"digest"`
Details ModelDetails `json:"details,omitempty"`
}
type ModelDetails struct {
ParentModel string `json:"parent_model"`
Format string `json:"format"`
Family string `json:"family"`
Families []string `json:"families"`
ParameterSize string `json:"parameter_size"`
QuantizationLevel string `json:"quantization_level"`
}
type ModelList struct {
Models []Model `json:"models"`
}
type StatusError struct {
StatusCode int
Status string
ErrorMessage string `json:"error"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.