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]); }