Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Michael 6caea9c090
fix(providers): handle system messages correctly for bedrock Claude models (#2141)
9 months ago
..
298c8be217
fix: re-add provider context in prompt functions (#1106)
1 year ago
3ebb6a199e
chore(providers): update Claude 3.5 model version (#1973)
10 months ago
3ebb6a199e
chore(providers): update Claude 3.5 model version (#1973)
10 months ago
6caea9c090
fix(providers): handle system messages correctly for bedrock Claude models (#2141)
9 months ago

README.md

You have to be logged in to leave a comment. Sign In

Image Analysis Example

This example compares an image analysis task using:

  • gpt-4o via OpenAI
  • claude-3 via Amazon Bedrock
  • claude-3.5 via Anthropic

GPT-4o and Claude have different prompt formats. We use custom provider functions in Python and JavaScript to dynamically format the prompt based on context about the provider.

To get started, set your environment variables:

  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

If you do not have access to all of these providers, simply comment out the providers you do not have access to in promptfooconfig.yaml.

Then run:

npx promptfoo@latest eval

Afterwards, you can view the results by running:

npx promptfoo@latest view
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...