fix margin

This commit is contained in:
Fraser
2023-04-01 03:22:00 -04:00
parent d49e18d4d0
commit ebeba0cfbb
3 changed files with 6 additions and 5 deletions
+4 -3
View File
@@ -28,6 +28,7 @@ def limit_tokens(text: str, max_tokens: int, encoding_name: str = "cl100k_base")
return encoding.decode(tokens)
def construct_prompt(query: str, history: List[Dict[str, str]], context: List[Block], encoding_name: str = "cl100k_base"):
# History takes the format: history=[
# {"role": "system", "content": "You are a helpful assistant."},
# {"role": "user", "content": "Who won the world series in 2020?"},
@@ -112,9 +113,9 @@ def talk_to_robot(dataset_dict, query: str, history: List[Dict[str, str]] = [],
# 2. Generate a prompt for the ChatCompletions API
prompt, max_tokens_completion = construct_prompt(query, history, top_k_blocks)
print(" ------------------------------ prompt: -----------------------------")
for message in prompt:
print(f"{message['role']}: {message['content']}\n\n")
# print(" ------------------------------ prompt: -----------------------------")
# for message in prompt:
# print(f"{message['role']}: {message['content']}\n\n")
# if we were to error out, return something like this
# return (False, "Example error message", None)
+1 -1
View File
@@ -16,7 +16,7 @@ const Header: React.FC<{page: "index" | "semantic"}> = ({page}) => {
return (<>
<div className="flex my-4">
<h1 className="flex-1 my-0">Alignment Search</h1>
<h1 className="flex-1 my-0">AlignmentSearch</h1>
{sidebar}
</div>
<p>
+1 -1
View File
@@ -87,7 +87,7 @@ const ShowEntry: React.FC<{entry: Entry}> = ({entry}) => {
// system reply
return (
<div className="my-3">
<div className="mt-3 mb-8">
{ // split into paragraphs
entry.display_content.split("\n").map(paragraph => ( <p> {
paragraph.split(in_text_citation_regex).map((text, i) => {