Skip to content

Commit

Permalink
fix: bug with PDFs on arxiv which no longer have a .pdf at the end!
Browse files Browse the repository at this point in the history
  • Loading branch information
ydennisy committed Apr 29, 2024
1 parent d68bf66 commit 247fe2c
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 113 deletions.
206 changes: 96 additions & 110 deletions backend/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions backend/app/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def answer_with_context(chunks: List[dict], question: str) -> Generator[str, Any


def summarise_text(text: str) -> str:
words = text.split(" ")
if len(words) > 1024:
text = " ".join(words[:1024])

messages = [
{
"role": "system",
Expand Down
Loading

0 comments on commit 247fe2c

Please sign in to comment.