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

Can a summary ouput formatted text? #39

Open
zezretro opened this issue Dec 6, 2024 · 2 comments
Open

Can a summary ouput formatted text? #39

zezretro opened this issue Dec 6, 2024 · 2 comments

Comments

@zezretro
Copy link

zezretro commented Dec 6, 2024

I like the summary system where you create prompt templates for text.

It seems that when the answer comes back from the model, the answers text has lost its formatting like spaces, tabs and new lines.

I tried writing into the template and asking for a well formatted response and it did change the text but the space, tab and newline were not coming out.

Would there be a way to keep the formatting or am I missing the point of a summary?

thank you!

@tychart
Copy link

tychart commented Dec 12, 2024

I am getting the same problem, looking at the logs, it looks as though the output from the LLM comes back in fully formatted markdown, but it looks like the formatting is getting stripped. Here is the log for scriberr, and here is what that looks like in the web ui.

scriberr-1    | /api/records/ldzxanb9i29hj4q
scriberr-1    | {
scriberr-1    |   id: 'chatcmpl-944',
scriberr-1    |   object: 'chat.completion',
scriberr-1    |   created: 1734027987,
scriberr-1    |   model: 'llama3.2:latest',
scriberr-1    |   system_fingerprint: 'fp_ollama',
scriberr-1    |   choices: [ { index: 0, message: [Object], finish_reason: 'stop' } ],
scriberr-1    |   usage: { prompt_tokens: 71, completion_tokens: 224, total_tokens: 295 }
scriberr-1    | }
scriberr-1    | {
scriberr-1    |   index: 0,
scriberr-1    |   message: {
scriberr-1    |     role: 'assistant',
scriberr-1    |     content: 'This quote is from the Gettysburg Address, delivered by President Abraham Lincoln on November 19, 1863. The speech commemorates the soldiers who died at Gettysburg and reaffirms the principles of equality and liberty upon which the United States was founded.\n' +
scriberr-1    |       '\n' +
scriberr-1    |       "Lincoln's speech is a reinterpretation of the original purpose of the American Revolution, which he sees as still unfinished by the Civil War. He redefines American democracy to honor its ideals of freedom and equality, emphasizing that all individuals are created equal and have an inherent right to participate in the democratic process.\n" +
scriberr-1    |       '\n' +
scriberr-1    |       'Key points:\n' +
scriberr-1    |       '\n' +
scriberr-1    |       '1. The United States was founded on principles of liberty and equality.\n' +
scriberr-1    |       "2. The country's founders sought to create a new nation built on these values.\n" +
scriberr-1    |       '3. Lincoln reiterates these ideals, especially during times of war and division.\n' +
scriberr-1    |       '4. He emphasizes that all men are created equal, regardless of race or social status.\n' +
scriberr-1    |       '\n' +
scriberr-1    |       "Overall, the Gettysburg Address is a masterful rephrasing of America's founding principles, which resonated with the audience and reinforced the nation's commitment to freedom and equality."
scriberr-1    |   },
scriberr-1    |   finish_reason: 'stop'
scriberr-1    | }

image

I am just doing some preliminary testing right now to see how to use the program, but it looks amazing and just what I need! Keep up the great work!

@rishikanthc
Copy link
Owner

Right now it doesn't handle any formatting and the string clean up probably removes any additional spacing you added. This is a planned feature though. I want to render it as markdown/html for a better readability experience and export.
Might be a few weeks though before it is added. Just finished a major revamp of the app that brings in a lot of improvements and a mobile app. Keep an eye out for the new release over the next few days.

Thank you for your interest and support :) makes it fun to work on it

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

No branches or pull requests

3 participants