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

Struct OllamaChatRequest

core/schema/ollama.go:105–116  ·  view source on GitHub ↗

OllamaChatRequest represents a request to the Ollama Chat API

Source from the content-addressed store, hash-verified

103
104// OllamaChatRequest represents a request to the Ollama Chat API
105type 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
119func (r *OllamaChatRequest) ModelName(s *string) string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected