-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
86 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\Domains\Prompts; | ||
|
||
use Illuminate\Support\Facades\Log; | ||
|
||
class SearchPrompt | ||
{ | ||
public static function prompt(string $originalPrompt): string | ||
{ | ||
|
||
|
||
Log::info("[LaraChain] - SearchPrompt"); | ||
return <<<PROMPT | ||
The user is asking to search the web but I want you to review the query and clean it keeping it as | ||
a string. | ||
Here are some examples of how I want you to return the data: | ||
### RETURN FORMAT | ||
in: Search the web for PHP news and Laravle news | ||
out: php news OR laravel news -filetype:pdf -intitle:pdf | ||
in: current data on the llm industry | ||
out: llm industry news OR llm industry updates -filetype:pdf -intitle:pdf | ||
in: latest news on the laravel framework | ||
out: laravel framework news OR laravel framework updates -filetype:pdf -intitle:pdf | ||
### END RETURN FORMAT | ||
### START USER QUERY | ||
$originalPrompt | ||
### END USER QUERY | ||
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
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