Skip to content

Working with JSON Data from Local File

Prompty can load JSON data from a local file using the file type.

Refer to the context.prompty file for more examples.

YAML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
---
name: JSON Data Prompt
description: A prompt that uses JSON data from a local file
authors:
  - example_author
model:
  api: chat
  configuration:
    azure_deployment: gpt-35-turbo
inputs: ${file:data.json}
---
system:
You are an AI assistant that processes JSON data.
user:
Please process the following data: {{inputs}}