Spaces:
Runtime error
Runtime error
feat: added OpenAIError
Browse files- src/services/api/openai.ts +10 -0
src/services/api/openai.ts
CHANGED
@@ -8,3 +8,13 @@ export const createClient = (apiKey: string): OpenAIApi => {
|
|
8 |
|
9 |
return new OpenAIApi(configuration);
|
10 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
return new OpenAIApi(configuration);
|
10 |
};
|
11 |
+
|
12 |
+
export interface OpenAIError extends Error {
|
13 |
+
response?: {
|
14 |
+
data?: {
|
15 |
+
error?: {
|
16 |
+
message: string;
|
17 |
+
};
|
18 |
+
};
|
19 |
+
};
|
20 |
+
}
|