weaviate / typescript-client

Official Weaviate TypeScript Client
https://www.npmjs.com/package/weaviate-ts-client
BSD 3-Clause "New" or "Revised" License
57 stars 21 forks source link

Unable to Create a Property with moduleConfig #105

Open Kostjanix2 opened 6 months ago

Kostjanix2 commented 6 months ago

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)

tsmith023 commented 5 months ago

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

Kostjanix2 commented 5 months ago

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, }, }, }, ], };