mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
Merge pull request #499 from canada4663/bedrock-anthropic-changes
add bedrock.anthropic support for system prompt using <admin> tag
This commit is contained in:
commit
8381bb19a9
2 changed files with 8 additions and 0 deletions
|
|
@ -52,6 +52,10 @@ def completion(
|
|||
prompt += (
|
||||
f"{AnthropicConstants.HUMAN_PROMPT.value}{message['content']}"
|
||||
)
|
||||
elif message["role"] == "system":
|
||||
prompt += (
|
||||
f"{AnthropicConstants.HUMAN_PROMPT.value}<admin>{message['content']}</admin>"
|
||||
)
|
||||
else:
|
||||
prompt += (
|
||||
f"{AnthropicConstants.AI_PROMPT.value}{message['content']}"
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@ def convert_messages_to_prompt(messages, provider):
|
|||
prompt += (
|
||||
f"{AnthropicConstants.HUMAN_PROMPT.value}{message['content']}"
|
||||
)
|
||||
elif message["role"] == "system":
|
||||
prompt += (
|
||||
f"{AnthropicConstants.HUMAN_PROMPT.value}<admin>{message['content']}</admin>"
|
||||
)
|
||||
else:
|
||||
prompt += (
|
||||
f"{AnthropicConstants.AI_PROMPT.value}{message['content']}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue