declarai icon indicating copy to clipboard operation
declarai copied to clipboard

Task ignores argument default values

Open giladbarnea opened this issue 2 years ago • 0 comments

Reproduce:

import declarai

gpt_35 = declarai.openai(model="gpt-3.5-turbo")

default_ranking_criterion = "urgency"

@gpt_35.task 
def rank_by(message: str, ranking_criterion: str = default_ranking_criterion) -> int:
    """
    Rank the provided message by the given ranking criterion.
    Ranks range from 1-5, with 5 being the highest.
    :param message: The message to rank
    :return: The rank from 1-5
    """

rank_by(message="The server is down!")
image

giladbarnea avatar Sep 11 '23 10:09 giladbarnea