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

Proposal to monospace font (Roboto Mono) in responses with code #68

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion client/css/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100;200;300;400;500;600;700&display=swap");

/* :root {
--colour-1: #ffffff;
Expand Down Expand Up @@ -32,6 +33,7 @@

:root {
--font-1: "Inter", sans-serif;
--font-mono-1: "Roboto Mono", monospace;
--section-gap: 25px;
--border-radius-1: 8px;
}
Expand All @@ -44,6 +46,10 @@
font-family: var(--font-1);
}

pre * {
font-family: var(--font-mono-1);
}

html,
body {
scroll-behavior: smooth;
Expand Down Expand Up @@ -812,4 +818,4 @@ a:-webkit-any-link {
--clr-card-bg: hsl(209 50% 5%);
--colour-3: hsl(209 50% 90%);
--conversations: hsl(209 50% 80%);
}
}
2 changes: 2 additions & 0 deletions client/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
<option value="gpt-4">gpt-4</option>
<option value="gpt-3.5-turbo-0301">gpt-3.5-turbo-0301</option>
<option value="gpt-4-0314">gpt-4-0314</option>
<option value="gpt-4-turbo-preview">gpt-4-turbo-preview</option>
<option value="gpt-3.5-turbo-0125">gpt-3.5-turbo-0125</option>
</select>
<!-- <span class="about">Model</span> -->
</div>
Expand Down
6 changes: 4 additions & 2 deletions server/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _conversation(self):
_conversation = request.json['meta']['content']['conversation']
prompt = request.json['meta']['content']['parts'][0]
current_date = datetime.now().strftime("%Y-%m-%d")
system_message = f'You are ChatGPT also known as ChatGPT, a large language model trained by OpenAI. Strictly follow the users instructions. Knowledge cutoff: 2021-09-01 Current date: {current_date}'
system_message = f'You are ChatGPT also known as ChatGPT, a large language model trained by OpenAI. Strictly follow the users instructions. Current date: {current_date}'

extra = []
if internet_access:
Expand Down Expand Up @@ -106,7 +106,9 @@ def stream():
print(e.__traceback__.tb_next)
continue

return self.app.response_class(stream(), mimetype='text/event-stream')
resp = self.app.response_class(stream(), mimetype='text/event-stream')
resp.headers['X-Accel-Buffering'] = 'no'
return resp

except Exception as e:
print(e)
Expand Down