top | item 36596579

(no title)

aarong11 | 2 years ago

Just before the point they built this, I was already chaining queries together to do this. I built a plugin system with bits of JS code that are eval'd and arguments injected.

They couldn't have released this at a better time, I have about 30 plugins and i'd say it manages to get the right one about 90% of the time as opposed to about 70 with my hacked together version (but I guess I wrote it and know what to say so maybe that's a bit skewed)

discuss

order

pksebben|2 years ago

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."