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

refactor: refactored chat.py #100

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

Conversation

ghimirebibek
Copy link
Contributor

What does this PR do?

Refactors chat.py file in the following ways:

  • List Comprehension in history_langchain_format: This removes repetitive .append() calls by using a cleaner and faster list comprehension approach.
  • Refactor source_md Function and Source Deduplication.
  • Simplify Conditionals for response and query_rewrite.
  • args.repo_id is only included if available, with a default fallback.

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who
may be interested in your PR.

List Comprehension in history_langchain_format: This removes repetitive .append() calls by using a cleaner and faster list comprehension approach.
Refactor source_md Function and Source Deduplication
Simplify Conditionals for response and query_rewrite
args.repo_id is only included if available, with a default fallback.
@iuliaturc
Copy link
Contributor

Thanks for your contribution! Could you please run these formatting tools:

isort --profile=black .
black --line-length=120 .

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.

2 participants