Skip to content

Commit

Permalink
updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Aug 16, 2024
1 parent f040f67 commit 395b224
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions packages/sample/genaisrc/style/runprompt.genai.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@ script({
tests: {}
})

const res = await runPrompt(_ => {
const resPoem = await runPrompt(_ => {
_.$`write haiku poem`
}, {
model: "openai:gpt-3.5-turbo",
label: "generate poem",
system: ["system"]
})

const resJSON = await runPrompt(_ => {
_.$`generate 3 random numbers between 1 and 10 and respond in JSON`
}, {
model: "openai:gpt-3.5-turbo",
label: "Is this JSON?",
label: "generate json",
responseType: "json_object",
system: ["system", "system.zero_shot_cot"]
})

$`Is this JSON?
$`Is this poetry? Respond yes or no.`
fence(resPoem.text)

$`Is this JSON? Respond yes or no.`
fence(resJSON.text)

${res.text}`

0 comments on commit 395b224

Please sign in to comment.