-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from LlmLaraHub/source_prompting
Source prompting
- Loading branch information
Showing
74 changed files
with
8,043 additions
and
792 deletions.
There are no files selected for viewing
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
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
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
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
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
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,62 @@ | ||
<?php | ||
|
||
namespace App\Domains\Prompts; | ||
|
||
use Illuminate\Support\Facades\Log; | ||
|
||
class EventPagePrompt | ||
{ | ||
public static function prompt(string $context): string | ||
{ | ||
Log::info('[LaraChain] - EventPagePrompt'); | ||
|
||
return <<<PROMPT | ||
<ROLE> | ||
You are an AI assistant tasked with extracting event data from website content. | ||
<INSTRUCTIONS> | ||
1. Analyze the provided website HTML content below the <CONTENT> tag. | ||
2. Look for information about events within the content. | ||
3. If no event data is found, respond with a single word: false | ||
4. If event data is found, extract the following information for each event: | ||
- Event Title | ||
- Start Date | ||
- End Date | ||
- Location | ||
- Description | ||
- Any other relevant data | ||
5. Format the extracted data as a JSON array according to the specifications below. | ||
<OUTPUT_FORMAT> | ||
If events are found, return a JSON array with the following structure: | ||
[ | ||
{ | ||
"title": "Event Title", | ||
"startDate": "Start Date", | ||
"endDate": "End Date", | ||
"location": "Location", | ||
"description": "Description", | ||
"additionalInfo": "Any other relevant data" | ||
}, | ||
{ | ||
"title": "Event Title", | ||
"startDate": "Start Date", | ||
"endDate": "End Date", | ||
"location": "Location", | ||
"description": "Description", | ||
"additionalInfo": "Any other relevant data" | ||
} | ||
] | ||
If no events are found, return an empty JSON array: [] | ||
<CONTENT> | ||
$context | ||
</CONTENT> | ||
Respond only with the JSON array or 'false' if no events are found. Do not include any explanations or additional text in your response. | ||
PROMPT; | ||
} | ||
} |
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,37 @@ | ||
<?php | ||
|
||
namespace App\Domains\Prompts; | ||
|
||
use Illuminate\Support\Facades\Log; | ||
|
||
class SpecificTopic | ||
{ | ||
public static function prompt(string $context): string | ||
{ | ||
|
||
Log::info('[LaraChain] - SpecificTopic'); | ||
|
||
return <<<'PROMPT' | ||
<ROLE> | ||
You are an email reading assistant who will follow the prompts to help parse my email box. As an assistant if the user asks you for a false return you will just return false. NOTHING MORE | ||
<TASKS> | ||
If the email content passed in is about Web Application work the frame work then keep and and summarize it. Else if it is about anything else just return the word false and only the word false. Please IGNORE Spam emails or Subjects that are about web applications but then the body is SPAM | ||
<Format> | ||
On a non false response, Summary and original message as Markdown. | ||
On a false response just the word false, | ||
<EXAMPLE> | ||
I would like to hire you to build an awesome application for me with DailyAi | ||
"You have an email from Teddy asking you to use DailAi to automate his business. | ||
I would like to sell you property in Alaska | ||
False | ||
<END EXAMPLES> | ||
<CONTENT> | ||
[CONTEXT] | ||
PROMPT; | ||
} | ||
} |
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
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
Oops, something went wrong.