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

Function authSessionHandler

router/chat.go:18–27  ·  view source on GitHub ↗
(client tls_client.HttpClient, account *groq.Account, api_key string, proxy string)

Source from the content-addressed store, hash-verified

16)
17
18func authSessionHandler(client tls_client.HttpClient, account *groq.Account, api_key string, proxy string) error {
19 organization, err := groqHttp.GerOrganizationId(client, api_key, proxy)
20 if err != nil {
21 slog.Error("Failed to get organization id", "err", err)
22 return err
23 }
24 account.Organization = organization
25 global.Cache.Set(organization, api_key, 3*time.Minute)
26 return nil
27}
28
29func authRefreshHandler(client tls_client.HttpClient, account *groq.Account, api_key string, proxy string) error {
30 token, err := groqHttp.GetSessionToken(client, api_key, "")

Callers 2

chatFunction · 0.85
modelsFunction · 0.85

Calls 1

SetMethod · 0.80

Tested by

no test coverage detected