Skip to content

[AQUA] Add API endpoints to manage chat templates via model custom metadata #1213

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

siddhantm005
Copy link
Member

@siddhantm005 siddhantm005 commented Jun 24, 2025

Description

This PR introduces a new API handler, AquaModelChatTemplateHandler, replacing the previous AquaModelTokenizerConfigHandler functionality related to chat templates.


Changes

  • New GET endpoint

Retrieves the chat template from a model’s custom metadata instead of the Hugging Face tokenizer configuration.
Endpoint: GET /aqua/model/<model-ocid>/chat-template

  • New POST endpoint

Allows adding or updating a custom chat template metadata artifact for a given model.
Endpoint: POST /aqua/model/<model-ocid>/chat-template
Payload: { "chat_template": "<chat_template_string>" }


Unit Tests

Screenshot 2025-06-24 at 10 00 01 PM

- Added post endpoint for Model Tokenizer
- Updated chat template API endpoint in AquaModelChatTemplateHandler
- Added test cases for AquaModelChatTemplateHandler
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 24, 2025
Copy link

📌 Cov diff with main:

Coverage-92%

📌 Overall coverage:

Coverage-58.21%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant