reformat with black

This commit is contained in:
cce 2024-12-06 23:48:41 -05:00
parent fc2d663773
commit acf01251f3
No known key found for this signature in database

View File

@ -43,10 +43,13 @@ class Claude(Base):
def create_messages(self, text, intermediate_messages=None): def create_messages(self, text, intermediate_messages=None):
"""Create messages for the current translation request""" """Create messages for the current translation request"""
current_msg = {"role": "user", "content": self.prompt_template.format( current_msg = {
text=text, "role": "user",
language=self.language, "content": self.prompt_template.format(
)} text=text,
language=self.language,
),
}
messages = [] messages = []
if intermediate_messages: if intermediate_messages:
@ -67,12 +70,9 @@ class Claude(Base):
"content": self.prompt_template.format( "content": self.prompt_template.format(
text="\n\n".join(self.context_list), text="\n\n".join(self.context_list),
language=self.language, language=self.language,
) ),
}, },
{ {"role": "assistant", "content": "\n\n".join(self.context_translated_list)},
"role": "assistant",
"content": "\n\n".join(self.context_translated_list)
}
] ]
def save_context(self, text, t_text): def save_context(self, text, t_text):