MCPcopy Index your code
hub / github.com/SMNETSTUDIO/Groq2API / InitAuth

Function InitAuth

initialize/auth.go:11–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9)
10
11func InitAuth() {
12 var Secrets []*groq.Account
13 // Read accounts.txt and create a list of accounts
14 if _, err := os.Stat("session_tokens.txt"); err == nil {
15 // Each line is a proxy, put in proxies array
16 file, _ := os.Open("session_tokens.txt")
17 defer file.Close()
18 scanner := bufio.NewScanner(file)
19 for scanner.Scan() {
20 // Split by :
21 token := scanner.Text()
22 if len(token) == 0 {
23 continue
24 }
25 // Append to accounts
26 Secrets = append(Secrets, groq.NewAccount(token, ""))
27 }
28 }
29
30 global.AccountPool = accountpool.NewAccounts(Secrets)
31}

Callers 2

mainFunction · 0.92
initFunction · 0.92

Calls 1

NewAccountsFunction · 0.92

Tested by

no test coverage detected