MCPcopy Create free account
hub / github.com/SMNETSTUDIO/Groq2API / Get

Method Get

pkg/accountpool/accounts.go:13–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13func (a *IAccounts) Get() *groq.Account {
14 a.mx.Lock()
15 defer a.mx.Unlock()
16 if len(a.Accounts) == 0 {
17 return nil
18 }
19 account := a.Accounts[0]
20 a.Accounts = append(a.Accounts[1:], account)
21 return account
22}
23
24func NewAccounts(accounts []*groq.Account) *IAccounts {
25 return &IAccounts{Accounts: accounts}

Callers 3

setResponseHeaderMethod · 0.80
chatFunction · 0.80
modelsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected