Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@langchain/cloudflare

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@langchain/cloudflare - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

5

dist/vectorstores.d.ts

@@ -1,2 +0,2 @@

import { VectorizeIndex, VectorizeVectorMetadata } from "@cloudflare/workers-types";
import { VectorizeIndex, VectorizeVectorMetadata, VectorizeVectorMetadataFilter } from "@cloudflare/workers-types";
import type { EmbeddingsInterface } from "@langchain/core/embeddings";

@@ -22,2 +22,3 @@ import { VectorStore } from "@langchain/core/vectorstores";

export declare class CloudflareVectorizeStore extends VectorStore {
FilterType: VectorizeVectorMetadataFilter;
textKey: string;

@@ -61,3 +62,3 @@ namespace?: string;

*/
similaritySearchVectorWithScore(query: number[], k: number): Promise<[Document, number][]>;
similaritySearchVectorWithScore(query: number[], k: number, filter?: this["FilterType"]): Promise<[Document, number][]>;
/**

@@ -64,0 +65,0 @@ * Static method that creates a new instance of the CloudflareVectorizeStore class

3

dist/vectorstores.js

@@ -109,3 +109,3 @@ import * as uuid from "uuid";

*/
async similaritySearchVectorWithScore(query, k) {
async similaritySearchVectorWithScore(query, k, filter) {
const results = await this.index.query(query, {

@@ -115,2 +115,3 @@ returnMetadata: true,

topK: k,
filter,
});

@@ -117,0 +118,0 @@ const result = [];

{
"name": "@langchain/cloudflare",
"version": "0.0.2",
"version": "0.0.3",
"description": "Cloudflare integration for LangChain.js",

@@ -26,3 +26,3 @@ "type": "module",

"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn create-entrypoints -- --pre",
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
"prepack": "yarn build",

@@ -29,0 +29,0 @@ "test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",

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