-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚜 Reorg and move prompt commands around
- Loading branch information
Showing
5 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
54 changes: 54 additions & 0 deletions
54
cmd/pinocchio/prompts/examples/code/php-property-promotion.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: php-property-promotion | ||
short: Generate a class with constructor property promotion | ||
factories: | ||
openai: | ||
client: | ||
timeout: 120 | ||
completion: | ||
engine: code-cushman-001 | ||
temperature: 0.2 | ||
max_response_tokens: 1024 | ||
stop: | ||
- // End Output | ||
# stream: true | ||
flags: | ||
- name: instructions | ||
type: string | ||
help: Additional language specific instructions | ||
- name: readonly | ||
type: bool | ||
default: true | ||
help: Make the class readonly | ||
arguments: | ||
- name: input_file | ||
type: stringFromFile | ||
help: Input file containing the attribute definitions | ||
required: true | ||
prompt: | | ||
Write a {{ if .readonly }}readonly{{end}} PHP class with constructor property promotion for the following fields. | ||
{{ if .instructions }}{{ .instructions }}{{ end }} | ||
For example: | ||
// Input | ||
public ?int $productId; // Internal product ID for reference | ||
public ?string $itemId; // The ID of the item | ||
// End Input | ||
// Output | ||
public function __construct( | ||
/** Internal product ID for reference */ | ||
public ?int $productId = null, | ||
/** The ID of the item */ | ||
public ?string $itemId = null, | ||
) {} | ||
// End Output | ||
Now create a constructor for the following fields. | ||
// Input | ||
{{ .input_file }} | ||
// End Input | ||
// Output |
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
cmd/pinocchio/prompts/examples/simple/chain_of_thought.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: chain-of-thought | ||
short: Show a chain of thought example | ||
factories: | ||
openai: | ||
client: | ||
timeout: 120 | ||
completion: | ||
engine: text-curie-001 | ||
temperature: 0.2 | ||
max_response_tokens: 256 | ||
# stream: true | ||
flags: | ||
- name: with_chain_of_thought | ||
type: bool | ||
help: Enable chain of thought | ||
prompt: | | ||
Given: The database tables orders(customer_id,shipping_state,value), line_items(order_id,product_id,quantity), products(id,category) and the categories shrubs, roses, azaleas, privacy trees, maple trees. | ||
Question: How many people ordered flowers in the southwest since spring? | ||
SQL: | ||
SELECT COUNT(DISTINCT orders.customer_id) | ||
FROM orders | ||
JOIN line_items ON orders.order_id = line_items.order_id | ||
JOIN products ON line_items.product_id = products.id | ||
WHERE products.category IN ('roses', 'azaleas') | ||
AND orders.shipping_state IN ('AZ', 'NM', 'TX', 'CO', 'UT', 'NV', 'OK') | ||
AND orders.value >= '2022-03-20' | ||
Question: What is the average order value of orders containing trees placed last year in the north east? | ||
SQL: |
File renamed without changes.