Skip to content

Conversation

@ngxson
Copy link
Collaborator

@ngxson ngxson commented Jan 19, 2026

In this PR:

  • Rename oaicompat_parser_options --> server_chat_params
  • Store common_chat_templates_ptr inside it
  • ctx_server.get_meta() now returns common_chat_templates_ptr
  • For CLI: chat template is now applied in cli.cpp; this should allow defining tools from CLI in the future

Copy link
Collaborator

@pwilkin pwilkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor one.


// print sample chat example to make it clear which template is used
// @ngxson modern templates are too long, spam the logs; printing the example is enough
LOG_INF("%s: chat template, example_format: '%s'\n", __func__,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move this to after line 881 instead of calling example twice? If we fallback to chatml we don't really need to print the example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, I removed the chatml fallback logic altogether

@ngxson ngxson merged commit 6df686b into ggml-org:master Jan 19, 2026
70 of 75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants