Skip to content

OpenAI Example

Prompty can be configured to use OpenAI models.

Refer to the basic.prompty file for more examples.

YAML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
---
name: OpenAI Example
description: A prompt that uses an OpenAI model
authors:
  - example_author
model:
  api: chat
  configuration:
    type: openai
    api_key: ${env:OPENAI_API_KEY}
sample:
  question: What is the weather like today?
---
system:
You are a helpful assistant.
user:
{{question}}