Skip to content

Commit

Permalink
data index api (#6089)
Browse files Browse the repository at this point in the history
API for interaction with various indexes.

GitOrigin-RevId: 1d87582ad8a9414844753fb7fb26d3ace6a7e327
  • Loading branch information
krzysiek-pathway authored and Manul from Pathway committed May 7, 2024
1 parent 05c8377 commit 7b77dc8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/pipelines/contextful_geometric/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import os

import pathway as pw
from pathway.stdlib.indexing import VectorDocumentIndex
from pathway.stdlib.indexing import default_vector_document_index
from pathway.xpacks.llm.embedders import OpenAIEmbedder
from pathway.xpacks.llm.llms import OpenAIChat
from pathway.xpacks.llm.question_answering import (
Expand Down Expand Up @@ -80,11 +80,11 @@ def run(
autocommit_duration_ms=50,
)

index = VectorDocumentIndex(
documents.doc,
documents,
embedder,
n_dimensions=embedding_dimension,
index = default_vector_document_index(
data_column=documents.doc,
data_table=documents,
dimensions=embedding_dimension,
embedder=embedder,
)

query, response_writer = pw.io.http.rest_connector(
Expand Down

0 comments on commit 7b77dc8

Please sign in to comment.