-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
f2571d0
commit 06896ab
Showing
4 changed files
with
8 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
/* horseman-config enable-openai */ | ||
|
||
/** | ||
* This is a simple example of using the raw HTML content with a prompt. | ||
* This is a simple example of using the raw HTML content with a prompt. | ||
* Note this will likely cause an error if you're sending the complete HTML. | ||
* Horseman will attempt to limit the amount of tokens you're sending by truncating | ||
* your probme but it's not perfect. | ||
*/ | ||
|
||
/* Fetch the raw HTML */ | ||
const html = document.documentElement.outerHTML | ||
|
||
/* Ask gpt-3.5-turbo to generate a new description */ | ||
return { | ||
prompt: \`Do something with the following HTML: \${ html } \` | ||
prompt: `Do something with the following HTML: ${ html } ` | ||
} |
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