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

server : Improve code snippets direction between RTL text #11221

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

ebraminio
Copy link
Contributor

@ebraminio ebraminio commented Jan 13, 2025

This turns

image

to this

image

The prompt is: سلام آیا می‌توانی کدی به زبان سی بنویسی که دو عدد را به صورت گرفته و جمع کرده و در خروجی چاپ کند؟ ممنونم (basically asks to write a C code to take two numbers and print the sum) and the model is 'phi-4-q4.gguf' of https://huggingface.co/microsoft/phi-4-gguf

If you want the picture however, it's better to not apply dir="auto" to the whole message but to apply it to every individual paragraphs, like what is suggested on markdown-it/markdown-it#635 (comment) which refers to what I implemented in gitlab years ago https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6296 and the solution for markdown-it is to add a plugin https://github.com/dobidi/markdown-it-bidi but I wasn't sure if adding a new dependency just for this sake is acceptable and this will cover the most cases which is intended for llama-server but surely can be considered for later.

@ngxson ngxson merged commit c5bf0d1 into ggerganov:master Jan 14, 2025
6 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