Refactor: modularize and streamline LLM providers and utility functions

- Migrate `compress_image.go` to `internal/imageutil` for better encapsulation.
- Reorganize LLM provider implementations into distinct packages (`google`, `openai`, and `anthropic`).
- Replace `go_llm` package name with `llm`.
- Refactor internal APIs for improved clarity, including renaming `anthropic` to `anthropicImpl` and `google` to `googleImpl`.
- Add helper methods and restructure message handling for better separation of concerns.
This commit is contained in:
2026-01-24 15:40:38 -05:00
parent be99af3597
commit bf7c86ab2a
18 changed files with 411 additions and 350 deletions

View File

@@ -0,0 +1,11 @@
// Package anthropic provides the Anthropic LLM provider.
package anthropic
import (
llm "gitea.stevedudenhoeffer.com/steve/go-llm"
)
// New creates a new Anthropic LLM provider with the given API key.
func New(key string) llm.LLM {
return llm.Anthropic(key)
}