Skip to content

issues while running quickstart for pgvector #180

@eyurtsev

Description

@eyurtsev
  1. initialization

the line that initializes the table uses the wrong variable (engine instead of pg_engine) and uses a public method, but the method is actually private

await pg_engine._ainit_vectorstore_table(
    table_name=TABLE_NAME,
    vector_size=VECTOR_SIZE,
)
  1. initializing twice raises an exception (should we have create if not exists semantics as well?) Users may want to have the code live in their app lifespan for simplicity (instead of doing some logic on server deployment)

  2. cohere embeddings fails due to cohere model not being specified.

  3. using pgvectorstore create fails w/ an exception (
    AttributeError: 'AsyncEngine' object has no attribute '_run_as_async')

store = await PGVectorStore.create(
    engine=engine,
    table_name=TABLE_NAME,
    # schema_name=SCHEMA_NAME,
    embedding_service=embedding,
)

got stuck at this stage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions