Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit 3a05e37

Browse files
Clément SirieixClément Sirieix
authored andcommitted
fix: apply review
1 parent 773dba5 commit 3a05e37

File tree

8 files changed

+33
-24
lines changed

8 files changed

+33
-24
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ dist-ssr
1515
*.local
1616

1717
.env
18-
examples
1918

2019
# Editor directories and files
2120
.vscode/*

openai.ts renamed to examples/openai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dotenv/config';
22
import OpenAI from 'openai';
33

4-
import { LiteralClient } from './src';
4+
import { LiteralClient } from '../src';
55

66
const literalClient = new LiteralClient();
77

prompt.ts renamed to examples/prompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'dotenv/config';
22

3-
import { LiteralClient } from './src';
3+
import { LiteralClient } from '../src';
44

55
const literalClient = new LiteralClient();
66

package-lock.json

Lines changed: 18 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@
5252
"zod-to-json-schema": "^3.23.0"
5353
},
5454
"dependencies": {
55-
"@langchain/openai": "^0.2.7",
5655
"axios": "^1.6.2",
5756
"form-data": "^4.0.0",
5857
"mustache": "^4.2.0",
5958
"uuid": "^9.0.1"
6059
},
6160
"peerDependencies": {
6261
"@ai-sdk/openai": "0.0.x",
62+
"@langchain/openai": "^0.2.7",
6363
"ai": "3.x",
6464
"langchain": "0.1.x",
6565
"llamaindex": "0.3.x",

src/instrumentation/langchain.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,6 @@ export class LiteralCallbackHandler extends BaseCallbackHandler {
513513
}
514514
}
515515
} catch (e) {
516-
console.error(e);
517516
console.log('Error in handleLLMEnd', e);
518517
}
519518
}

src/prompt-engineering/prompt.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class PromptFields extends Utils {
3434
type!: GenerationType;
3535
createdAt!: string;
3636
name!: string;
37-
url!: string;
3837
version!: number;
3938
url?: Maybe<string>;
4039
versionDesc?: Maybe<string>;

tests/api.test.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import { Dataset } from '../src/evaluation/dataset';
66
import { Score } from '../src/evaluation/score';
77
import { sleep } from './utils';
88

9-
describe('End to end tests for the SDK', function() {
9+
describe('End to end tests for the SDK', function () {
1010
let client: LiteralClient;
1111

12-
beforeAll(function() {
12+
beforeAll(function () {
1313
const url = process.env.LITERAL_API_URL;
1414
const apiKey = process.env.LITERAL_API_KEY;
1515

@@ -20,7 +20,7 @@ describe('End to end tests for the SDK', function() {
2020
client = new LiteralClient({ apiKey, apiUrl: url });
2121
});
2222

23-
it('should test user', async function() {
23+
it('should test user', async function () {
2424
const identifier = `test_user_${uuidv4()}`;
2525
const user = await client.api.createUser(identifier, { foo: 'bar' });
2626

@@ -47,7 +47,7 @@ describe('End to end tests for the SDK', function() {
4747
expect(deletedUser).toBeUndefined();
4848
});
4949

50-
it('should test generation', async function() {
50+
it('should test generation', async function () {
5151
const generation = await client.api.createGeneration({
5252
provider: 'test',
5353
model: 'test',
@@ -66,7 +66,7 @@ describe('End to end tests for the SDK', function() {
6666
expect(generations.data[0].id).toBe(generation.id);
6767
});
6868

69-
it('should test thread with a single argument', async function() {
69+
it('should test thread with a single argument', async function () {
7070
const thread = await client.api.upsertThread({
7171
threadId: uuidv4(),
7272
name: 'name',
@@ -90,14 +90,11 @@ describe('End to end tests for the SDK', function() {
9090

9191
await client.api.deleteThread(thread.id);
9292

93-
// We have to await 5 seconds for the thread to disappear from the cache
94-
await sleep(5000);
95-
9693
const deletedThread = await client.api.getThread(thread.id);
9794
expect(deletedThread).toBeNull();
9895
});
9996

100-
it('should test thread (deprecated)', async function() {
97+
it('should test thread (deprecated)', async function () {
10198
const thread = await client.api.upsertThread(
10299
uuidv4(),
103100
'name',
@@ -130,7 +127,7 @@ describe('End to end tests for the SDK', function() {
130127
expect(deletedThread).toBeNull();
131128
});
132129

133-
it('should test export thread', async function() {
130+
it('should test export thread', async function () {
134131
const thread = await client.api.upsertThread({
135132
threadId: uuidv4(),
136133
name: 'test',
@@ -166,7 +163,7 @@ describe('End to end tests for the SDK', function() {
166163
expect(deletedThread).toBeNull();
167164
});
168165

169-
it('should test run', async function() {
166+
it('should test run', async function () {
170167
const step = await client
171168
.run({
172169
name: 'test',
@@ -197,7 +194,7 @@ describe('End to end tests for the SDK', function() {
197194
expect(deletedStep).toBeNull();
198195
});
199196

200-
it('should test step', async function() {
197+
it('should test step', async function () {
201198
const thread = await client.thread({ id: uuidv4() });
202199
const step = await thread
203200
.step({
@@ -231,7 +228,7 @@ describe('End to end tests for the SDK', function() {
231228
expect(deletedStep).toBeNull();
232229
});
233230

234-
it('should test steps', async function() {
231+
it('should test steps', async function () {
235232
const thread = await client.thread({ id: uuidv4() });
236233

237234
const step = await thread
@@ -266,7 +263,7 @@ describe('End to end tests for the SDK', function() {
266263
await client.api.deleteThread(thread.id);
267264
});
268265

269-
it('should test score', async function() {
266+
it('should test score', async function () {
270267
const thread = await client.thread({ id: uuidv4() });
271268
const step = await thread
272269
.step({
@@ -306,7 +303,7 @@ describe('End to end tests for the SDK', function() {
306303
await client.api.deleteThread(thread.id);
307304
});
308305

309-
it('should test scores', async function() {
306+
it('should test scores', async function () {
310307
const thread = await client.thread({ id: uuidv4() });
311308
const step = await thread
312309
.step({

0 commit comments

Comments
 (0)