OllamaGenerateRequest represents a request to the Ollama Generate API
| 148 | |
| 149 | // OllamaGenerateRequest represents a request to the Ollama Generate API |
| 150 | type 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 |
| 167 | func (r *OllamaGenerateRequest) ModelName(s *string) string { |
nothing calls this directly
no outgoing calls
no test coverage detected