rvztz ce905dd098
feat: Weaviate destination connector (#1963)
Closes #1781.
- Adds a Weaviate destination connector
- The connector receives a host for the weaviate instance and a weaviate
class name.
- Defines a weaviate schema for json elements.
- Defines the pre-processing to conform unstructured's schema to the
proposed weaviate schema.
2023-12-01 22:27:41 +00:00

27 lines
879 B
Bash

#!/usr/bin/env bash
# Uploads the structured output of the files within the given S3 path to a Weaviate index.
# Structured outputs are stored in s3-small-batch-output-to-weaviate/
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR"/../../.. || exit 1
PYTHONPATH=. ./unstructured/ingest/main.py \
local \
--num-processes 2 \
--output-dir weaviate-output \
--strategy fast \
--verbose \
--reprocess \
--input-path example-docs/book-war-and-peace-1225p.txt \
--work-dir weaviate-work-dir \
--chunk-elements \
--chunk-new-after-n-chars 2500\
--chunk-multipage-sections \
--embedding-provider "langchain-huggingface" \
weaviate \
--host-url http://localhost:8080 \
--class-name elements \
--batch-size 100