mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Chore/upgrade llamaindex version (#2440)
* updates to loader to support file upload * adding a todo * upgrade llamaindex * update groq icon * update azure models * update llamaindex version --------- Co-authored-by: Henry <hzj94@hotmail.com>
This commit is contained in:
@@ -2,7 +2,9 @@ import {
|
||||
BaseNode,
|
||||
Document,
|
||||
Metadata,
|
||||
VectorStore,
|
||||
IEmbedModel,
|
||||
VectorStoreBase,
|
||||
VectorStoreNoEmbedModel,
|
||||
VectorStoreQuery,
|
||||
VectorStoreQueryResult,
|
||||
serviceContextFromDefaults,
|
||||
@@ -123,7 +125,8 @@ class PineconeLlamaIndex_VectorStores implements INode {
|
||||
const pcvs = new PineconeVectorStore({
|
||||
indexName,
|
||||
apiKey: pineconeApiKey,
|
||||
namespace: pineconeNamespace
|
||||
namespace: pineconeNamespace,
|
||||
embedModel: embeddings
|
||||
})
|
||||
|
||||
const flattenDocs = docs && docs.length ? flatten(docs) : []
|
||||
@@ -165,7 +168,8 @@ class PineconeLlamaIndex_VectorStores implements INode {
|
||||
|
||||
const obj: PineconeParams = {
|
||||
indexName,
|
||||
apiKey: pineconeApiKey
|
||||
apiKey: pineconeApiKey,
|
||||
embedModel: embeddings
|
||||
}
|
||||
|
||||
if (pineconeNamespace) obj.namespace = pineconeNamespace
|
||||
@@ -211,9 +215,9 @@ type PineconeParams = {
|
||||
namespace?: string
|
||||
chunkSize?: number
|
||||
queryFilter?: object
|
||||
}
|
||||
} & IEmbedModel
|
||||
|
||||
class PineconeVectorStore implements VectorStore {
|
||||
class PineconeVectorStore extends VectorStoreBase implements VectorStoreNoEmbedModel {
|
||||
storesText: boolean = true
|
||||
db?: Pinecone
|
||||
indexName: string
|
||||
@@ -223,6 +227,7 @@ class PineconeVectorStore implements VectorStore {
|
||||
queryFilter?: object
|
||||
|
||||
constructor(params: PineconeParams) {
|
||||
super(params?.embedModel)
|
||||
this.indexName = params?.indexName
|
||||
this.apiKey = params?.apiKey
|
||||
this.namespace = params?.namespace ?? ''
|
||||
|
||||
Reference in New Issue
Block a user