Skip to content

Commit

Permalink
migrate baidu provider to v2 api
Browse files Browse the repository at this point in the history
  • Loading branch information
cr7258 committed Nov 20, 2024
1 parent 6efb310 commit f17f0cc
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 205 deletions.
5 changes: 5 additions & 0 deletions plugins/wasm-go/extensions/ai-proxy/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ func (c *PluginConfig) Complete(log wrapper.Log) error {
providerConfig := c.GetProviderConfig()
err = providerConfig.SetApiTokensFailover(log, c.activeProvider)

if handler, ok := c.activeProvider.(provider.TickFuncHandler); ok {
tickPeriod, tickFunc := handler.GetTickFunc(log)
wrapper.RegisteTickFunc(tickPeriod, tickFunc)
}

return err
}

Expand Down
Loading

0 comments on commit f17f0cc

Please sign in to comment.