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
Copy file name to clipboardExpand all lines: docs/api-reference/packages/core/ai/openai-wrapper/classes/default.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
# Class: default
8
8
9
-
Defined in: [packages/core/ai/openai-wrapper.js:26](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L26)
9
+
Defined in: [packages/core/ai/openai-wrapper.js:26](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L26)
10
10
11
11
OpenAIWrapper is a simple wrapper around the OpenAI API to manage contexts and generate responses.
12
12
@@ -29,7 +29,7 @@ Make sure to set the OPENAI_API_KEY and OPENAI_MODEL environment variables befor
Defined in: [packages/core/ai/openai-wrapper.js:43](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L43)
32
+
Defined in: [packages/core/ai/openai-wrapper.js:43](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L43)
33
33
34
34
Creates an instance of OpenAIWrapper.
35
35
@@ -65,7 +65,7 @@ The base URL for the OpenAI API
65
65
66
66
> **get****baseURL**(): `string`\|`null`
67
67
68
-
Defined in: [packages/core/ai/openai-wrapper.js:63](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L63)
68
+
Defined in: [packages/core/ai/openai-wrapper.js:63](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L63)
69
69
70
70
Gets the base URL for the OpenAI API.
71
71
@@ -81,7 +81,7 @@ Gets the base URL for the OpenAI API.
81
81
82
82
> **get****client**(): `OpenAI`
83
83
84
-
Defined in: [packages/core/ai/openai-wrapper.js:88](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L88)
84
+
Defined in: [packages/core/ai/openai-wrapper.js:88](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L88)
85
85
86
86
Gets the OpenAI client instance.
87
87
@@ -97,7 +97,7 @@ Gets the OpenAI client instance.
Defined in: [packages/core/ai/openai-wrapper.js:96](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L96)
100
+
Defined in: [packages/core/ai/openai-wrapper.js:96](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L96)
101
101
102
102
Gets the default context.
103
103
@@ -109,7 +109,7 @@ Gets the default context.
109
109
110
110
> **set****context**(`context`): `void`
111
111
112
-
Defined in: [packages/core/ai/openai-wrapper.js:104](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L104)
112
+
Defined in: [packages/core/ai/openai-wrapper.js:104](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L104)
113
113
114
114
Sets the default context.
115
115
@@ -131,7 +131,7 @@ Sets the default context.
131
131
132
132
> **get****model**(): `string`
133
133
134
-
Defined in: [packages/core/ai/openai-wrapper.js:71](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L71)
134
+
Defined in: [packages/core/ai/openai-wrapper.js:71](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L71)
135
135
136
136
Gets the model.
137
137
@@ -143,7 +143,7 @@ Gets the model.
143
143
144
144
> **set****model**(`model`): `void`
145
145
146
-
Defined in: [packages/core/ai/openai-wrapper.js:79](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L79)
146
+
Defined in: [packages/core/ai/openai-wrapper.js:79](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L79)
147
147
148
148
Sets the model.
149
149
@@ -163,7 +163,7 @@ Sets the model.
163
163
164
164
> **addContext**(...`contexts`): `void`
165
165
166
-
Defined in: [packages/core/ai/openai-wrapper.js:115](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L115)
166
+
Defined in: [packages/core/ai/openai-wrapper.js:115](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L115)
167
167
168
168
Adds one or more context objects to the existing default context.
169
169
@@ -183,7 +183,7 @@ Adds one or more context objects to the existing default context.
183
183
184
184
> **chat**(`messages`): `Promise`\<`string`\>
185
185
186
-
Defined in: [packages/core/ai/openai-wrapper.js:173](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L173)
186
+
Defined in: [packages/core/ai/openai-wrapper.js:173](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L173)
187
187
188
188
Send a chat message to the OpenAI model with the loaded contexts.
189
189
@@ -205,7 +205,7 @@ Send a chat message to the OpenAI model with the loaded contexts.
205
205
206
206
> **loadContext**(`filePath`): `void`
207
207
208
-
Defined in: [packages/core/ai/openai-wrapper.js:151](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L151)
208
+
Defined in: [packages/core/ai/openai-wrapper.js:151](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L151)
209
209
210
210
Loads a context from a file and adds it to the default context as a system message.
211
211
@@ -225,7 +225,7 @@ Loads a context from a file and adds it to the default context as a system messa
225
225
226
226
> **loadContextsFromDir**(`pathDir`): `void`
227
227
228
-
Defined in: [packages/core/ai/openai-wrapper.js:126](https://github.com/GTPSHAX/modul-ajar-generator/blob/9db625383fe8ae8db846d4419c7c2eb1c653406a/packages/core/ai/openai-wrapper.js#L126)
228
+
Defined in: [packages/core/ai/openai-wrapper.js:126](https://github.com/GTPSHAX/modul-ajar-generator/blob/d4b0e01a4a3d86231cbebd8dec7d9bc8aedf2a93/packages/core/ai/openai-wrapper.js#L126)
0 commit comments