Skip to content

Question about DSPy Flight Example #1558

Description

@mannuch

Hello!

I am trying to better understand the new v1 API. It seems that the docs suggest to add tools to the Taskset.

I can see in the LangChain example this is true, as it contains the following:

def load_taskset(config: WikispeediaTasksetConfig) -> WikispeediaTaskset:
    ...
    taskset = WikispeediaTaskset(config=config)
    ...
        taskset.add_toolset(
        load_toolset(
            cache_dir=config.cache_dir,
            allow_go_back=config.allow_go_back,
        )
    )
    ...
    return taskset

However, the DSPy flights example appears to not define its tools in the taskset, but rather within the harness execution code AFAICT.

Specifically, in the harness code here, you can see the call to build_airline_tools(task) where the tools are called (line here).

My question: is there a particular reason the DSPy example defines tools buried within the harness code and not on the taskset? Both examples seem to leverage underlying agent frameworks but approach the tool definition / injection slightly differently.

Any clarity here would be appreciated! Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions