I create a domain and when create Index or Vector in it. It error like that
[illegal_argument_exception] Validation Failed: 1: expected total copies needs to be a multiple of total awareness attributes [3];
How can I fix it?
import { Client } from "@opensearch-project/opensearch";
import { Document } from "langchain/document";
import { OpenAIEmbeddings } from "langchain/embeddings/openai";
import { OpenSearchVectorStore } from "langchain/vectorstores/opensearch";
const client = new Client({
nodes: [process.env.OPENSEARCH_URL ?? "http://127.0.0.1:9200"],
auth: {
username: process.env.OPENSEARCH_USERNAME ?? "",
password: process.env.OPENSEARCH_PASSWORD ?? "",
},
});
const embedding = new OpenAIEmbeddings();
await OpenSearchVectorStore.fromDocuments(docs, embedding, {
client,
indexName: process.env.OPENSEARCH_INDEX, // Will default to `documents`
});