https://promptfoo.dev/ logo
Hi all! Is it possible to define OpenAI functions ...
# ❓|questions
f
I'm trying something like, for example
gpt-4.yaml
:
Copy code
id: 'gpt-4-1106-preview'
config:
  "functions": [
    {
      "name": "get_current_weather",
Then I tried to execute
eval -r gpt-4.yaml
and also adding
providers: [gpt-4.yaml]
to my test config, but both raises:
Copy code
gpt-4.yaml:3
  "functions": [
             ^

SyntaxError: Unexpected token ':'
is this possible? How would I approach a centralized definition for a config containing function calls? I have some function definitions that will be used for all prompts and I'm trying to centralize the configuration in a single file that can be used by multiple prompt tests. Thanks! 🙇‍♂️
i
I don't think that external
.yaml
provider imports are supported right now. However, it wouldn't be too difficult to add- let me see what I can do.
f
Thank you. So the only way right now to define the functions is on each config file?
i
That's correct
That said, just opened a PR that adds this functionality:
Copy code
yaml
providers:
  - file://gpt-3.5.yaml
  - file://gpt-4.yaml
  # ...
It'll be in the next release https://github.com/promptfoo/promptfoo/pull/296
Thank you!
2 Views