Interface ModelProvider
- All Known Implementing Classes:
OllamaProvider
public interface ModelProvider
Abstraction over any LLM backend (Ollama, OpenAI, Anthropic, …).
Implement this interface to add a new provider.
-
Method Summary
Modifier and TypeMethodDescriptionchat(String model, List<ChatMessage> messages, List<ToolDefinition> tools) Send a chat request with optional tool definitions.getName()Provider name for display purposes.Fetch the list of available models from this provider.
-
Method Details
-
chat
Send a chat request with optional tool definitions.- Parameters:
model- provider-specific model name (e.g. "qwen2.5-coder:7b")messages- conversation history (must include the new user message)tools- tool definitions available to the model (may be empty)- Returns:
- the model's response
-
getName
String getName()Provider name for display purposes. -
listModels
-