LangStream / langstream

LangStream. Event-Driven Developer Platform for Building and Running LLM AI Apps. Powered by Kubernetes and Kafka.
https://langstream.ai
Apache License 2.0
379 stars 28 forks source link

Add examples and utility function to deal with Cassio #689

Closed eolivelli closed 8 months ago

eolivelli commented 8 months ago

Summary:


pipeline:
    - id: step1
      type: compute
      name: "Compute metadata"
      input: "input-topic-cassio"
      configuration:
        fields:
           - name: "value.metadata_s"
             expression: "fn:mapOf('filename', value.filename, 'chunk_id', value.chunk_id)"
    - name: "Write a new record to Cassandra"
      type: "vector-db-sink"
      configuration:
        datasource: "CassandraDatasource"
        table-name: "documents"
        keyspace: "cassio"
        mapping: "row_id=value.row_id,attributes_blob=value.attributes_blob,body_blob=value.body_blob,metadata_s=value.metadata_s,vector=value.vector"