Skip to content

aadd_texts() got multiple values for keyword argument 'ids' #32283

@sglebs

Description

@sglebs

Checked other resources

  • This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/).
  • I added a clear and descriptive title that summarizes this issue.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
  • I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
  • I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.

Example Code

Extend the example I sent in #32195 but try to add documents to the

await vs.aadd_documents(docs, ids=ids)

This snippet (add documents to a Qdrant Vector Store) will bomb.

Error Message and Stack Trace (if applicable)

aadd_texts() got multiple values for keyword argument 'ids'.

Description

The body of aadd_documents has an if part that is adding ids into kwargs and is also passing it. Python explodes because it is passed explicitly and in kwargs. Here's how I patched it, in the return line:

        return await self.aadd_texts(texts, metadatas, **kwargs)  # @glebs patch: aadd_texts() got multiple values for keyword argument 'ids'.  My patch: simply removed ids=ids from the call expression.

System Info

Same as in #32195

Metadata

Metadata

Assignees

Labels

bugRelated to a bug, vulnerability, unexpected error with an existing featurehelp wantedGood issue for contributors

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions