7f1366b
refactor: use json valid function from `charmbracelet/x/json`
Andrey Nering
created
fb35cdf
refactor: revert o use a single go module again
Click to expand commit body
I experimented with multiple Go modules, but the fact is that Go is smart
enough to strip out the uneeded modules from the user's `go.mod`, so this
is not in fact needed. Also, maintaining a single module is much easier.
Andrey Nering
created
ba1c1fd
refactor: move `providers/{openai|anthropic}` out of the `providers/` dir (#5)
Andrey Nering
created
5337bf2
ci: configure workflows to be package-by-package
Click to expand commit body
Copied generate script from `charmbracelet/x`.
Andrey Nering
created
67ff539
chore: make each package its own go module
1a32307
refactor: change provider options structs to be private / internal
Click to expand commit body
These struct types don't make sense to be part of the public API. They
are only used internally to map options to the actual provider SDKs.
Andrey Nering
created
2e53c78
refactor: move each provider into its own package
Click to expand commit body
Reasoning for this is:
1. Users can import only those they want, and the Go compiler won't
compile the external library the user don't need.
2. This simplify the API and makes it follow the Go conventions better:
* `ai.NewOpenAiProvider` -> `openai.New`
* `ai.WithOpenAiAPIKey` -> `openai.WithAPIKey`
* etc.
Andrey Nering
created
66fbbb0
refactor: json check func should not be part of the public api
Andrey Nering
created
67080cf
refactor: declare func types for agent callbacks