Skip to content

Commit

Permalink
update examples and version of package
Browse files Browse the repository at this point in the history
  • Loading branch information
narenaryan committed May 6, 2024
1 parent 3cc8ba5 commit adf95b9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 24 deletions.
10 changes: 6 additions & 4 deletions examples/basic-calculator/calculator.jinja2
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
Context: {{ prompt.context }}

Domain: {{ prompt.metadata.domain }}

Task Difficulty: {{ prompt.constraints.difficulty }}

Reply in tone: {{ prompt.constraints.tone }}

Follow the below instructions step-by-step for objective:
{% for instruction in prompt.instructions -%}
{{loop.index}}. {{ instruction }}
{% endfor %}

Audience: {{ prompt.metadata.domain }}
Task Difficulty: {{ prompt.metadata.difficulty }}
Reply in tone: {{ prompt.constraints.tone }}

Objective: {{ prompt.objective }}
9 changes: 3 additions & 6 deletions examples/basic-calculator/calculator.pml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@
@tone
Friendly
@end
@end
@metadata
@domain
Education
@end

@difficulty
Beginner
@end
@end
@metadata
domain: 'Mathematics'
@end
@end
3 changes: 1 addition & 2 deletions examples/poem-writer/poem.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ Examples:
{%- endfor %}
{% endfor %}

Audience: {{ prompt.metadata.domain }}
Task Difficulty: {{ prompt.metadata.difficulty }}
Task Difficulty: {{ prompt.constraints.difficulty }}
Reply in tone: {{ prompt.constraints.tone }}

Objective: {{ prompt.objective }}
19 changes: 8 additions & 11 deletions examples/poem-writer/poem.pml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@end
@examples
@example
@input
@input
Requiem
@end
@output
Expand All @@ -28,11 +28,11 @@
@end

@output
My heart leaps up when I behold
My heart leaps up when I behold
A rainbow in the sky:
So was it when my life began;
So is it now I am a man;
So be it when I shall grow old,
So was it when my life began;
So is it now I am a man;
So be it when I shall grow old,
Or let me die!
The Child is father of the Man;
And I could wish my days to be
Expand All @@ -48,14 +48,11 @@
@tone
Melancholic
@end
@end
@metadata
@domain
Arts
@end

@difficulty
Beginner
@end
@end
@category
Poem
@end
@end
2 changes: 1 addition & 1 deletion src/promptml/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"""

# pylint: disable=invalid-name
version = "0.1.0"
version = "0.2.0"

0 comments on commit adf95b9

Please sign in to comment.