-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Console definition in genaiscript.d.ts (#485)
* console defined in genaiscript.d.ts * log message * better weaving of console.log in trace * show output in run prompt
- Loading branch information
Showing
19 changed files
with
355 additions
and
48 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,19 @@ | ||
script({ | ||
model: "openai:gpt-3.5-turbo", | ||
tests: {}, | ||
}) | ||
|
||
console.log("log") | ||
console.warn(`warn`) | ||
console.error(`error`) | ||
|
||
await runPrompt((_) => { | ||
_.console.log("prompt.log") | ||
_.console.warn("prompt.warn") | ||
_.console.error("prompt.error") | ||
_.$`write a movie title` | ||
}, { label: "inner prompt"}) | ||
|
||
console.log(`after run prompt`) | ||
|
||
$`write a poem` |
Oops, something went wrong.