openai-go
openai-go copied to clipboard
Invalid Library v2 Installation Instruction
User Story:
- As "Engineer"
- I want "to be able to install the pinned version as it is described in the
README.mdfile" - So "I don't have to figure out what's wrong with the installation instruction"
Acceptance Criteria:
- The "Installation" instruction in the section "Or to pin the version:" is ready to be copied and run without any issues
Background:
- Currently when run as-is in the documentation it returns an error:
go get -u 'github.com/openai/[email protected]'
go: github.com/openai/[email protected]: invalid version: go.mod has post-v2 module path "github.com/openai/openai-go/v2" at revision v2.1.0
After executing the go mod tidy, the problem was resolved.
It seems that the problem lies in a version in the go.mod file that does not match the version specified by go get - u xxx@version
From what I've investigated it just requires a v2 suffix to be added in the package name go get -u 'github.com/openai/openai-go/[email protected]'