Repository navigation
Releases: Kardbord/hfgo
Release list
v4.0.0-rc1
This is the first release candidate for v4, a ground-up redesign of the hfgo SDK. See #72 for the full motivation and design.
What's new
- Package rename: hfapigo → hfgo (github.com/Kardbord/hfgo/v4).
- Client-centric architecture: Replace package-level global state with immutable, concurrency-safe clients. Each client holds its own configuration and can be shared across goroutines without synchronization.
- Composable options: Override settings per-request without creating a new client. Precedence: request struct fields > request options > client options.
- Streaming: Server-Sent Events support for chat completions via ChatStream.
- Custom error types: APIError and SDKError with typed fields and helper methods (IsAuthenticationError(), IsRateLimitError(), etc.) for structured error handling.
- OpenSSF Best Practices: Active pursuit of OpenSSF Best Practices compliance.
Currently supported inference tasks
- Chat (streaming and non-streaming)
- Text Classification
- Token Classification
- Zero-Shot Text Classification
- Question Answering
- Fill Mask
- Summarization
- Translation
- Table Question Answering
Not yet supported:
Several inference tasks are not yet implemented. The RawService (client.Raw()) is available as an escape hatch for endpoints the SDK does not natively model yet.
Getting started
client := hfgo.NewClient(
hfgo.WithToken(token),
hfgo.WithModel("deepseek-ai/DeepSeek-R1"),
)
resp, err := client.Chat(hfgo.ChatRequest{...})Feedback
This is a release candidate — the API may change before the final v4.0.0 release. If you run into issues, have questions, or want to suggest improvements, please open an issue or comment on #72.
New Contributors
- @Lovlace777 made their first contribution in #86
- @titanniya542-spec made their first contribution in #97
- @github-actions[bot] made their first contribution in #143
Full Changelog
Changelog
- Bump golang.org/x/image from 0.20.0 to 0.21.0 by @dependabot[bot] in #46
- Bump golang.org/x/image from 0.21.0 to 0.22.0 by @dependabot[bot] in #47
- Bump golang.org/x/image from 0.22.0 to 0.23.0 by @dependabot[bot] in #48
- Bump golang.org/x/image from 0.23.0 to 0.24.0 by @dependabot[bot] in #49
- Url Hotfix (#57) by @Kardbord in #58
- Kick off v4 rewrite by @Kardbord in #62
- Next round of v4 updates by @Kardbord in #66
- Add text classification support and automate code review with Claude by @Kardbord in #67
- Sync changes from main into v4-draft by @Kardbord in #74
- Integration test workflow updates by @Kardbord in #75
- V4 draft sync by @Kardbord in #81
- ci: Workflow additions and updates by @Kardbord in #82
- ci(deps): bump actions/checkout from 4.2.2 to 6.0.2 by @dependabot[bot] in #83
- ci(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.3 by @dependabot[bot] in #84
- ci: Fixed allowed models list in code-review.yml by @Kardbord in #87
- ci: Simplify model default logic; remove "agent" config by @Kardbord in #88
- docs: fix broken link report by @Lovlace777 in #86
- ci(deps): bump github/codeql-action from 4.34.1 to 4.36.0 by @dependabot[bot] in #89
- ci: exclude link checker workflow from lychee scan by @titanniya542-spec in #97
- ci(deps): bump actions/checkout from 6.0.2 to 6.0.3 by @dependabot[bot] in #96
- ci(deps): bump devops-actions/actionlint from 0.1.3 to 0.1.12 by @dependabot[bot] in #91
- ci(deps): bump golangci/golangci-lint-action from 9.2.0 to 9.2.1 by @dependabot[bot] in #92
- ci(deps): bump github/codeql-action from 4.36.0 to 4.36.2 by @dependabot[bot] in #94
- ci(deps): bump anomalyco/opencode from 1.15.10 to 1.16.2 by @dependabot[bot] in #95
- ci(deps): bump codecov/codecov-action from 6.0.1 to 7.0.0 by @dependabot[bot] in #99
- ci(deps): bump anomalyco/opencode from 1.16.2 to 1.17.6 by @dependabot[bot] in #100
- ci(deps): bump actions/checkout from 6.0.3 to 7.0.0 by @dependabot[bot] in #101
- ci(deps): bump anomalyco/opencode from 1.17.6 to 1.17.9 by @dependabot[bot] in #102
- ci(deps): bump actions/setup-go from 6.4.0 to 6.5.0 by @dependabot[bot] in #106
- ci(deps): bump actions/cache/restore from 5.0.5 to 6.1.0 by @dependabot[bot] in #105
- ci(deps): bump actions/cache/save from 5.0.5 to 6.1.0 by @dependabot[bot] in #103
- ci(deps): bump anomalyco/opencode/github from 1.17.9 to 1.17.13 by @dependabot[bot] in #104
- ci(deps): bump golangci/golangci-lint-action from 9.2.1 to 9.3.0 by @dependabot[bot] in #107
- ci(deps): bump github/codeql-action/upload-sarif from 4.36.2 to 4.36.3 by @dependabot[bot] in #110
- ci(deps): bump github/codeql-action/upload-sarif from 4.36.3 to 4.37.3 by @dependabot[bot] in #114
- ci(deps): bump github/codeql-action/init from 4.36.2 to 4.37.3 by @dependabot[bot] in #115
- ci(deps): bump actions/stale from 10.3.0 to 10.4.0 by @dependabot[bot] in #113
- ci(deps): bump anomalyco/opencode/github from 1.17.13 to 1.18.5 by @dependabot[bot] in #112
- ci: Update integration tests trigger and workflow schedules by @Kardbord in #116
- fix: Make checkout ref conditional for push/schedule events by @Kardbord in #123
- ci(deps): bump actions/checkout from 7.0.0 to 7.0.1 by @dependabot[bot] in #121
- ci(deps): bump actions/setup-go from 6.5.0 to 7.0.0 by @dependabot[bot] in #118
- ci(deps): bump lycheeverse/lychee-action from 2.8.0 to 2.9.0 by @dependabot[bot] in #119
- ci(deps): bump golang/govulncheck-action from 1.0.4 to 1.1.0 by @dependabot[bot] in #122
- ci(deps): bump ossf/scorecard-action from 2.4.3 to 2.4.4 by @dependabot[bot] in #120
- fix(deps): bump github.com/stretchr/testify from 1.9.0 to 1.11.1 by @dependabot[bot] in #76
- ci: Run integration tests only if code changes are detected by @Kardbord in #125
- ci(deps): bump anomalyco/opencode/github from 1.18.5 to 1.18.7 by @dependabot[bot] in #124
- ci(deps): Bump codeql-action from 4.37.3 to 4.37.4 by @Kardbord in #133
- ci(deps): bump actions/stale from 10.4.0 to 11.0.0 by @dependabot[bot] in #130
- ci: Group dependabot updates with common parents together by @Kardbord in #134
- ci(deps): bump anomalyco/opencode/github from 1.18.7 to 1.18.10 by @dependabot[bot] in #129
- ci: Fix incorrect release-please config by @Kardbord in #135
- ci: Run build workflow on push to v4-draft by @Kardbord in #137
- ci: Fixed if-gate on validate-release-pr workflow by @Kardbord in #138
- ci: Fix failing validate-release-pr workflow; add --repo flag by @Kardbord in #139
- ci: fix validate-release-pr regex by @Kardbord in #140
- ci: Fix validate-release-pr regex and exempt release-please PRs from API diff gate by @Kardbord in #142
- ci: Update code review model to deepseek-v4-flash-latest by @Kardbord in #144
- ci: QoL updates by @Kardbord in #145
- docs: prefer dedicated tool calls over shell invocations by @Kardbord in #146
- ci: reliability + DRY refactor by @Kardbord in #147
- ci: add bootstrap checkout before local composite actions by @Kardbord in #149
- ci: Run codeql on v*-draft branches by @Kardbord in #151
- docs: Add Bruno collection with documentation and update AGENTS.md by @Kardbord in #153
- feat: Add support for the Fill Mask infernce task by @Kardbord in #154
- feat: add summarization task support by @Kardbord in #155
- refactor!: flatten inferen...
v3.1.2
Release v3.1.2
Changelog
- : Deprecate and retract v3, redirect to github.com/Kardbord/hfgo/v4 (@Kardbord)
Full Changelog
v3.1.1
Release v3.1.1
Changelog
- : Added README notice (@Kardbord)
- : Bump golang.org/x/image from 0.20.0 to 0.21.0 (#46) (@dependabot[bot])
- : Bump golang.org/x/image from 0.21.0 to 0.22.0 (#47) (@dependabot[bot])
- : Bump golang.org/x/image from 0.22.0 to 0.23.0 (#48) (@dependabot[bot])
- : Bump golang.org/x/image from 0.23.0 to 0.24.0 (#49) (@dependabot[bot])
- : Fixed README URLs (@Kardbord)
- : Updated API Base URL (@Kardbord)
Full Changelog
v3.1.0
Release v3.1.0
Changelog
- Bump golang.org/x/image from 0.18.0 to 0.19.0 (#43) (@dependabot[bot])
- Bump golang.org/x/image from 0.19.0 to 0.20.0 (#44) (@dependabot[bot])
- September '24 Maintenance (#45) (@Kardbord)
Full Changelog
v3.0.0
Release v3.0.0
Changelog
- Bump golang.org/x/image from 0.15.0 to 0.16.0 (#38) (@dependabot[bot])
- Bump golang.org/x/image from 0.16.0 to 0.17.0 (#39) (@dependabot[bot])
- Bump golang.org/x/image from 0.17.0 to 0.18.0 (#41) (@dependabot[bot])
- Fixed goreleaser arg (@Kardbord)
- Switched RecommendedTokenClassificationModel to a working model (#36) (@Kardbord)
- Updates to the Text Generation Endpoint (#42) (@Kardbord)
Full Changelog
v2.1.0
Release v2.1.0
Changelog
- Bump golang.org/x/image from 0.14.0 to 0.15.0 (#31) (@dependabot[bot])
- General Maintenance + Deprecate Conversational Endpoint (for now) (#32) (@Kardbord)
Full Changelog
v2.0.1
v2.0.0
Release v2.0.0
This release changes the module name and download URL. While the old URL should continue to redirect appropriately, it would be wise for users of this library to either replace all references to the old module name, or update their go.mod via the following command, where <VERSION> should be replaced with the desired version.
go mod edit -replace="github.com/TannerKvarfordt/hfapigo=github.com/Kardbord/hfapigo@<VERSION>"Changelog
- Bump github.com/google/go-cmp from 0.5.6 to 0.6.0 (#28) (@dependabot[bot])
- Bump golang.org/x/image from 0.10.0 to 0.11.0 (#25) (@dependabot[bot])
- Bump golang.org/x/image from 0.11.0 to 0.12.0 (#26) (@dependabot[bot])
- Bump golang.org/x/image from 0.12.0 to 0.13.0 (#27) (@dependabot[bot])
- Bump golang.org/x/image from 0.13.0 to 0.14.0 (#29) (@dependabot[bot])
- Bump golang.org/x/image from 0.9.0 to 0.10.0 (#24) (@dependabot[bot])
- Update workflows (#23) (@Kardbord)
- Updated package name (@Kardbord)
Full Changelog
v1.3.1
Release v1.3.1
Changelog
- Bump golang.org/x/image from 0.7.0 to 0.9.0 (@dependabot[bot])
- Switched recommended text generation model to a model that supports more than 1 return sequence (@TannerKvarfordt)
- fixed typo in ConversationalParameters json key (@TannerKvarfordt)
Full Changelog
v1.3.0
Release v1.3.0
Changelog
- Added diffuser docs to README (@TannerKvarfordt)
- Added huggingface.js to README (@TannerKvarfordt)
- Added image-to-text example stub (@TannerKvarfordt)
- Added image_to_text (@TannerKvarfordt)
- Finished image_to_text example (@TannerKvarfordt)