https://promptfoo.dev/ logo
OpenAI style prompt template with Anthropic via Be...
# ❓|questions
n
I am accessing anthropic claude3 over bedrock. Anthropic's message http endpoint uses a top level param of
system
to pass the system prompt with the
messages
param restricted to user & assistant content. Promptfoo docs state that the anthropic provider plays nicely with openai style "messages" prompt templates: https://www.promptfoo.dev/docs/providers/anthropic#prompt-template. When the anthropic provider runs across that style of template it will parse the template and properly set the system and messages params sent to the Anthropic endpoint. Unfortunately, the bedrock provider makes no mention of similar functionality: https://github.com/promptfoo/promptfoo/tree/main/examples/amazon-bedrock. The examples for bedrock all use pretty elementary prompt templates with variables being appended at the end some static instructions. Can i use the openai style "messages" prompt templates with Anthropic via Bedrock? If not, how can i set the system prompt separately from the user messages when working with Anthropic via Bedrock?
I am guessing the anthropic bedrock provider plays nicely with those openai style prompt templates when running a claude3 model: https://github.com/promptfoo/promptfoo/blob/main/src/providers/bedrock.ts#L59
i
yeah, that's correct - the Bedrock provider supports OpenAI-style prompts for Anthropic's "Messages" API (this includes all the latest version of Claude)
is there a different model that you need system message support for?
n
no, at the time we are just working with openai on azure and claude 3 on bedrock. thanks for the response ian!
i
👍 lmk if you run into any other issues!