Skip to content

Error get_chat_completion_handler is missing #10

Open

Description

@harrier77

Loading a model failed with:
"module 'llama_cpp.llama_chat_format' has no attribute 'get_chat_completion_handler'"

I checked
https://github.com/inference-sh/llama-cpp-python/blob/main/llama_cpp%2Fllama_chat_format.py
and get_chat_completion_handler is missing.
On the other hand in
https://github.com/abetlen/llama-cpp-python/blob/main/llama_cpp%2Fllama_chat_format.py
the same function was present.

Activity

  1. harrier77 commented on Oct 6, 2025

    @harrier77
    Author

    I forked this repository and patched to make my application running
    https://github.com/harrier77/llama-cpp-python/blob/main/llama_cpp/llama_chat_format.py

  2. okaris commented on Oct 7, 2025

    @okaris
    Contributor

    hi @harrier77, i moved that and some other methods to llama_chat_template.py for being able to work more easily. I hope to bring them back into the same file.

  3. harrier77 commented on Oct 9, 2025

    @harrier77
    Author

    Can you include the patch that was coded here https://github.com/fbuciuni90/llama.cpp?
    I am trying to have a forked version in sync with the official ableten repository with the patch but I am a newbee, if you succeed with your fork I will follow it instead of making a mess with my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions