From 9a7b565ce1d15fb100a95e537f85579912f2d5ad Mon Sep 17 00:00:00 2001 From: erhant Date: Thu, 14 Dec 2023 13:08:31 +0300 Subject: [PATCH] Quickfixes (#18) * tiny bugfix but important * version --- package.json | 2 +- src/client/client.ts | 2 +- src/client/core.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0aa440e..1cd7deb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firstbatch", - "version": "0.1.2", + "version": "0.1.3", "author": "FirstBatch Team ", "license": "MIT", "contributors": [ diff --git a/src/client/client.ts b/src/client/client.ts index 5515723..20d6462 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -113,7 +113,7 @@ export class FirstBatchClient { return await this.post('embeddings/update_state', { id: session.id, state: state, - batchType: batchType.toUpperCase(), // NOTE: api expects uppercased values for this field + batch_type: batchType.toUpperCase(), // NOTE: api expects uppercased values for this field }); } diff --git a/src/client/core.ts b/src/client/core.ts index 9f2cf54..cc60b16 100644 --- a/src/client/core.ts +++ b/src/client/core.ts @@ -164,7 +164,7 @@ export class FirstBatch extends FirstBatchClient { userAction.actionType.label ); - if (this.enableHistory) { + if (resp.success && this.enableHistory) { await this.addHistory(session, [contentId]); }