Skip to content

Commit

Permalink
update readme accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
galkleinman committed Jan 24, 2024
1 parent 125ee0e commit 6ab7df0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,10 @@ import (
func main() {
ctx := context.Background()

traceloop := sdk.NewClient(config.Config{
BaseURL: "api.traceloop.com",
traceloop := sdk.NewClient(ctx, config.Config{
APIKey: os.Getenv("TRACELOOP_API_KEY"),
})
defer func() { traceloop.Shutdown(ctx) }()

traceloop.Initialize(ctx)
}
```

Expand Down Expand Up @@ -122,14 +119,11 @@ func main() {
ctx := context.Background()

// Initialize Traceloop
traceloop := sdk.NewClient(config.Config{
BaseURL: "api.traceloop.com",
traceloop := sdk.NewClient(ctx, config.Config{
APIKey: os.Getenv("TRACELOOP_API_KEY"),
})
defer func() { traceloop.Shutdown(ctx) }()

traceloop.Initialize(ctx)

// Call OpenAI like you normally would
resp, err := client.CreateChatCompletion(
context.Background(),
Expand Down

0 comments on commit 6ab7df0

Please sign in to comment.