Skip to content

Commit

Permalink
fix: correct number of publications
Browse files Browse the repository at this point in the history
  • Loading branch information
nreinartz committed Nov 26, 2023
1 parent 9642268 commit d053a96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bot_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ def __process_progress(self, query_session: QuerySession, progress: QueryProgres

def __process_analysing_trends(self, query_session: QuerySession):
query = self.get_query(query_session.uuid)
publication_count = sum(query["results"]["search_results"]["raw"])
publication_count = sum(
query["results"]["search_results"]["raw_per_year"])
query_session.chat_session.send_message(
f"Data retrieved. I found {publication_count} matching publications. Analysing Trends ..."
)
Expand Down Expand Up @@ -251,7 +252,7 @@ def __process_citation_recommendation_results(self, query_session: QuerySession)
lines.append(
f"[Link to Paper](https://doi.org/{publication['doi']})")
lines.append(
f"Similarity: {round(publication['similarity'], 2)}, Citations: {int(publication['citations']) if publication['citations'] is not None else 'unknown'}")
f"Similarity: {round(publication['similarity'], 3)}, Citations: {int(publication['citations']) if publication['citations'] is not None else 'unknown'}")
lines.append("--------------------------")

query_session.chat_session.send_message("\n".join(lines))
Expand Down

0 comments on commit d053a96

Please sign in to comment.