From 1a8b8415caabf9e4f33fc2b095b31dd926376b47 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 21:03:02 +0000 Subject: [PATCH 1/2] fix(client): no panic on missing BaseURL (#121) --- internal/requestconfig/requestconfig.go | 4 ++++ 1 file changed, 4 insertions(+) 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 From d15abb00d6d92893bc71c933965d33e50035ca0d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 05:02:24 +0000 Subject: [PATCH 2/2] release: 0.1.0-alpha.37 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 2 +- internal/version.go | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) 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/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