2acf7f7
test: make test less intermittent
Andrey Nering created
2acf7f7
test: make test less intermittent
Andrey Nering created
1aab862
test: add tests for stream with and without tool calls
Andrey Nering created
e00c28f
test: add test with tool
Andrey Nering created
d3c849b
chore: disable go-vcr's internal "sleep" to make tests much faster
Andrey Nering created
3340d64
test: setup go-vcr to start recording real providers interactions
Andrey Nering created
ef0ee71
fix: anthropic finish reason
Kujtim Hoxha created
7f1366b
refactor: use json valid function from `charmbracelet/x/json`
Andrey Nering created
fb35cdf
refactor: revert o use a single go module again
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
Copied generate script from `charmbracelet/x`.
Andrey Nering created
67ff539
chore: make each package its own go module
* `./ai` (previously root `/`) * `./examples` * `./providers/anthropic` * `./providers/openai`
Andrey Nering created
36e9eae
refactor: move root package into a sub-package `ai`
Andrey Nering created
87c1466
refactor: move json helper to live inside the `openai` package
Andrey Nering created
7712c19
refactor: use `cmp.Or` in more places
Andrey Nering created
1a32307
refactor: change provider options structs to be private / internal
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
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
Andrey Nering created
6580e7f
fix(examples): improve sdk examples
* Check errors where we weren't checking them * Exit with status 1 on errors
Andrey Nering created
bd29644
refactor: simplify code with `cmp.Or`
Andrey Nering created
7f1ec14
lint: temporarily disable some linters
Andrey Nering created
36ea7d1
lint: preallocate slices
Andrey Nering created
bca935d
lint: fix `errcheck` issues
Andrey Nering created
97790da
lint: fix uneeded conversion
Andrey Nering created
a40ebcf
lint: fix auto-fixable issues
Andrey Nering created
27c1052
chore: add basic taskfile
Andrey Nering created
1c22f39
ci: initial setup for lint
Andrey Nering created
68fa858
ci: initial setup for build
Andrey Nering created
e598546
chore: add `.editorconfig`
Andrey Nering created
62b1df6
chore: add `.gitignore`
Andrey Nering created
a306114
chore: add a `go.mod` and update imports
Andrey Nering created
e00d646
chore: small fix for anthropic tool choice
Kujtim Hoxha created
b416305
wip: update agent to use the new ai-sdk
Kujtim Hoxha created
a031cc0
chore: change callback signature
Kujtim Hoxha created
07120ff
chore: rename vars
Kujtim Hoxha created
66da55c
fix: fix openai tests
Kujtim Hoxha created
5b1abeb
chore: lint
Kujtim Hoxha created
bb49508
chore: change the provider interface
Kujtim Hoxha created
965e1cb
feat: anthropic provider
Kujtim Hoxha created
ab3ccec
chore: agent improvements
Kujtim Hoxha created
c884f0d
chore: small openai provider changes
Kujtim Hoxha created
6ab9581
chore: create new agent
Kujtim Hoxha created
133dbc7
chore: rename tool func
Kujtim Hoxha created
c943dd8
chore: test schema generation
Kujtim Hoxha created
fa6f616
feat: migrate tools
Kujtim Hoxha created
473175e
chore: lint
Kujtim Hoxha created
d8f2f21
feat: add new tool definitions
Kujtim Hoxha created
63ea21f
chore: move examples
Kujtim Hoxha created
13feb85
feat: streaming agent
Kujtim Hoxha created
2cf2b19
feat: tool repair and more stop conditions
Kujtim Hoxha created