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

Adding Code Formatting to Model outputs #4

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

Conversation

acebot712
Copy link
Contributor

No description provided.

@acebot712 acebot712 requested a review from wjessup May 17, 2023 19:01
@@ -6,15 +6,26 @@

columns = []


def get_max_line_height(responses):
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets leave this out since we don't need responses to be same height.

def drafts_template(i, content):
return f"<div class='draft'><div><b>Draft {i + 1}</b></div>{content['content']}</div>"
def drafts_template(i, response, max_line_height):
return f"<div class='draft' style='height:{max_line_height}px;'><div><b>Draft {i + 1}</b></div><div><pre><code class='language-python'>{response['content']}</code></pre></div></div>"
Copy link
Collaborator

Choose a reason for hiding this comment

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

we shouldn't hardcode the code language here

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