From 770d34113daa4ff8cb6fc6fa2ddaa37351750060 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Thu, 19 Oct 2023 00:18:14 -0700 Subject: cleanup server --- server/continuedev/libs/llm/prompts/chat.py | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'server/continuedev/libs/llm') diff --git a/server/continuedev/libs/llm/prompts/chat.py b/server/continuedev/libs/llm/prompts/chat.py index 036f1b1a..49010229 100644 --- a/server/continuedev/libs/llm/prompts/chat.py +++ b/server/continuedev/libs/llm/prompts/chat.py @@ -1,25 +1,6 @@ from textwrap import dedent from typing import Dict, List -from anthropic import AI_PROMPT, HUMAN_PROMPT - - -def anthropic_template_messages(messages: List[Dict[str, str]]) -> str: - prompt = "" - - # Anthropic prompt must start with a Human turn - if ( - len(messages) > 0 - and messages[0]["role"] != "user" - and messages[0]["role"] != "system" - ): - prompt += f"{HUMAN_PROMPT} Hello." - for msg in messages: - prompt += f"{HUMAN_PROMPT if (msg['role'] == 'user' or msg['role'] == 'system') else AI_PROMPT} {msg['content']} " - - prompt += AI_PROMPT - return prompt - def template_alpaca_messages(msgs: List[Dict[str, str]]) -> str: prompt = "" -- cgit v1.2.3-70-g09d2