Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you set a name for a provider when it's coming from a separate file? #511

Closed
vhpoet opened this issue Feb 29, 2024 · 3 comments
Closed

Comments

@vhpoet
Copy link

vhpoet commented Feb 29, 2024

Currently, I can write:

providers:
  - openai:gpt-3.5-turbo
    id: openai-gpt-3.5-turbo-hightemp
    config:
      temperature: 0.9

This means the model is openai:gpt-3.5-turbo, and the name of the model that's also visible in the output HTML is openai-gpt-3.5-turbo-hightemp.

If the provider is coming from a file like this one:

providers:
  - file://providers/gpt-3.5-turbo-lowtemp.yaml

Then the provider file looks like this:

id: openai:gpt-3.5-turbo
config:
  temperature: 0.2

Here, the ID refers to the model, but I couldn't find a way to specify the name. So, what ends up happening is that I don't see the names of the models in my HTML output anymore.

@typpo
Copy link
Collaborator

typpo commented Mar 4, 2024

Thanks for raising this, you're right that it's an issue when you include the provider in the way that you described. I'd like to add a label field or similar to the provider object, and get rid of the map that is used right now to label providers. That will make it easy for you to add a label.

@typpo
Copy link
Collaborator

typpo commented Mar 17, 2024

#563 adds this capability, e.g. with the following setup:

promptfooconfig.yaml:

prompts:
  - 'Respond to the following instruction: {{message}}'

providers:
  - file://lowtemp.yaml
  - file://hightemp.yaml

tests:
  - vars:
      message: What's the capital of France?
  # ...

lowtemp.yaml:

id: openai:gpt-3.5-turbo-0613
label: openai-gpt-3.5-turbo-lowtemp
config:
  temperature: 0

hightemp.yaml:

id: openai:gpt-3.5-turbo-0613
label: openai-gpt-3.5-turbo-hightemp
config:
  temperature: 1

@typpo
Copy link
Collaborator

typpo commented Mar 18, 2024

Released in 0.48.0!

@typpo typpo closed this as completed Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants