diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a696b6a7..154a6970 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.36" + ".": "0.1.0-alpha.37" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bacdf631..f2be2b93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.37 (2024-11-12) + +Full Changelog: [v0.1.0-alpha.36...v0.1.0-alpha.37](https://github.com/openai/openai-go/compare/v0.1.0-alpha.36...v0.1.0-alpha.37) + +### Bug Fixes + +* **client:** no panic on missing BaseURL ([#121](https://github.com/openai/openai-go/issues/121)) ([1a8b841](https://github.com/openai/openai-go/commit/1a8b8415caabf9e4f33fc2b095b31dd926376b47)) + ## 0.1.0-alpha.36 (2024-11-11) Full Changelog: [v0.1.0-alpha.35...v0.1.0-alpha.36](https://github.com/openai/openai-go/compare/v0.1.0-alpha.35...v0.1.0-alpha.36) diff --git a/README.md b/README.md index 17586301..4edcf3f7 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Or to pin the version: ```sh -go get -u 'github.com/openai/openai-go@v0.1.0-alpha.36' +go get -u 'github.com/openai/openai-go@v0.1.0-alpha.37' ``` diff --git a/internal/requestconfig/requestconfig.go b/internal/requestconfig/requestconfig.go index 62e79567..1e461934 100644 --- a/internal/requestconfig/requestconfig.go +++ b/internal/requestconfig/requestconfig.go @@ -301,6 +301,10 @@ func retryDelay(res *http.Response, retryCount int) time.Duration { } func (cfg *RequestConfig) Execute() (err error) { + if cfg.BaseURL == nil { + return fmt.Errorf("requestconfig: base url is not set") + } + cfg.Request.URL, err = cfg.BaseURL.Parse(strings.TrimLeft(cfg.Request.URL.String(), "/")) if err != nil { return err diff --git a/internal/version.go b/internal/version.go index db5fd45d..8366a3cc 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.1.0-alpha.36" // x-release-please-version +const PackageVersion = "0.1.0-alpha.37" // x-release-please-version