Skip to content

Ability to specify multiple functions on non-llm tool #37

@slonoed

Description

@slonoed

Currently, when you using non llm tool the only method called will be ask. And it will receive 2 arguments (params and thread id).
It would be nice if tool can specify multiple functions and either

  1. Having some argument in ask to figure out which one is called
  2. Perform automatic routing to class function

Example

class FnTool extends Tool {
  constructor() {
    super({
      llm: false,
      parentTools: [/* describe both functions here */]
    })
  }
  storeList(items) {
    // ..
  }
 
  getList() {
    return ['apple', 'banana']
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions