Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ This SDK is more focused on working with OpenAI Platform, but also works with ot

Use `.relaxed` parsing option on Configuration, or see more details on the topic [here](#support-for-other-providers)

For example, you can route requests through Tuning Engines when your app uses a governed OpenAI-compatible endpoint for model access, policy checks, audit logs, traces, and usage/cost reporting:

```swift
let configuration = OpenAI.Configuration(
token: ProcessInfo.processInfo.environment["TUNING_ENGINES_API_KEY"],
host: "api.tuningengines.com",
basePath: "/v1",
parsingOptions: .relaxed
)
let openAI = OpenAI(configuration: configuration)
```

### Cancelling requests

For Swift Concurrency calls, you can simply cancel the calling task, and corresponding underlying `URLSessionDataTask` would get cancelled automatically.
Expand Down