NERDDISCO commited on
Commit
7288a2c
•
1 Parent(s): ac6bf17

feat: added OpenAIError

Browse files
Files changed (1) hide show
  1. 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
+ }