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 parsing and tool choice #40

Open
2 of 3 tasks
cmcmaster1 opened this issue Nov 20, 2024 · 4 comments
Open
2 of 3 tasks

Tool parsing and tool choice #40

cmcmaster1 opened this issue Nov 20, 2024 · 4 comments

Comments

@cmcmaster1
Copy link
Contributor

cmcmaster1 commented Nov 20, 2024

I have been working on refactoring the tools code to be more aligned with vLLM, but I wanted to make sure this was actually aligned with goals before going further. Here is what I've been working on:

  • Ability to choose a tool parser on model loading (to bypass the need to do string matches to identify the appropriate parser, similar to --tool-call-parser in vLLM)
  • Refactored tool parsing into a class for maintainability
  • Implement tool_choice to force a particular tool choice and use outlines for constrained generation
@Blaizzy
Copy link
Collaborator

Blaizzy commented Nov 21, 2024

That sounds good to me!

I have been thinking about it structured outputs and I think outlines bring that as a nice bonus to your last point.

@Blaizzy
Copy link
Collaborator

Blaizzy commented Nov 21, 2024

Btw, have you used OpenWebUI?

If so, do you know what we are missing to integrate with it?

@viljark
Copy link

viljark commented Nov 21, 2024

I think the first thing to do would be to implement a /v1/models endpoint, so OpenWebUI can display the available models you can choose from. I have a simple example here: https://github.com/viljark/fastmlx/blob/main/fastmlx/fastmlx.py#L576

@Blaizzy
Copy link
Collaborator

Blaizzy commented Nov 22, 2024

Thank you very much @viljark!

I will take a look and add it.

But I got a talk and full day tomorrow.

Could you send a PR with this change? :)

I would be happy to review and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants