Compare commits

...

2 Commits

Author SHA1 Message Date
dependabot[bot]
b076f14973 build(deps): bump the pip group in /application with 2 updates
Bumps the pip group in /application with 2 updates: [requests](https://github.com/psf/requests) and [torch](https://github.com/pytorch/pytorch).


Updates `requests` from 2.32.3 to 2.32.4
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.3...v2.32.4)

Updates `torch` from 2.7.0 to 2.7.1
- [Release notes](https://github.com/pytorch/pytorch/releases)
- [Changelog](https://github.com/pytorch/pytorch/blob/main/RELEASE.md)
- [Commits](https://github.com/pytorch/pytorch/compare/v2.7.0...v2.7.1)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: torch
  dependency-version: 2.7.1
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-10 09:35:15 +00:00
Alex
31baf181a3 fix: default optimisations 2025-06-05 12:21:40 +01:00
2 changed files with 6 additions and 4 deletions

View File

@@ -64,12 +64,12 @@ python-pptx==1.0.2
redis==5.2.1
referencing>=0.28.0,<0.31.0
regex==2024.11.6
requests==2.32.3
requests==2.32.4
retry==0.9.2
sentence-transformers==3.3.1
tiktoken==0.8.0
tokenizers==0.21.0
torch==2.7.0
torch==2.7.1
tqdm==4.67.1
transformers==4.51.3
typing-extensions==4.12.2

View File

@@ -44,8 +44,8 @@ class ClassicRAG(BaseRetriever):
user_api_key=self.user_api_key,
decoded_token=decoded_token,
)
self.question = self._rephrase_query()
self.vectorstore = source["active_docs"] if "active_docs" in source else None
self.question = self._rephrase_query()
self.decoded_token = decoded_token
def _rephrase_query(self):
@@ -53,6 +53,8 @@ class ClassicRAG(BaseRetriever):
not self.original_question
or not self.chat_history
or self.chat_history == []
or self.chunks == 0
or self.vectorstore is None
):
return self.original_question
@@ -77,7 +79,7 @@ class ClassicRAG(BaseRetriever):
return self.original_question
def _get_data(self):
if self.chunks == 0:
if self.chunks == 0 or self.vectorstore is None:
docs = []
else:
docsearch = VectorCreator.create_vectorstore(