Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants