OllamaChatRequest represents a request to the Ollama Chat API
| 103 | |
| 104 | // OllamaChatRequest represents a request to the Ollama Chat API |
| 105 | type OllamaChatRequest struct { |
| 106 | Model string `json:"model"` |
| 107 | Messages []OllamaMessage `json:"messages"` |
| 108 | Stream *bool `json:"stream,omitempty"` |
| 109 | Format any `json:"format,omitempty"` |
| 110 | Options *OllamaOptions `json:"options,omitempty"` |
| 111 | Tools []any `json:"tools,omitempty"` |
| 112 | |
| 113 | // Internal fields |
| 114 | Context context.Context `json:"-"` |
| 115 | Cancel context.CancelFunc `json:"-"` |
| 116 | } |
| 117 | |
| 118 | // ModelName implements the LocalAIRequest interface |
| 119 | func (r *OllamaChatRequest) ModelName(s *string) string { |
nothing calls this directly
no outgoing calls
no test coverage detected