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

No weaviate.configure.vectorizer.text2vecOllama #147

Closed devzeebo closed 3 weeks ago

devzeebo commented 3 weeks ago

I'm following the Weaviate quickstart guide (https://weaviate.io/developers/weaviate/quickstart#step-4-define-a-data-collection) and trying to configure the Text2VecOllama vectorizer. However, I don't see any options in the TypeScript client library to set these configurations.

According to Weaviate's documentation (https://weaviate.io/developers/weaviate/modules/retriever-vectorizer-modules/text2vec-ollama#example-1), I need to manually configure the schema with specific settings. But I'm looking for a way to replicate this process using the TypeScript client library, rather than having to do it by hand.

import type { CollectionConfigCreate, WeaviateClient } from 'weaviate-client';
import weaviate, { vectorizer } from 'weaviate-client';

const client: WeaviateClient = await weaviate.connectToLocal({
  host: '127.0.0.1',
  port: 8888,
});

const schema: CollectionConfigCreate<undefined, 'Question'> = {
  name: 'Question',
  vectorizers: // weaviate.configure.vectorizer.text2vecOllama(???),
  generative: weaviate.configure.generative.ollama({
    apiEndpoint: 'http://ollama:11434',
    model: 'llama3:instruct',
  }),
};

await client.collections.create(schema);
tsmith023 commented 3 weeks ago

Hi @devzeebo, thanks for the callout on this one 😁 This will be fixed and included in the v3 GA release of the TS client coming today!

tsmith023 commented 3 weeks ago

Fixed in v3.0.0 that just landed!