Socket
Socket
Sign inDemoInstall

chromadb

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chromadb - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

6

dist/main/generated/models/create-collection.d.ts

@@ -30,3 +30,9 @@ /**

'metadata'?: object;
/**
*
* @type {boolean}
* @memberof CreateCollection
*/
'get_or_create'?: boolean;
}
//# sourceMappingURL=create-collection.d.ts.map

@@ -30,3 +30,9 @@ /**

'where'?: object;
/**
*
* @type {object}
* @memberof DeleteEmbedding
*/
'where_document'?: object;
}
//# sourceMappingURL=delete-embedding.d.ts.map

@@ -32,2 +32,8 @@ /**

*
* @type {object}
* @memberof GetEmbedding
*/
'where_document'?: object;
/**
*
* @type {string}

@@ -49,3 +55,19 @@ * @memberof GetEmbedding

'offset'?: number;
/**
*
* @type {Array<string>}
* @memberof GetEmbedding
*/
'include'?: Array<GetEmbeddingIncludeEnum>;
}
/**
* @export
* @enum {string}
*/
export declare enum GetEmbeddingIncludeEnum {
Documents = "documents",
Embeddings = "embeddings",
Metadatas = "metadatas",
Distances = "distances"
}
//# sourceMappingURL=get-embedding.d.ts.map

@@ -16,2 +16,14 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.GetEmbeddingIncludeEnum = void 0;
/**
* @export
* @enum {string}
*/
var GetEmbeddingIncludeEnum;
(function (GetEmbeddingIncludeEnum) {
GetEmbeddingIncludeEnum["Documents"] = "documents";
GetEmbeddingIncludeEnum["Embeddings"] = "embeddings";
GetEmbeddingIncludeEnum["Metadatas"] = "metadatas";
GetEmbeddingIncludeEnum["Distances"] = "distances";
})(GetEmbeddingIncludeEnum = exports.GetEmbeddingIncludeEnum || (exports.GetEmbeddingIncludeEnum = {}));
//# sourceMappingURL=get-embedding.js.map

@@ -26,2 +26,8 @@ /**

*
* @type {object}
* @memberof QueryEmbedding
*/
'where_document'?: object;
/**
*
* @type {Array<any>}

@@ -37,3 +43,19 @@ * @memberof QueryEmbedding

'n_results'?: number;
/**
*
* @type {Array<string>}
* @memberof QueryEmbedding
*/
'include'?: Array<QueryEmbeddingIncludeEnum>;
}
/**
* @export
* @enum {string}
*/
export declare enum QueryEmbeddingIncludeEnum {
Documents = "documents",
Embeddings = "embeddings",
Metadatas = "metadatas",
Distances = "distances"
}
//# sourceMappingURL=query-embedding.d.ts.map

@@ -16,2 +16,14 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.QueryEmbeddingIncludeEnum = void 0;
/**
* @export
* @enum {string}
*/
var QueryEmbeddingIncludeEnum;
(function (QueryEmbeddingIncludeEnum) {
QueryEmbeddingIncludeEnum["Documents"] = "documents";
QueryEmbeddingIncludeEnum["Embeddings"] = "embeddings";
QueryEmbeddingIncludeEnum["Metadatas"] = "metadatas";
QueryEmbeddingIncludeEnum["Distances"] = "distances";
})(QueryEmbeddingIncludeEnum = exports.QueryEmbeddingIncludeEnum || (exports.QueryEmbeddingIncludeEnum = {}));
//# sourceMappingURL=query-embedding.js.map

11

dist/main/index.d.ts

@@ -6,4 +6,4 @@ import { DefaultApi } from "./generated/api";

private model;
constructor(openai_api_key: string, openai_model: string, openai_organization_id: string);
generate(texts: string[]): Promise<any[]>;
constructor(openai_api_key: string, openai_model?: string, openai_organization_id?: string);
generate(texts: string[]): Promise<number[][]>;
}

@@ -16,4 +16,3 @@ export declare class CohereEmbeddingFunction {

type CallableFunction = {
new (): CallableFunction;
generate(texts: string[]): number[][];
generate(texts: string[]): Promise<number[][]>;
};

@@ -25,6 +24,6 @@ export declare class Collection {

constructor(name: string, api: DefaultApi, embeddingFunction?: CallableFunction);
add(ids: string | string[], embeddings: number[] | number[][], metadatas?: object | object[], documents?: string | string[], increment_index?: boolean): Promise<any>;
add(ids: string | string[], embeddings: number[] | number[][] | undefined, metadatas?: object | object[], documents?: string | string[], increment_index?: boolean): Promise<any>;
count(): Promise<any>;
get(ids?: string[], where?: object, limit?: number, offset?: number): Promise<any>;
query(query_embeddings: number[] | number[][], n_results?: number, where?: object, query_text?: string | string[]): Promise<any>;
query(query_embeddings: number[] | number[][] | undefined, n_results?: number, where?: object, query_text?: string | string[]): Promise<any>;
peek(limit?: number): Promise<any>;

@@ -31,0 +30,0 @@ createIndex(): Promise<import("axios").AxiosResponse<any, any>>;

@@ -101,2 +101,4 @@ "use strict";

}
if (embeddings === undefined)
throw new Error("embeddings is undefined but shouldnt be");
const idsArray = toArray(ids);

@@ -175,2 +177,4 @@ const embeddingsArray = toArrayOfArrays(embeddings);

}
if (query_embeddings === undefined)
throw new Error("embeddings is undefined but shouldnt be");
const query_embeddingsArray = toArrayOfArrays(query_embeddings);

@@ -177,0 +181,0 @@ const response = await this.api.getNearestNeighbors({

@@ -30,3 +30,9 @@ /**

'metadata'?: object;
/**
*
* @type {boolean}
* @memberof CreateCollection
*/
'get_or_create'?: boolean;
}
//# sourceMappingURL=create-collection.d.ts.map

@@ -30,3 +30,9 @@ /**

'where'?: object;
/**
*
* @type {object}
* @memberof DeleteEmbedding
*/
'where_document'?: object;
}
//# sourceMappingURL=delete-embedding.d.ts.map

@@ -32,2 +32,8 @@ /**

*
* @type {object}
* @memberof GetEmbedding
*/
'where_document'?: object;
/**
*
* @type {string}

@@ -49,3 +55,19 @@ * @memberof GetEmbedding

'offset'?: number;
/**
*
* @type {Array<string>}
* @memberof GetEmbedding
*/
'include'?: Array<GetEmbeddingIncludeEnum>;
}
/**
* @export
* @enum {string}
*/
export declare enum GetEmbeddingIncludeEnum {
Documents = "documents",
Embeddings = "embeddings",
Metadatas = "metadatas",
Distances = "distances"
}
//# sourceMappingURL=get-embedding.d.ts.map

@@ -14,3 +14,13 @@ /* tslint:disable */

*/
export {};
/**
* @export
* @enum {string}
*/
export var GetEmbeddingIncludeEnum;
(function (GetEmbeddingIncludeEnum) {
GetEmbeddingIncludeEnum["Documents"] = "documents";
GetEmbeddingIncludeEnum["Embeddings"] = "embeddings";
GetEmbeddingIncludeEnum["Metadatas"] = "metadatas";
GetEmbeddingIncludeEnum["Distances"] = "distances";
})(GetEmbeddingIncludeEnum || (GetEmbeddingIncludeEnum = {}));
//# sourceMappingURL=get-embedding.js.map

@@ -26,2 +26,8 @@ /**

*
* @type {object}
* @memberof QueryEmbedding
*/
'where_document'?: object;
/**
*
* @type {Array<any>}

@@ -37,3 +43,19 @@ * @memberof QueryEmbedding

'n_results'?: number;
/**
*
* @type {Array<string>}
* @memberof QueryEmbedding
*/
'include'?: Array<QueryEmbeddingIncludeEnum>;
}
/**
* @export
* @enum {string}
*/
export declare enum QueryEmbeddingIncludeEnum {
Documents = "documents",
Embeddings = "embeddings",
Metadatas = "metadatas",
Distances = "distances"
}
//# sourceMappingURL=query-embedding.d.ts.map

@@ -14,3 +14,13 @@ /* tslint:disable */

*/
export {};
/**
* @export
* @enum {string}
*/
export var QueryEmbeddingIncludeEnum;
(function (QueryEmbeddingIncludeEnum) {
QueryEmbeddingIncludeEnum["Documents"] = "documents";
QueryEmbeddingIncludeEnum["Embeddings"] = "embeddings";
QueryEmbeddingIncludeEnum["Metadatas"] = "metadatas";
QueryEmbeddingIncludeEnum["Distances"] = "distances";
})(QueryEmbeddingIncludeEnum || (QueryEmbeddingIncludeEnum = {}));
//# sourceMappingURL=query-embedding.js.map

@@ -6,4 +6,4 @@ import { DefaultApi } from "./generated/api";

private model;
constructor(openai_api_key: string, openai_model: string, openai_organization_id: string);
generate(texts: string[]): Promise<any[]>;
constructor(openai_api_key: string, openai_model?: string, openai_organization_id?: string);
generate(texts: string[]): Promise<number[][]>;
}

@@ -16,4 +16,3 @@ export declare class CohereEmbeddingFunction {

type CallableFunction = {
new (): CallableFunction;
generate(texts: string[]): number[][];
generate(texts: string[]): Promise<number[][]>;
};

@@ -25,6 +24,6 @@ export declare class Collection {

constructor(name: string, api: DefaultApi, embeddingFunction?: CallableFunction);
add(ids: string | string[], embeddings: number[] | number[][], metadatas?: object | object[], documents?: string | string[], increment_index?: boolean): Promise<any>;
add(ids: string | string[], embeddings: number[] | number[][] | undefined, metadatas?: object | object[], documents?: string | string[], increment_index?: boolean): Promise<any>;
count(): Promise<any>;
get(ids?: string[], where?: object, limit?: number, offset?: number): Promise<any>;
query(query_embeddings: number[] | number[][], n_results?: number, where?: object, query_text?: string | string[]): Promise<any>;
query(query_embeddings: number[] | number[][] | undefined, n_results?: number, where?: object, query_text?: string | string[]): Promise<any>;
peek(limit?: number): Promise<any>;

@@ -31,0 +30,0 @@ createIndex(): Promise<import("axios").AxiosResponse<any, any>>;

@@ -96,2 +96,4 @@ import { DefaultApi } from "./generated/api";

}
if (embeddings === undefined)
throw new Error("embeddings is undefined but shouldnt be");
const idsArray = toArray(ids);

@@ -170,2 +172,4 @@ const embeddingsArray = toArrayOfArrays(embeddings);

}
if (query_embeddings === undefined)
throw new Error("embeddings is undefined but shouldnt be");
const query_embeddingsArray = toArrayOfArrays(query_embeddings);

@@ -172,0 +176,0 @@ const response = await this.api.getNearestNeighbors({

{
"name": "chromadb",
"version": "1.3.0",
"version": "1.3.1",
"description": "A JavaScript interface for chroma",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -35,3 +35,9 @@ /* tslint:disable */

'metadata'?: object;
/**
*
* @type {boolean}
* @memberof CreateCollection
*/
'get_or_create'?: boolean;
}

@@ -35,3 +35,9 @@ /* tslint:disable */

'where'?: object;
/**
*
* @type {object}
* @memberof DeleteEmbedding
*/
'where_document'?: object;
}

@@ -37,2 +37,8 @@ /* tslint:disable */

*
* @type {object}
* @memberof GetEmbedding
*/
'where_document'?: object;
/**
*
* @type {string}

@@ -54,3 +60,21 @@ * @memberof GetEmbedding

'offset'?: number;
/**
*
* @type {Array<string>}
* @memberof GetEmbedding
*/
'include'?: Array<GetEmbeddingIncludeEnum>;
}
/**
* @export
* @enum {string}
*/
export enum GetEmbeddingIncludeEnum {
Documents = 'documents',
Embeddings = 'embeddings',
Metadatas = 'metadatas',
Distances = 'distances'
}

@@ -31,2 +31,8 @@ /* tslint:disable */

*
* @type {object}
* @memberof QueryEmbedding
*/
'where_document'?: object;
/**
*
* @type {Array<any>}

@@ -42,3 +48,21 @@ * @memberof QueryEmbedding

'n_results'?: number;
/**
*
* @type {Array<string>}
* @memberof QueryEmbedding
*/
'include'?: Array<QueryEmbeddingIncludeEnum>;
}
/**
* @export
* @enum {string}
*/
export enum QueryEmbeddingIncludeEnum {
Documents = 'documents',
Embeddings = 'embeddings',
Metadatas = 'metadatas',
Distances = 'distances'
}

@@ -31,3 +31,3 @@ import { DefaultApi } from "./generated/api";

constructor(openai_api_key: string, openai_model: string, openai_organization_id: string) {
constructor(openai_api_key: string, openai_model?: string, openai_organization_id?: string) {
try {

@@ -46,3 +46,3 @@ // eslint-disable-next-line global-require,import/no-extraneous-dependencies

public async generate(texts: string[]) {
public async generate(texts: string[]): Promise<number[][]> {
const configuration = new OpenAIApi.Configuration({

@@ -94,4 +94,3 @@ organization: this.org_id,

type CallableFunction = {
new(): CallableFunction;
generate(texts: string[]): number[][];
generate(texts: string[]): Promise<number[][]>;
};

@@ -113,3 +112,3 @@

ids: string | string[],
embeddings: number[] | number[][],
embeddings: number[] | number[][] | undefined,
metadatas?: object | object[],

@@ -133,5 +132,6 @@ documents?: string | string[],

}
if (embeddings === undefined) throw new Error("embeddings is undefined but shouldnt be")
const idsArray = toArray(ids);
const embeddingsArray = toArrayOfArrays(embeddings);
const embeddingsArray: number[][] = toArrayOfArrays(embeddings);

@@ -213,3 +213,3 @@ let metadatasArray: object[] | undefined;

public async query(
query_embeddings: number[] | number[][],
query_embeddings: number[] | number[][] | undefined,
n_results: number = 10,

@@ -233,4 +233,5 @@ where?: object,

}
if (query_embeddings === undefined) throw new Error("embeddings is undefined but shouldnt be")
const query_embeddingsArray = toArrayOfArrays(query_embeddings);
const query_embeddingsArray: number[][] = toArrayOfArrays(query_embeddings);

@@ -237,0 +238,0 @@ const response = await this.api.getNearestNeighbors({

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc