Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tool calling. #581

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Support tool calling. #581

wants to merge 3 commits into from

Commits on Oct 10, 2024

  1. Support tool calling.

    * add register_tools hookspec to allow plugins to register tools
    * add @llm.Tool decorator that introspects a callables type signature
      and generates a JSON schema
    * expose installed tools to Models via new `tools` Model property
    * implement tool calling in the openai Model
    * register a default `read_files` tool
    
    Note: this pins pytest_httpx until broken tests are fixed in
      simonw#580
    Note: this requires openai>=1.40.0
    Note: this drops 3.8 since a number of dependencies no longer
      support it, and adds 3.13 support
    rectalogic committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    66fb560 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. Configuration menu
    Copy the full SHA
    a116cc8 View commit details
    Browse the repository at this point in the history
  2. Refactor tool registration to allow tools to specify their own schema.

    Introspecting callable type hints is the default fallback if no schema is provided.
    rectalogic committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    1afdfc9 View commit details
    Browse the repository at this point in the history