Files
oikos/vendor/github.com/openai/openai-go/CONTRIBUTING.md
dtoro febc153b7f
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
ci / web (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled
fix: add involves edge from task to agent:nomos at creation
Plus sync vendor directory for Docker build compatibility.
2026-08-11 22:03:12 +02:00

1.5 KiB

Setting up the environment

To set up the repository, run:

$ ./scripts/bootstrap
$ ./scripts/lint

This will install all the required dependencies and build the SDK.

You can also install go 1.18+ manually.

Modifying/Adding code

Most of the SDK is generated code. Modifications to code will be persisted between generations, but may result in merge conflicts between manual patches and changes from the generator. The generator will never modify the contents of the lib/ and examples/ directories.

Adding and running examples

All files in the examples/ directory are not modified by the generator and can be freely edited or added to.

# add an example to examples/<your-example>/main.go

package main

func main() {
  // ...
}
$ go run ./examples/<your-example>

Using the repository from source

To use a local version of this library from source in another project, edit the go.mod with a replace directive. This can be done through the CLI with the following:

$ go mod edit -replace github.com/openai/openai-go=/path/to/openai-go

Running tests

Most tests require you to set up a mock server against the OpenAPI spec to run the tests.

# you will need npm installed
$ npx prism mock path/to/your/openapi.yml
$ ./scripts/test

Formatting

This library uses the standard gofmt code formatter:

$ ./scripts/format