Skip to content

added vectara tools#30693

Closed
Adeel Ehsan (adeelehsan) wants to merge 1 commit intolangchain-ai:masterfrom
adeelehsan:add-vectara-tools
Closed

added vectara tools#30693
Adeel Ehsan (adeelehsan) wants to merge 1 commit intolangchain-ai:masterfrom
adeelehsan:add-vectara-tools

Conversation

@adeelehsan
Copy link
Copy Markdown
Contributor

Thank you for contributing to LangChain!

  • PR title: "package: description"

    • Where "package" is whichever of langchain, community, core, etc. is being modified. Use "docs: ..." for purely docs changes, "infra: ..." for CI changes.
    • Example: "community: add foobar LLM"
  • PR message: Delete this entire checklist and replace with

    • Description: a description of the change
    • Issue: the issue # it fixes, if applicable
    • Dependencies: any dependencies required for this change
    • Twitter handle: if your PR gets announced, and you'd like a mention, we'll gladly shout you out!
  • Add tests and docs: If you're adding a new integration, please include

    1. a test for the integration, preferably unit tests that do not rely on network access,
    2. an example notebook showing its use. It lives in docs/docs/integrations directory.
  • Lint and test: Run make format, make lint and make test from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/

Additional guidelines:

  • Make sure optional dependencies are imported within a function.
  • Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests.
  • Most PRs should not touch more than one package.
  • Changes should be backwards compatible.
  • If you are adding something to community, do not re-import it in langchain.

If no one reviews your PR within a few days, please @-mention one of baskaryan, eyurtsev, ccurme, vbarda, hwchase17.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 6, 2025

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Apr 6, 2025 7:01am

name="vectara_search",
description="Search for information in the Vectara corpus",
vectorstore=vectara,
corpus_key="your-corpus-id"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should be "your-corpus-key" not "your-corpus-id".
does it support multiple corpora?

corpus_config = CorpusConfig(
corpus_key="your-corpus-id",
metadata_filter="doc.type = 'article'",
lexical_interpolation=0.2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's use the default 0.005

name="vectara_generation",
description="Generate summaries from your Vectara corpus",
vectorstore=vectara,
corpus_key="your-corpus-id" # Optional, can be provided in config
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here - "your-corpus-key"

return f"Error generating response from Vectara: {str(e)}"


class VectaraIngest(BaseVectorStoreTool, BaseTool):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we are doing "ingest" then why not also add "upload" tool? (for files like PDFs, DOC, etc)?

@eyurtsev
Copy link
Copy Markdown
Collaborator

Could you move the code to langchain_vectara and only add the integration docs to langchain?

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.

4 participants