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

Langchain OPEA integration Package #1128

Open
wants to merge 43 commits into
base: main
Choose a base branch
from

Conversation

yogeshmpandey
Copy link
Collaborator

@yogeshmpandey yogeshmpandey commented Jan 8, 2025

Description

First version of the OPEA OpenAI compatible Langchain Package.

Issues

List the issue or RFC link this PR is working on. If there is no such link, please mark it as n/a.

#831
opea-project/GenAIExamples#1113

Type of change

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)
  • Others (enhancement, documentation, validation, etc.)

Dependencies

List the newly introduced 3rd party dependency if exists.

langchain-tests
langchain-chroma
python-poetry

Tests

Describe the tests that you ran to verify your changes.

Tests added in the tests dir along with test scripts.

@yogeshmpandey yogeshmpandey marked this pull request as ready for review January 8, 2025 16:24
@yogeshmpandey yogeshmpandey added this to the v1.2 milestone Jan 9, 2025
@joshuayao
Copy link
Collaborator

Hi @yogeshmpandey, thanks for your contribution. Could you please check the CI failure?

@joshuayao joshuayao linked an issue Jan 10, 2025 that may be closed by this pull request
@chensuyue
Copy link
Collaborator

- repo: https://github.com/astral-sh/ruff-pre-commit

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.8.6
    hooks:
      - id: ruff
        args: [--fix, --exit-non-zero-on-fix, --no-cache]
        exclude: |
          (?x)^(
              comps/integrations/langchain/samples/qa_streaming.ipynb |
              comps/integrations/langchain/samples/summarize.ipynb
          )$

You can add this to omit https://docs.astral.sh/ruff/rules/print/

has_failure = True
print(file)
traceback.print_exc()
print()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do you need an empty print here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is generated from langchain boilerplate code and is present in all the langchain partner packages. Ref : Anthropic , Groq

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.

[Feature] Langchain integration
3 participants