Skip to content

Commit

Permalink
Define token and url for zeroshot request
Browse files Browse the repository at this point in the history
  • Loading branch information
Robi9 committed Sep 19, 2023
1 parent 363583b commit 9ca5bb2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/nyaruka/goflow/assets"
"github.com/nyaruka/goflow/excellent/types"
"github.com/nyaruka/goflow/flows"
"github.com/nyaruka/goflow/flows/routers"
"github.com/nyaruka/goflow/flows/triggers"
"github.com/nyaruka/librato"
"github.com/nyaruka/mailroom/core/goflow"
Expand Down Expand Up @@ -84,6 +85,14 @@ func ResumeFlow(ctx context.Context, rt *runtime.Runtime, oa *models.OrgAssets,
return nil, errors.Wrapf(err, "unable to create session from output")
}

// set authentication token for zeroshot requests in goflow
apiToken := rt.Config.ZeroshotAPIToken
routers.SetToken(apiToken)

// set base url for zeroshot requests
baseURL := rt.Config.ZeroshotAPIUrl
routers.SetAPIURL(baseURL)

// resume our session
resumeStart := time.Now()
sprint, err := fs.Resume(resume)
Expand Down

0 comments on commit 9ca5bb2

Please sign in to comment.