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

Add model chat example #1197

Merged
merged 15 commits into from
Jan 22, 2025
Merged

Add model chat example #1197

merged 15 commits into from
Jan 22, 2025

Conversation

ajindal1
Copy link
Collaborator

This PR does 2 things:

  1. Expose Model type to Python so that it can be used to determine chat template
  2. Add model-chat script which can ideally run any model, along with figuring out chat template for known models.

src/python/python.cpp Outdated Show resolved Hide resolved
src/ort_genai_c.h Outdated Show resolved Hide resolved
examples/python/model-chat.py Show resolved Hide resolved
@ajindal1 ajindal1 requested a review from baijumeswani January 22, 2025 05:24
src/python/python.cpp Outdated Show resolved Hide resolved
@ajindal1 ajindal1 requested a review from baijumeswani January 22, 2025 18:07
examples/python/model-chat.py Outdated Show resolved Hide resolved
src/python/python.cpp Outdated Show resolved Hide resolved
@ajindal1 ajindal1 requested a review from baijumeswani January 22, 2025 19:54
Copy link
Collaborator

@baijumeswani baijumeswani left a comment

Choose a reason for hiding this comment

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

Can you get the other exit(1)s as well when possible?

@ajindal1 ajindal1 merged commit 96344da into main Jan 22, 2025
12 of 14 checks passed
@ajindal1 ajindal1 deleted the abjindal/add_model_chat_example branch January 22, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants