You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.
73
+
* Only set this option to `true` if you understand the risks and have appropriate mitigations in place.
74
+
*/
75
+
dangerouslyAllowBrowser?: boolean;
70
76
}
71
77
72
78
/** API Client for interfacing with the Groq API. */
@@ -86,6 +92,7 @@ export class Groq extends Core.APIClient {
86
92
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
87
93
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
88
94
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
95
+
* @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.
89
96
*/
90
97
constructor({
91
98
baseURL =Core.readEnv('GROQ_BASE_URL'),
@@ -104,6 +111,12 @@ export class Groq extends Core.APIClient {
'This is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew Groq({ dangerouslyAllowBrowser: true })',
0 commit comments