Formatting & improving imports

This commit is contained in:
2024-02-23 09:50:43 +01:00
parent aa5c03b17e
commit 32b6b5c42e
40 changed files with 148 additions and 150 deletions

View File

@@ -22,15 +22,15 @@ class AnthropicLLMEngine(BaseLLMEngine):
super().__init__()
def generate(
self,
system_prompt: str,
chat_prompt: str,
max_tokens: int = 1024,
temperature: float = 1.0,
json_mode: bool = False,
top_p: float = 1,
frequency_penalty: float = 0,
presence_penalty: float = 0,
self,
system_prompt: str,
chat_prompt: str,
max_tokens: int = 1024,
temperature: float = 1.0,
json_mode: bool = False,
top_p: float = 1,
frequency_penalty: float = 0,
presence_penalty: float = 0,
) -> str | dict:
prompt = f"""{anthropic.HUMAN_PROMPT} {system_prompt} {anthropic.HUMAN_PROMPT} {chat_prompt} {anthropic.AI_PROMPT}"""
if json_mode: