MCPcopy
hub / github.com/mudler/LocalAI / OllamaGenerateRequest

Struct OllamaGenerateRequest

core/schema/ollama.go:150–164  ·  view source on GitHub ↗

OllamaGenerateRequest represents a request to the Ollama Generate API

Source from the content-addressed store, hash-verified

148
149// OllamaGenerateRequest represents a request to the Ollama Generate API
150type OllamaGenerateRequest struct {
151 Model string `json:"model"`
152 Prompt string `json:"prompt"`
153 System string `json:"system,omitempty"`
154 Stream *bool `json:"stream,omitempty"`
155 Raw bool `json:"raw,omitempty"`
156 Format any `json:"format,omitempty"`
157 Options *OllamaOptions `json:"options,omitempty"`
158 // Context from a previous generate call for continuation
159 Context []int `json:"context,omitempty"`
160
161 // Internal fields
162 Ctx context.Context `json:"-"`
163 Cancel context.CancelFunc `json:"-"`
164}
165
166// ModelName implements the LocalAIRequest interface
167func (r *OllamaGenerateRequest) ModelName(s *string) string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected