typescript-client icon indicating copy to clipboard operation
typescript-client copied to clipboard

Unable to Create a Property with moduleConfig

Open Kostjanix2 opened this issue 1 year ago • 2 comments
trafficstars

I am trying to add a Property to a Class with the propertyCreator, but I always recieve a Error, which I do not understand correctly. return await this.weaviateClient.schema .propertyCreator() .withClassName(className) .withProperty({ dataType: ['text'], description: 'Der Hash des Produkts', name: 'hash', moduleConfig: { 'text2vec-openai': { vectorizePropertyName: false, skip: true, }, }, }) .do(); It does work, when I am not using the moduleConfig attribute When executing this i recieve following error: Error: usage error (422): {"error":[{"message":"none vectorizer module not part of the property"}]} at .../node_modules/weaviate-ts-client/dist/index.js:1:9070 at processTicksAndRejections (node:internal/process/task_queues:95:5)

Kostjanix2 avatar Dec 20 '23 14:12 Kostjanix2

Hi @Kostjanix2, to help diagnose the issue could you please also post the class schema? Cheers 😁

tsmith023 avatar Jan 08 '24 09:01 tsmith023

Hello @tsmith023 here is a example of the Schema i am using. :) export const Schema = { class: "Schema", vectorizer: 'text2vec-openai', properties: [ { dataType: ['text'], description: 'The ID', name: 'customerId', }, { dataType: ['text'], description: 'The Name', name: 'title', }, { dataType: ['text'], description: 'The description', name: 'description', }, { dataType: ['text'], description: 'The Url, name: 'url', moduleConfig: { 'text2vec-openai': { vectorizePropertyName: false, skip: true, }, }, }, ], };

Kostjanix2 avatar Jan 09 '24 12:01 Kostjanix2