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

fix: return a single chat message instead of an empty list when template has no {% chat %} tags #18

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

masci
Copy link
Owner

@masci masci commented Oct 6, 2024

When no {% chat %} tag is present in the template, Prompt.chat_messages() returns an empty list.
With this PR instead, we return a single user message containing the rendered template for convenience.

@masci masci changed the title fix: return a single chat message instead of an empty list fix: return a single chat message instead of an empty list when template has no {% chat %} tags Oct 6, 2024
@coveralls
Copy link

Coverage Status

coverage: 91.416% (+0.06%) from 91.361%
when pulling 3f36713 on massi/chat
into 7811818 on main.

@masci masci merged commit e7eb0d0 into main Oct 6, 2024
10 checks passed
@masci masci deleted the massi/chat branch October 6, 2024 17:40
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