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

feat: apply chat template from callback #231

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

joelpaulkoch
Copy link
Contributor

I want to work with Phi-4 which has a slightly different chat template than previous versions.
I could add the template but I figured some time ago it would be practical to be able to pass a callback to apply_chat_template!/3.
This way, users don't have to wait for an release to use a new template.

So, here is a PR.
I might go ahead and add the phi-4 template in a separate PR.

@brainlid
Copy link
Owner

Hi @joelpaulkoch! I love this approach. It provides a nice future-proof way of adding one-off support for some Bumblebee hosted model.

As an FYI, this was just merged: #233

But I still want merge in your approach too.

@brainlid brainlid merged commit 674a13f into brainlid:main Jan 13, 2025
1 check passed
brainlid added a commit to montebrown/langchain that referenced this pull request Jan 22, 2025
* main:
  feat: Support for Ollama keep_alive API parameter (brainlid#237)
  support for o1 OpenAI model (brainlid#234)
  minor test cleanup
  phi_4 chat template support fix after merge
  feat: apply chat template from callback (brainlid#231)
  Add Bumblebee Phi-4 (brainlid#233)
  updated changelog
  update version and docs outline (brainlid#229)
  fix: enable verbose_deltas (brainlid#197)
  feat: Enable :inet6 for Req.new (brainlid#227)
  Breaking change: consolidate LLM callback functions (brainlid#228)
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

Successfully merging this pull request may close these issues.

2 participants