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:
Vinod Kiran
2024-05-22 18:05:08 +05:30
committed by GitHub
parent e83dcb01b8
commit ff2381741e
22 changed files with 1340 additions and 297 deletions
@@ -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 ?? ''