Skip to content

Commit

Permalink
docs: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
snowyu committed Aug 28, 2024
1 parent 6a5b487 commit bc4a393
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions lib/json.ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ description: |-
type: "object"
...
---
# begin your script prompts
...
assistant: "[[THE_CONTENT]]"
# the assistant's response(`THE_CONTENT`) and output will be passed into the `json` script:
# the assistant's response(`THE_CONTENT`) will be passed into the `json` script as `content` input:
-> json(output=output)
```
Or, run it directly:
Expand Down Expand Up @@ -44,6 +45,16 @@ prompt:
input:
- content # The content to extract
- output # JSON Schema
parameters:
# force output to json object
response_format:
type: "json_object"
ProtectedStartup: [input, prompt.messages]
# following are the default input values to demo
content: >-
Needed a nice lamp for my bedroom, and this one had additional storage and not too high of a price point. Got it fast.
The string to our lamp broke during the transit and the company happily sent over a new one. Came within a few days as well. It was easy to put together.
I had a missing part, so I contacted their support and they very quickly got me the missing piece! Lumina seems to me to be a great company that cares about their customers and products!!
output:
type: "object"
properties:
Expand All @@ -66,12 +77,4 @@ output:
type: "boolean"
description: "Is the reviewer expressing anger?"
required: ["sentiment", "products", "anger"]
parameters:
response_format:
type: "json_object"
ProtectedStartup: [input, prompt.messages]
content: >-
Needed a nice lamp for my bedroom, and this one had additional storage and not too high of a price point. Got it fast.
The string to our lamp broke during the transit and the company happily sent over a new one. Came within a few days as well. It was easy to put together.
I had a missing part, so I contacted their support and they very quickly got me the missing piece! Lumina seems to me to be a great company that cares about their customers and products!!
---

0 comments on commit bc4a393

Please sign in to comment.