Architecture¶
The LLM Client is built modularly and uses proven design patterns.
System Overview¶
graph TD
User[User Code] --> Client[LLMClient]
Client --> Factory[ProviderFactory]
Factory --> P1[OpenAIProvider]
Factory --> P2[GroqProvider]
Factory --> P3[GeminiProvider]
Factory --> P4[OllamaProvider]
subgraph "Utilities"
Client --> Token[TokenCounter]
Client --> Config[LLMConfig]
end
Data Flow¶
- The user sends messages to the
LLMClient. - The
LLMClientuses theProviderFactoryto instantiate the correct provider. - The provider prepares the request for the specific API.
- The response is normalized and returned to the user.