Promptfoo

Latest version: v0.1.0

Safety actively analyzes 682457 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 13 of 28

0.45.0

What's Changed
* feat: ability to load `vars` values at runtime by typpo in https://github.com/promptfoo/promptfoo/pull/496
* feat(anthropic): Add Claude 3 support by streichsbaer in https://github.com/promptfoo/promptfoo/pull/526

Breaking
496 makes it possible to return dynamic data as a variable. This is useful for testing RAG applications.

Users importing Javascript or Python vars files must adhere to the new [dynamic vars format](https://promptfoo.dev/docs/configuration/guide#import-vars-from-separate-files).

Javascript example:
js
module.exports = function (varName, prompt, otherVars) {
// Example logic to return a value based on the varName
if (varName === 'context') {
return `Processed ${otherVars.input} for prompt: ${prompt}`;
}
return {
output: 'default value',
};

// Handle potential errors
// return { error: 'Error message' }
};


Python example:
py
def get_var(var_name, prompt, other_vars):
Example logic to dynamically generate variable content
if var_name == 'context':
return {
'output': f"Context for {other_vars['input']} in prompt: {prompt}"
}
return {'output': 'default context'}

Handle potential errors
return { 'error': 'Error message' }


**Full Changelog**: https://github.com/promptfoo/promptfoo/compare/0.44.0...0.45.0

0.44.0

What's Changed
* feat(mistral): Add new models, JSON mode, and update pricing by streichsbaer in https://github.com/promptfoo/promptfoo/pull/500
* fix: Print incorrect response from factuality checker by jameshfisher in https://github.com/promptfoo/promptfoo/pull/503
* fix(ollama): dont send invalid options for `OllamaChatProvider` by typpo in https://github.com/promptfoo/promptfoo/pull/506
* fix: Support missing open parenthesis (fixes 504) by jameshfisher in https://github.com/promptfoo/promptfoo/pull/505
* feat: include prompt in transform by typpo in https://github.com/promptfoo/promptfoo/pull/512
* feat: Support csv and json files in the `tests` array by typpo in https://github.com/promptfoo/promptfoo/pull/520
* fix(huggingface): do not pass through non-hf parameters by typpo in https://github.com/promptfoo/promptfoo/pull/519

New Contributors
* jameshfisher made their first contribution in https://github.com/promptfoo/promptfoo/pull/503

**Full Changelog**: https://github.com/promptfoo/promptfoo/compare/0.43.1...0.44.0

0.43.1

What's Changed
* fix(huggingface): support `apiKey` config param by typpo in https://github.com/promptfoo/promptfoo/pull/494
* fix(bedrock): transform model output from cache. 474
* fix: pass through PROMPTFOO_* variables from docker run (498)
* docs: clean up python provider header
* docs(huggingface): example of private huggingface inference endpoint by typpo in https://github.com/promptfoo/promptfoo/pull/497


**Full Changelog**: https://github.com/promptfoo/promptfoo/compare/0.43.0...0.43.1

0.43.0

What's Changed
* feat: pass `test` to assertion context by typpo in https://github.com/promptfoo/promptfoo/pull/485
* feat(webui): Display test suite description by typpo in https://github.com/promptfoo/promptfoo/pull/487
* feat(webui): Add upload testcase csv to eval page by gingerhendrix in https://github.com/promptfoo/promptfoo/pull/484
* fix: Change variable name to what the prompt template expects by pether-b in https://github.com/promptfoo/promptfoo/pull/489
* fix(self-hosting): remove supabase dependency from webui eval view by typpo in https://github.com/promptfoo/promptfoo/pull/492
* (docs): Replace references to deprecated postprocess option by gingerhendrix in https://github.com/promptfoo/promptfoo/pull/483
* chore: update replicate library and add new common params by typpo in https://github.com/promptfoo/promptfoo/pull/491

New Contributors
* gingerhendrix made their first contribution in https://github.com/promptfoo/promptfoo/pull/483
* pether-b made their first contribution in https://github.com/promptfoo/promptfoo/pull/489

**Full Changelog**: https://github.com/promptfoo/promptfoo/compare/0.42.0...0.43.0

0.42.0

What's Changed
* feat: add support for claude 2.1 on bedrock by typpo in https://github.com/promptfoo/promptfoo/pull/470
* feat(webview): toggle for prettifying json outputs by typpo in https://github.com/promptfoo/promptfoo/pull/472
* feat: support for overriding `select-best` provider by typpo in https://github.com/promptfoo/promptfoo/pull/478
* feat(openai): support handling OpenAI Assistant functions tool calls by aloisklink in https://github.com/promptfoo/promptfoo/pull/473
* feat: ability to disable var expansion by typpo in https://github.com/promptfoo/promptfoo/pull/476
* fix: improve escaping for python prompt shell by typpo in https://github.com/promptfoo/promptfoo/pull/481

New Contributors
* aloisklink made their first contribution in https://github.com/promptfoo/promptfoo/pull/473

**Full Changelog**: https://github.com/promptfoo/promptfoo/compare/0.41.0...0.42.0

0.41.0

What's Changed
* feat(openai)!: Allow apiBaseUrl to override /v1 endpoint by typpo in https://github.com/promptfoo/promptfoo/pull/464

This is a potentially breaking change for anyone using the `apiBaseUrl` property on OpenAI provider.

Before: `/v1` was automatically appended to the base URL.
After: `/v1` is not automatically appended to the base URL.

**If this breaks you, you probably just have to append `/v1` to `apiBaseUrl`**

This change brings the behavior in line with OpenAI's SDK, and solves compatibility issues with other OpenAI-compatible APIs such as perplexity.

* feat: add support for async python providers by typpo in https://github.com/promptfoo/promptfoo/pull/465
* fix: pass config to python provider by typpo in https://github.com/promptfoo/promptfoo/pull/460
* fix(factuality): make factuality output case-insensitive by typpo in https://github.com/promptfoo/promptfoo/pull/468
* chore: include progress output in debug logs by typpo in https://github.com/promptfoo/promptfoo/pull/461
* docs: perplexity example by typpo in https://github.com/promptfoo/promptfoo/pull/463


**Full Changelog**: https://github.com/promptfoo/promptfoo/compare/0.40.0...0.41.0

Page 13 of 28

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.