weaviate-ts-embedded
v1.2.0
Published
Weaviate TypeScript EmbeddedDB
Downloads
375
Readme
Weaviate TypeScript EmbeddedDB
An embedded Weaviate database with TypeScript client interface, available for Linux and Mac
Documentation
Examples
With default options
Defaults:
- Host:
127.0.0.1
- Port:
6666
- Weaviate version:
latest
import weaviate, { EmbeddedClient, EmbeddedOptions } from 'weaviate-ts-embedded';
const client: EmbeddedClient = weaviate.client(new EmbeddedOptions());
await client.embedded.start();
// use the client to interact with embedded Weaviate
client.embedded.stop();
With custom options
import weaviate, { EmbeddedClient, EmbeddedOptions } from 'weaviate-ts-embedded';
const client: EmbeddedClient = weaviate.client(
new EmbeddedOptions({
port: 7878,
version: '1.18.1',
env: {
QUERY_DEFAULTS_LIMIT: 50,
DEFAULT_VECTORIZER_MODULE: 'text2vec-openai',
},
}),
// weaviate-ts-client ConnectionParams
{
scheme: 'http',
host: '127.0.0.1:7878',
}
);
await client.embedded.start();
// use the client to interact with embedded Weaviate
client.embedded.stop();
With direct binary url
import weaviate, { EmbeddedClient, EmbeddedOptions } from 'weaviate-ts-embedded';
const binaryUrl = 'https://some-link-to-weaviate-binary';
const client: EmbeddedClient = weaviate.client(
new EmbeddedOptions({
binaryUrl: binaryUrl,
})
);
await client.embedded.start();
// use the client to interact with embedded Weaviate
client.embedded.stop();