Skip to content

Commit

Permalink
Book skill fix (#326)
Browse files Browse the repository at this point in the history
* Book skill fix

Default phrase as in alexa

* Update wiki.py

* fix: no empty string as default value

---------

Co-authored-by: dilyararimovna <[email protected]>
  • Loading branch information
dimakarp1996 and dilyararimovna authored Feb 21, 2023
1 parent f3dcaf2 commit 46df05e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion skills/dff_book_skill/tools/wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,15 @@ def get_booklist(plain_author_name: str) -> str:

def best_plain_book_by_author(
plain_author_name: str,
default_phrase: str,
default_phrase: str = None,
plain_last_bookname: Optional[str] = None,
top_n_best_books: int = 1,
) -> Optional[str]:
"""
Look up a book for an author
"""
logger.debug(f"Calling best_plain_book_by_author for {plain_author_name} {plain_last_bookname}")
default_phrase = "" if default_phrase is None else default_phrase
# best books
last_bookname = "NO_BOOK"
try:
Expand Down

0 comments on commit 46df05e

Please sign in to comment.