Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed inconsistent variable naming #4096

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eschullert
Copy link

Summary

This pull request fixes an inconsistency in the vector store index configuration.

According to the documentation, the expected format for a vector store index is:

{
  "store": {
    "index": {
      "embed": "openai:text-embeddings-3-small",
      "dims": 1536,
      "fields": ["text", "summary"]
    }
  }
}

However, in the Postgres vector store implementation, the parameter was named text-fields instead of fields. This PR renames the parameter to fields to align with the documented format and maintain consistency across vector store backends.

Rationale

  • Improves consistency with the documented interface.
  • Reduces potential confusion and improves interoperability.

Let me know if any additional changes are needed!

Copy link

vercel bot commented Mar 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langgraph-docs-preview ⬜️ Ignored (Inspect) Visit Preview Mar 31, 2025 3:50pm

if not isinstance(text_fields, list):
raise ValueError(f"Text fields must be a list or a string. Got {text_fields}")
for p in text_fields:
fields = index_config.get("fields") or ["$"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hinthornw could you take a look the PostgresIndexConfig seems to indicate that "text_fields" is not a thing. Is this for backwards compatibility or just a typo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants