Skip to content

Commit

Permalink
Minor corrections in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ddebowczyk committed Mar 4, 2024
1 parent a50c2b7 commit 8bc280e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 303 deletions.
2 changes: 1 addition & 1 deletion examples/RestatingInstructions/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/**
* Identify what kind of job the user is doing.
* Typical roles we're working with are CEO, CTO, CFO, CMO, Sales, Marketing, Customer Support, Developer, Designer, etc.
* Typical roles we're working with are CEO, CTO, CFO, CMO.
* Sometimes user does not state their role directly - you will need to make a guess, based on their description.
*/
class Role
Expand Down
9 changes: 5 additions & 4 deletions examples/RewritingInstructions/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

/**
* Identify what kind of job the user is doing.
* Typical roles we're working with are CEO, CTO, CFO, CMO, Sales, Marketing, Customer Support, Developer, Designer, etc.
* Typical roles we're working with are CEO, CTO, CFO, CMO.
* Sometimes user does not state their role directly - you will need to make a guess, based on their description.
*/
class Role
{
/** Condensed points of the instructions and rules to correctly determine the user's title - just the essence. */
/** Rewrite the instructions and rules in a concise form to correctly determine the user's title - just the essence. */
public string $instructions;
/** Role description */
public string $description;
Expand All @@ -33,9 +33,10 @@ class UserDetail
public Role $role;
}

$user = (new Instructor)->respond(
$instructor = new Instructor;
$user = $instructor->respond(
messages: [["role" => "user", "content" => "I'm Jason, I'm 28 yo. I am responsible for driving growth of our company."]],
responseModel: UserDetail::class,
);

dump($instructor->request());
dump($user);

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
"description": "Extract object from provided content",
"parameters": {
"type": "object",
"title": "Tests\\Examples\\Complex\\ProjectEvents",
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"title": "item",
"description": "Array item",
"properties": {
"title": {
"type": "string",
Expand All @@ -28,7 +31,7 @@
"progress",
"other"
],
"description": "Type of the event"
"description": "Type of the event\nRepresents type of project event"
},
"status": {
"type": "string",
Expand All @@ -37,12 +40,14 @@
"closed",
"unknown"
],
"description": "Status of the event"
"description": "Status of the event\nRepresents status of project event"
},
"stakeholders": {
"type": "array",
"items": {
"type": "object",
"title": "item",
"description": "Array item",
"properties": {
"name": {
"type": "string",
Expand Down

This file was deleted.

0 comments on commit 8bc280e

Please sign in to comment.