@theia/ai-openai 1.58.3 → 1.59.0-next.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/lib/browser/openai-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/openai-frontend-application-contribution.js +11 -7
- package/lib/browser/openai-frontend-application-contribution.js.map +1 -1
- package/lib/browser/openai-preferences.d.ts.map +1 -1
- package/lib/browser/openai-preferences.js +29 -15
- package/lib/browser/openai-preferences.js.map +1 -1
- package/lib/common/openai-language-models-manager.d.ts +9 -2
- package/lib/common/openai-language-models-manager.d.ts.map +1 -1
- package/lib/node/openai-backend-module.d.ts.map +1 -1
- package/lib/node/openai-backend-module.js +2 -0
- package/lib/node/openai-backend-module.js.map +1 -1
- package/lib/node/openai-language-model.d.ts +29 -7
- package/lib/node/openai-language-model.d.ts.map +1 -1
- package/lib/node/openai-language-model.js +93 -103
- package/lib/node/openai-language-model.js.map +1 -1
- package/lib/node/openai-language-models-manager-impl.d.ts +2 -0
- package/lib/node/openai-language-models-manager-impl.d.ts.map +1 -1
- package/lib/node/openai-language-models-manager-impl.js +7 -2
- package/lib/node/openai-language-models-manager-impl.js.map +1 -1
- package/lib/node/openai-model-utils.spec.d.ts +4 -0
- package/lib/node/openai-model-utils.spec.d.ts.map +1 -0
- package/lib/node/openai-model-utils.spec.js +155 -0
- package/lib/node/openai-model-utils.spec.js.map +1 -0
- package/lib/node/openai-streaming-iterator.d.ts +21 -0
- package/lib/node/openai-streaming-iterator.d.ts.map +1 -0
- package/lib/node/openai-streaming-iterator.js +126 -0
- package/lib/node/openai-streaming-iterator.js.map +1 -0
- package/lib/node/openai-streaming-iterator.spec.d.ts +2 -0
- package/lib/node/openai-streaming-iterator.spec.d.ts.map +1 -0
- package/lib/node/openai-streaming-iterator.spec.js +208 -0
- package/lib/node/openai-streaming-iterator.spec.js.map +1 -0
- package/package.json +7 -7
- package/src/browser/openai-frontend-application-contribution.ts +9 -5
- package/src/browser/openai-preferences.ts +36 -15
- package/src/common/openai-language-models-manager.ts +10 -2
- package/src/node/openai-backend-module.ts +2 -0
- package/src/node/openai-language-model.ts +106 -108
- package/src/node/openai-language-models-manager-impl.ts +9 -3
- package/src/node/openai-model-utils.spec.ts +164 -0
- package/src/node/openai-streaming-iterator.spec.ts +254 -0
- package/src/node/openai-streaming-iterator.ts +124 -0
- package/lib/package.spec.d.ts +0 -1
- package/lib/package.spec.d.ts.map +0 -1
- package/lib/package.spec.js +0 -26
- package/lib/package.spec.js.map +0 -1
- package/src/package.spec.ts +0 -28
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2025 EclipseSource GmbH.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { expect } from 'chai';
|
|
18
|
+
import * as sinon from 'sinon';
|
|
19
|
+
import { StreamingAsyncIterator } from './openai-streaming-iterator';
|
|
20
|
+
import { ChatCompletionStream } from 'openai/lib/ChatCompletionStream';
|
|
21
|
+
import { CancellationTokenSource, CancellationError } from '@theia/core';
|
|
22
|
+
import { LanguageModelStreamResponsePart } from '@theia/ai-core';
|
|
23
|
+
import { EventEmitter } from 'events';
|
|
24
|
+
|
|
25
|
+
describe('StreamingAsyncIterator', () => {
|
|
26
|
+
let mockStream: ChatCompletionStream & EventEmitter;
|
|
27
|
+
let iterator: StreamingAsyncIterator;
|
|
28
|
+
let cts: CancellationTokenSource;
|
|
29
|
+
const consoleError = console.error;
|
|
30
|
+
|
|
31
|
+
beforeEach(() => {
|
|
32
|
+
mockStream = new EventEmitter() as ChatCompletionStream & EventEmitter;
|
|
33
|
+
mockStream.abort = sinon.stub();
|
|
34
|
+
|
|
35
|
+
cts = new CancellationTokenSource();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
afterEach(() => {
|
|
39
|
+
if (iterator) {
|
|
40
|
+
iterator.dispose();
|
|
41
|
+
}
|
|
42
|
+
cts.dispose();
|
|
43
|
+
console.error = consoleError;
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
function createIterator(withCancellationToken = false): StreamingAsyncIterator {
|
|
47
|
+
return new StreamingAsyncIterator(mockStream, withCancellationToken ? cts.token : undefined);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
it('should yield messages in the correct order when consumed immediately', async () => {
|
|
51
|
+
iterator = createIterator();
|
|
52
|
+
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: 'Hello' } }] });
|
|
55
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: ' ' } }] });
|
|
56
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: 'World' } }] });
|
|
57
|
+
mockStream.emit('end');
|
|
58
|
+
}, 10);
|
|
59
|
+
|
|
60
|
+
const results: LanguageModelStreamResponsePart[] = [];
|
|
61
|
+
|
|
62
|
+
while (true) {
|
|
63
|
+
const { value, done } = await iterator.next();
|
|
64
|
+
if (done) {
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
results.push(value);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
expect(results).to.deep.equal([
|
|
71
|
+
{ content: 'Hello' },
|
|
72
|
+
{ content: ' ' },
|
|
73
|
+
{ content: 'World' }
|
|
74
|
+
]);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('should buffer messages if consumer is slower (messages arrive before .next() is called)', async () => {
|
|
78
|
+
iterator = createIterator();
|
|
79
|
+
|
|
80
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: 'A' } }] });
|
|
81
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: 'B' } }] });
|
|
82
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: 'C' } }] });
|
|
83
|
+
mockStream.emit('end');
|
|
84
|
+
|
|
85
|
+
const results: string[] = [];
|
|
86
|
+
while (true) {
|
|
87
|
+
const { value, done } = await iterator.next();
|
|
88
|
+
if (done) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
results.push(value.content ?? '');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
expect(results).to.deep.equal(['A', 'B', 'C']);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('should resolve queued next() call when a message arrives (consumer is waiting first)', async () => {
|
|
98
|
+
iterator = createIterator();
|
|
99
|
+
|
|
100
|
+
const nextPromise = iterator.next();
|
|
101
|
+
|
|
102
|
+
setTimeout(() => {
|
|
103
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: 'Hello from queue' } }] });
|
|
104
|
+
mockStream.emit('end');
|
|
105
|
+
}, 10);
|
|
106
|
+
|
|
107
|
+
const first = await nextPromise;
|
|
108
|
+
expect(first.done).to.be.false;
|
|
109
|
+
expect(first.value.content).to.equal('Hello from queue');
|
|
110
|
+
|
|
111
|
+
const second = await iterator.next();
|
|
112
|
+
expect(second.done).to.be.true;
|
|
113
|
+
expect(second.value).to.be.undefined;
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it('should handle the end event correctly', async () => {
|
|
117
|
+
iterator = createIterator();
|
|
118
|
+
|
|
119
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: 'EndTest1' } }] });
|
|
120
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: 'EndTest2' } }] });
|
|
121
|
+
mockStream.emit('end');
|
|
122
|
+
|
|
123
|
+
const results: string[] = [];
|
|
124
|
+
while (true) {
|
|
125
|
+
const { value, done } = await iterator.next();
|
|
126
|
+
if (done) {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
results.push(value.content ?? '');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
expect(results).to.deep.equal(['EndTest1', 'EndTest2']);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
it('should reject pending .next() call with an error if error event occurs', async () => {
|
|
136
|
+
iterator = createIterator();
|
|
137
|
+
|
|
138
|
+
const pendingNext = iterator.next();
|
|
139
|
+
|
|
140
|
+
// Suppress console.error output
|
|
141
|
+
console.error = () => { };
|
|
142
|
+
|
|
143
|
+
const error = new Error('Stream error occurred');
|
|
144
|
+
mockStream.emit('error', error);
|
|
145
|
+
|
|
146
|
+
try {
|
|
147
|
+
await pendingNext;
|
|
148
|
+
expect.fail('The promise should have been rejected with an error.');
|
|
149
|
+
} catch (err) {
|
|
150
|
+
expect(err).to.equal(error);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it('should reject pending .next() call with a CancellationError if "abort" event occurs', async () => {
|
|
155
|
+
iterator = createIterator();
|
|
156
|
+
|
|
157
|
+
const pendingNext = iterator.next();
|
|
158
|
+
|
|
159
|
+
// Suppress console.error output
|
|
160
|
+
console.error = () => { };
|
|
161
|
+
|
|
162
|
+
mockStream.emit('abort');
|
|
163
|
+
|
|
164
|
+
try {
|
|
165
|
+
await pendingNext;
|
|
166
|
+
expect.fail('The promise should have been rejected with a CancellationError.');
|
|
167
|
+
} catch (err) {
|
|
168
|
+
expect(err).to.be.instanceOf(CancellationError);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it('should call stream.abort() when cancellation token is triggered', async () => {
|
|
173
|
+
iterator = createIterator(true);
|
|
174
|
+
|
|
175
|
+
cts.cancel();
|
|
176
|
+
|
|
177
|
+
sinon.assert.calledOnce(mockStream.abort as sinon.SinonSpy);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
it('should not lose unconsumed messages after disposal, but no new ones arrive', async () => {
|
|
181
|
+
iterator = createIterator();
|
|
182
|
+
|
|
183
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: 'Msg1' } }] });
|
|
184
|
+
mockStream.emit('chunk', { choices: [{ delta: { content: 'Msg2' } }] });
|
|
185
|
+
|
|
186
|
+
iterator.dispose();
|
|
187
|
+
|
|
188
|
+
let result = await iterator.next();
|
|
189
|
+
expect(result.done).to.be.false;
|
|
190
|
+
expect(result.value.content).to.equal('Msg1');
|
|
191
|
+
|
|
192
|
+
result = await iterator.next();
|
|
193
|
+
expect(result.done).to.be.false;
|
|
194
|
+
expect(result.value.content).to.equal('Msg2');
|
|
195
|
+
|
|
196
|
+
result = await iterator.next();
|
|
197
|
+
expect(result.done).to.be.true;
|
|
198
|
+
expect(result.value).to.be.undefined;
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
it('should reject all pending requests with an error if disposal occurs after stream error', async () => {
|
|
202
|
+
iterator = createIterator();
|
|
203
|
+
|
|
204
|
+
const pendingNext1 = iterator.next();
|
|
205
|
+
const pendingNext2 = iterator.next();
|
|
206
|
+
|
|
207
|
+
// Suppress console.error output
|
|
208
|
+
console.error = () => { };
|
|
209
|
+
|
|
210
|
+
const error = new Error('Critical error');
|
|
211
|
+
mockStream.emit('error', error);
|
|
212
|
+
|
|
213
|
+
try {
|
|
214
|
+
await pendingNext1;
|
|
215
|
+
expect.fail('expected to be rejected');
|
|
216
|
+
} catch (err) {
|
|
217
|
+
expect(err).to.equal(error);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
try {
|
|
221
|
+
await pendingNext2;
|
|
222
|
+
expect.fail('expected to be rejected');
|
|
223
|
+
} catch (err) {
|
|
224
|
+
expect(err).to.equal(error);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
it('should handle receiving a "message" event with role="tool"', async () => {
|
|
229
|
+
iterator = createIterator();
|
|
230
|
+
|
|
231
|
+
setTimeout(() => {
|
|
232
|
+
mockStream.emit('message', {
|
|
233
|
+
role: 'tool',
|
|
234
|
+
tool_call_id: 'tool-123',
|
|
235
|
+
content: ['Part1', 'Part2']
|
|
236
|
+
});
|
|
237
|
+
mockStream.emit('end');
|
|
238
|
+
}, 10);
|
|
239
|
+
|
|
240
|
+
const results: LanguageModelStreamResponsePart[] = [];
|
|
241
|
+
for await (const part of iterator) {
|
|
242
|
+
results.push(part);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
expect(results).to.have.lengthOf(1);
|
|
246
|
+
expect(results[0].tool_calls).to.deep.equal([
|
|
247
|
+
{
|
|
248
|
+
id: 'tool-123',
|
|
249
|
+
finished: true,
|
|
250
|
+
result: 'Part1Part2'
|
|
251
|
+
}
|
|
252
|
+
]);
|
|
253
|
+
});
|
|
254
|
+
});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2025 EclipseSource GmbH.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { LanguageModelStreamResponsePart } from '@theia/ai-core';
|
|
18
|
+
import { CancellationError, CancellationToken, Disposable, DisposableCollection } from '@theia/core';
|
|
19
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
20
|
+
import { ChatCompletionStream, ChatCompletionStreamEvents } from 'openai/lib/ChatCompletionStream';
|
|
21
|
+
|
|
22
|
+
type IterResult = IteratorResult<LanguageModelStreamResponsePart>;
|
|
23
|
+
|
|
24
|
+
export class StreamingAsyncIterator implements AsyncIterableIterator<LanguageModelStreamResponsePart>, Disposable {
|
|
25
|
+
protected readonly requestQueue = new Array<Deferred<IterResult>>();
|
|
26
|
+
protected readonly messageCache = new Array<LanguageModelStreamResponsePart>();
|
|
27
|
+
protected done = false;
|
|
28
|
+
protected terminalError: Error | undefined = undefined;
|
|
29
|
+
protected readonly toDispose = new DisposableCollection();
|
|
30
|
+
constructor(protected readonly stream: ChatCompletionStream, cancellationToken?: CancellationToken) {
|
|
31
|
+
this.registerStreamListener('error', error => {
|
|
32
|
+
console.error('Error in OpenAI chat completion stream:', error);
|
|
33
|
+
this.terminalError = error;
|
|
34
|
+
this.dispose();
|
|
35
|
+
});
|
|
36
|
+
this.registerStreamListener('abort', () => {
|
|
37
|
+
this.terminalError = new CancellationError();
|
|
38
|
+
this.dispose();
|
|
39
|
+
}, true);
|
|
40
|
+
this.registerStreamListener('message', message => {
|
|
41
|
+
if (message.role === 'tool') {
|
|
42
|
+
this.handleIncoming({
|
|
43
|
+
tool_calls: [{
|
|
44
|
+
id: message.tool_call_id,
|
|
45
|
+
finished: true,
|
|
46
|
+
result: Array.isArray(message.content) ? message.content.join('') : message.content
|
|
47
|
+
}]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
console.debug('Received Open AI message', JSON.stringify(message));
|
|
51
|
+
});
|
|
52
|
+
this.registerStreamListener('end', () => {
|
|
53
|
+
this.dispose();
|
|
54
|
+
}, true);
|
|
55
|
+
this.registerStreamListener('chunk', chunk => {
|
|
56
|
+
this.handleIncoming({ ...chunk.choices[0]?.delta });
|
|
57
|
+
});
|
|
58
|
+
if (cancellationToken) {
|
|
59
|
+
this.toDispose.push(cancellationToken.onCancellationRequested(() => stream.abort()));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<LanguageModelStreamResponsePart> { return this; }
|
|
64
|
+
|
|
65
|
+
next(): Promise<IterResult> {
|
|
66
|
+
if (this.messageCache.length && this.requestQueue.length) {
|
|
67
|
+
throw new Error('Assertion error: cache and queue should not both be populated.');
|
|
68
|
+
}
|
|
69
|
+
// Deliver all the messages we got, even if we've since terminated.
|
|
70
|
+
if (this.messageCache.length) {
|
|
71
|
+
return Promise.resolve({
|
|
72
|
+
done: false,
|
|
73
|
+
value: this.messageCache.shift()!
|
|
74
|
+
});
|
|
75
|
+
} else if (this.terminalError) {
|
|
76
|
+
return Promise.reject(this.terminalError);
|
|
77
|
+
} else if (this.done) {
|
|
78
|
+
return Promise.resolve({
|
|
79
|
+
done: true,
|
|
80
|
+
value: undefined
|
|
81
|
+
});
|
|
82
|
+
} else {
|
|
83
|
+
const toQueue = new Deferred<IterResult>();
|
|
84
|
+
this.requestQueue.push(toQueue);
|
|
85
|
+
return toQueue.promise;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
protected handleIncoming(message: LanguageModelStreamResponsePart): void {
|
|
90
|
+
if (this.messageCache.length && this.requestQueue.length) {
|
|
91
|
+
throw new Error('Assertion error: cache and queue should not both be populated.');
|
|
92
|
+
}
|
|
93
|
+
if (this.requestQueue.length) {
|
|
94
|
+
this.requestQueue.shift()!.resolve({
|
|
95
|
+
done: false,
|
|
96
|
+
value: message
|
|
97
|
+
});
|
|
98
|
+
} else {
|
|
99
|
+
this.messageCache.push(message);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
protected registerStreamListener<Event extends keyof ChatCompletionStreamEvents>(eventType: Event, handler: ChatCompletionStreamEvents[Event], once?: boolean): void {
|
|
104
|
+
if (once) {
|
|
105
|
+
this.stream.once(eventType, handler);
|
|
106
|
+
} else {
|
|
107
|
+
this.stream.on(eventType, handler);
|
|
108
|
+
}
|
|
109
|
+
this.toDispose.push({ dispose: () => this.stream.off(eventType, handler) });
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
dispose(): void {
|
|
113
|
+
this.done = true;
|
|
114
|
+
this.toDispose.dispose();
|
|
115
|
+
// We will be receiving no more messages. Any outstanding requests have to be handled.
|
|
116
|
+
if (this.terminalError) {
|
|
117
|
+
this.requestQueue.forEach(request => request.reject(this.terminalError));
|
|
118
|
+
} else {
|
|
119
|
+
this.requestQueue.forEach(request => request.resolve({ done: true, value: undefined }));
|
|
120
|
+
}
|
|
121
|
+
// Leave the message cache alone - if it was populated, then the request queue was empty, but we'll still try to deliver the messages if asked.
|
|
122
|
+
this.requestQueue.length = 0;
|
|
123
|
+
}
|
|
124
|
+
}
|
package/lib/package.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=package.spec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package.spec.d.ts","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":""}
|
package/lib/package.spec.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2024 EclipseSource GmbH and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
/* note: this bogus test file is required so that
|
|
17
|
-
we are able to run mocha unit tests on this
|
|
18
|
-
package, without having any actual unit tests in it.
|
|
19
|
-
This way a coverage report will be generated,
|
|
20
|
-
showing 0% coverage, instead of no report.
|
|
21
|
-
This file can be removed once we have real unit
|
|
22
|
-
tests in place. */
|
|
23
|
-
describe('ai-openai package', () => {
|
|
24
|
-
it('support code coverage statistics', () => true);
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=package.spec.js.map
|
package/lib/package.spec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF;;;;;;qBAMqB;AAErB,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAE/B,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC"}
|
package/src/package.spec.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2024 EclipseSource GmbH and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
/* note: this bogus test file is required so that
|
|
18
|
-
we are able to run mocha unit tests on this
|
|
19
|
-
package, without having any actual unit tests in it.
|
|
20
|
-
This way a coverage report will be generated,
|
|
21
|
-
showing 0% coverage, instead of no report.
|
|
22
|
-
This file can be removed once we have real unit
|
|
23
|
-
tests in place. */
|
|
24
|
-
|
|
25
|
-
describe('ai-openai package', () => {
|
|
26
|
-
|
|
27
|
-
it('support code coverage statistics', () => true);
|
|
28
|
-
});
|