Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've found that GPT really like "google style" python documentation. You need to have a chunk of system prompt explain that it should be 'using the tools according to their documentation etc etc', but once you've dialed that in a little stuff like this works a charm (the docstring is what the LLM sees):

@Tool

def add_todo(title, project=None) -> str:

    """
    Add a new TODO.

    Args:
        title (str): A brief description of the task
        project (str, optional): A project to add the todo to, if requested
    """

    logger.debug(f"Adding task: {title}")
    task = Task(tw, description=title, project=project)
    task.save()
    return f"Added [ {title} ] to the { project + ' ' if project else '' }TODO list."


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: