Skip to content

Commit

Permalink
Update embeddings-model-helper.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
cpollard0 authored and bigadsoleiman committed Dec 4, 2023
1 parent 43004cf commit d428dd1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ export abstract class EmbeddingsModelHelper {
static parseValue(value?: string) {
const retValue = {
provider: "",
dimentions: 0,
dimensions: 0,
name: "",
};

if (!value) return retValue;
const [provider, dimensionsStr, name] = value.split("::") ?? [];
let dimentions = parseInt(dimensionsStr);
if (isNaN(dimentions)) dimentions = 0;
let dimensions = parseInt(dimensionsStr);
if (isNaN(dimensions)) dimensions = 0;

return {
provider,
dimentions,
dimensions,
name,
};
}
Expand Down

0 comments on commit d428dd1

Please sign in to comment.