update weaviate client config
This commit is contained in:
parent
c51e12943d
commit
7febe204df
|
|
@ -32,14 +32,24 @@ class Weaviate_Existing_VectorStores implements INode {
|
|||
{
|
||||
label: 'Weaviate Scheme',
|
||||
name: 'weaviateScheme',
|
||||
type: 'string',
|
||||
default: 'https'
|
||||
type: 'options',
|
||||
default: 'https',
|
||||
options: [
|
||||
{
|
||||
label: 'https',
|
||||
name: 'https'
|
||||
},
|
||||
{
|
||||
label: 'http',
|
||||
name: 'http'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Weaviate Host',
|
||||
name: 'weaviateHost',
|
||||
type: 'string',
|
||||
default: 'localhost'
|
||||
placeholder: 'localhost:8080'
|
||||
},
|
||||
{
|
||||
label: 'Weaviate Index',
|
||||
|
|
@ -96,11 +106,13 @@ class Weaviate_Existing_VectorStores implements INode {
|
|||
const embeddings = nodeData.inputs?.embeddings as Embeddings
|
||||
const output = nodeData.outputs?.output as string
|
||||
|
||||
const client: WeaviateClient = weaviate.client({
|
||||
scheme: weaviateScheme || 'https',
|
||||
host: weaviateHost || 'localhost',
|
||||
apiKey: new ApiKey(weaviateApiKey || 'default')
|
||||
})
|
||||
const clientConfig: any = {
|
||||
scheme: weaviateScheme,
|
||||
host: weaviateHost
|
||||
}
|
||||
if (weaviateApiKey) clientConfig.apiKey = new ApiKey(weaviateApiKey)
|
||||
|
||||
const client: WeaviateClient = weaviate.client(clientConfig)
|
||||
|
||||
const obj: WeaviateLibArgs = {
|
||||
client,
|
||||
|
|
|
|||
|
|
@ -38,14 +38,24 @@ class WeaviateUpsert_VectorStores implements INode {
|
|||
{
|
||||
label: 'Weaviate Scheme',
|
||||
name: 'weaviateScheme',
|
||||
type: 'string',
|
||||
default: 'https'
|
||||
type: 'options',
|
||||
default: 'https',
|
||||
options: [
|
||||
{
|
||||
label: 'https',
|
||||
name: 'https'
|
||||
},
|
||||
{
|
||||
label: 'http',
|
||||
name: 'http'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Weaviate Host',
|
||||
name: 'weaviateHost',
|
||||
type: 'string',
|
||||
default: 'localhost'
|
||||
placeholder: 'localhost:8080'
|
||||
},
|
||||
{
|
||||
label: 'Weaviate Index',
|
||||
|
|
@ -103,11 +113,13 @@ class WeaviateUpsert_VectorStores implements INode {
|
|||
const embeddings = nodeData.inputs?.embeddings as Embeddings
|
||||
const output = nodeData.outputs?.output as string
|
||||
|
||||
const client: WeaviateClient = weaviate.client({
|
||||
scheme: weaviateScheme || 'https',
|
||||
host: weaviateHost || 'localhost',
|
||||
apiKey: new ApiKey(weaviateApiKey || 'default')
|
||||
})
|
||||
const clientConfig: any = {
|
||||
scheme: weaviateScheme,
|
||||
host: weaviateHost
|
||||
}
|
||||
if (weaviateApiKey) clientConfig.apiKey = new ApiKey(weaviateApiKey)
|
||||
|
||||
const client: WeaviateClient = weaviate.client(clientConfig)
|
||||
|
||||
const finalDocs = []
|
||||
for (let i = 0; i < docs.length; i += 1) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
"express": "^4.17.3",
|
||||
"form-data": "^4.0.0",
|
||||
"graphql": "^16.6.0",
|
||||
"langchain": "^0.0.63",
|
||||
"langchain": "^0.0.66",
|
||||
"mammoth": "^1.5.1",
|
||||
"moment": "^2.29.3",
|
||||
"node-fetch": "2",
|
||||
|
|
|
|||
Loading…
Reference in New Issue