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

Tool call support (Llama 3.x, Functionary v3, Hermes 2 Pro, Mistral Nemo, generic) w/ lazy grammars & minimalist Jinja engine #9639

Draft
wants to merge 124 commits into
base: master
Choose a base branch
from

Commits on Sep 25, 2024

  1. Configuration menu
    Copy the full SHA
    5b6d504 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    eaca756 View commit details
    Browse the repository at this point in the history
  3. json: build_grammar helper

    ochafik committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    26c175b View commit details
    Browse the repository at this point in the history
  4. tool-call: basic Functionary 3.2, Llama 3.1, Hermes 2 Pro grammar g…

    …enerators + parsers
    ochafik committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    3cfc21e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e309c6a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    41103c0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4706bdb View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8f25531 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    33ea20e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d15dcfb View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    97d0620 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e983c9d View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. minja: fix llama_chat_apply_template + adde use_jinja param to vali…

    …date_model_chat_template
    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    45b243b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9e366b3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a774093 View commit details
    Browse the repository at this point in the history
  4. server: catch errors in oaicompat_completion_params_parse instead o…

    …f taking server down
    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    d928ff4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ab25e3f View commit details
    Browse the repository at this point in the history
  6. fix editorconfig lints

    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    1b62801 View commit details
    Browse the repository at this point in the history
  7. fix flake8 lints

    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    76d2938 View commit details
    Browse the repository at this point in the history
  8. minja: add str.endswith

    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    c124ab4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    595e11c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    94377d7 View commit details
    Browse the repository at this point in the history
  11. minja: try to please gcc

    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    059babd View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4cd82d6 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2eb29bf View commit details
    Browse the repository at this point in the history
  14. minja: gcc tweaks

    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    5f5be9c View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    8e4a9ba View commit details
    Browse the repository at this point in the history
  16. tool-call: test/fix functionary-medium-v3.1's template (can "look" …

    …like llama3.1 template)
    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    0c87013 View commit details
    Browse the repository at this point in the history
  17. gcc appeasement

    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    749a21c View commit details
    Browse the repository at this point in the history
  18. fix gcc build

    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    3d2650c View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    d7ec84f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    cf7bece View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    9cfe4d7 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    296331b View commit details
    Browse the repository at this point in the history
  23. minja: add str.title()

    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    50685f8 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    5840e10 View commit details
    Browse the repository at this point in the history
  25. fix lints

    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    2926089 View commit details
    Browse the repository at this point in the history
  26. fix gcc error + lint

    ochafik committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    c88c932 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    10f9fe8 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    8299fac View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. minja: fix iterables

    ochafik committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    f9c1743 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1e5c0e7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9295ca9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    27cd07a View commit details
    Browse the repository at this point in the history
  5. server: rm bad debug code

    ochafik committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    6610ecf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0abfa36 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f62e688 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e33b342 View commit details
    Browse the repository at this point in the history
  9. tool-call: fix functionary-small-3.2 (first tool starts w/ name\n, …

    …subsequent are >>>name\n)
    ochafik committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    e62b5de View commit details
    Browse the repository at this point in the history
  10. Update README.md

    ochafik committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    86e4f99 View commit details
    Browse the repository at this point in the history
  11. Update README.md

    ochafik committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    2f25ee3 View commit details
    Browse the repository at this point in the history
  12. minja: fix identifiers parsing (when start w/ not/is/etc) and lstri…

    …p_blocks corner case (needed by DeepSeek-V2.5
    ochafik committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    0093a5e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    701b664 View commit details
    Browse the repository at this point in the history
  14. minja: generate chat goldens w/ fixed date to support Llama-3.2-3B-…

    …Instruct (uses strftime_now)
    ochafik committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    887951b View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2024

  1. Configuration menu
    Copy the full SHA
    0c85bc7 View commit details
    Browse the repository at this point in the history
  2. tool-call: let the tool call handler expand chat template, moving b…

    …uiltin_tools down as extra_context
    ochafik committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    d983516 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8b2cf35 View commit details
    Browse the repository at this point in the history
  4. tool-call: more eager function call parsing for Functionary & Llama…

    … (give a chance to 3B model)
    ochafik committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    7cef90c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    55cf337 View commit details
    Browse the repository at this point in the history
  6. tool-call: cleanup tools.py

    ochafik committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    c657857 View commit details
    Browse the repository at this point in the history
  7. chat-template: enumerate files w/ C API rather than private using s…

    …td::__fs::filesystem
    ochafik committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    6e0053a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    05bbba9 View commit details
    Browse the repository at this point in the history
  9. tool-call: make agent async

    ochafik committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    ef2a020 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e6be59c View commit details
    Browse the repository at this point in the history
  11. minja: fix gcc8 build of test

    ochafik committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    9358d1f View commit details
    Browse the repository at this point in the history
  12. chat-template: fix test-arg

    ochafik committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    1b32ac1 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    0ae1112 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    dbda025 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b10ef04 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    bc3e0c0 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    a072f30 View commit details
    Browse the repository at this point in the history
  18. tests: fix typo

    ochafik committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    ad6719e View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    22493c8 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    c87c121 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    8738d94 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    cb7912e View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    9ac4b04 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. Configuration menu
    Copy the full SHA
    277f385 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0fc5ad7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9451fd View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. tool-call: prepare possible externalization of minja + factor tool …

    …call style out of template
    ochafik committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    c36a196 View commit details
    Browse the repository at this point in the history
  2. tool-call: fix Makefile

    ochafik committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    c76b145 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. Configuration menu
    Copy the full SHA
    5b01402 View commit details
    Browse the repository at this point in the history
  2. update tools

    ochafik committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    f3538e7 View commit details
    Browse the repository at this point in the history
  3. tool-call: promote getting chat templates w/ dedicated script rathe…

    …r than rely on test resources
    ochafik committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    9e502e8 View commit details
    Browse the repository at this point in the history
  4. Update README.md

    ochafik committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    b559d64 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2428b73 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e2a9ab6 View commit details
    Browse the repository at this point in the history
  7. agent: remove *lots* of cruft from tool definitions derived from Fa…

    …stAPI catalog (and remove wait* tools which can be implemented in Python anyway)
    ochafik committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    6f2191d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    26e76f9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6b4a454 View commit details
    Browse the repository at this point in the history
  10. agent: drop fastify.py -> simpler serve_tools.py, and expose other …

    …tools to python interpreter
    ochafik committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    fa8df0c View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. antiprompts: ensure partial match is at end of string (or else serv…

    …er stops sending replies)
    ochafik committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    ece12b0 View commit details
    Browse the repository at this point in the history
  2. tool-call: adjust triggers to most common tool call variations from…

    … Llama-3.1-8B and Llama-3.2-3B
    ochafik committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    b4fc1e8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    da02397 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    366efc8 View commit details
    Browse the repository at this point in the history
  5. agent: tool tweaks (remove ansi escapes from python output, update …

    …env keys + provider docs)
    ochafik committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    21a3c90 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. Configuration menu
    Copy the full SHA
    a151ddc View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. Configuration menu
    Copy the full SHA
    241acc2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3325069 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

  1. Configuration menu
    Copy the full SHA
    e753f15 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2024

  1. tool-call: fix grammar roots

    ochafik committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    7576487 View commit details
    Browse the repository at this point in the history
  2. fix root

    ochafik committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    fa8462f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9f5ab97 View commit details
    Browse the repository at this point in the history
  4. Update test-tool-call.cpp

    ochafik committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    b53362a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7f2429e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    db4bf93 View commit details
    Browse the repository at this point in the history
  7. Update llama-sampling.cpp

    ochafik committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    351aecb View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a4f12a4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fc80ad2 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2024

  1. tool-calls: basic Nemo support, default parallel to true if templat…

    …e mentions tool_call_id
    ochafik committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    3e12b9b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2b49440 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5f4aef1 View commit details
    Browse the repository at this point in the history
  4. Update tool-call.cpp

    ochafik committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    4394e1c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    414f6f1 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2024

  1. agent: isolate tools container + log its outgoing HTTP & HTTPS traf…

    …fic w/ docker compose + self-signed squid proxy
    ochafik committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    267e630 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f5320af View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0f5d639 View commit details
    Browse the repository at this point in the history
  4. agent: ditch aiohttp & define REQUESTS_CA_BUNDLE to fix http proxyi…

    …ng / trust the self-signed cert from python
    ochafik committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    d338bfb View commit details
    Browse the repository at this point in the history
  5. Update README.md

    ochafik committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    c2926e4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    03b8641 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0f4fc8c View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2024

  1. agent: simplify tools setup

    ochafik committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    5c414a3 View commit details
    Browse the repository at this point in the history
  2. agent: fix tools setup

    ochafik committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    30bd00b View commit details
    Browse the repository at this point in the history