Create prompt
From UBot Studio
(Difference between revisions)
(Created page with "'''$create prompt''' is a function used to format a prompt and an example for use with GPT-3. It accepts two parameters, "text" and "example", to form a formatted string use...") |
|||
| Line 1: | Line 1: | ||
| − | '''$create prompt''' | + | '''$create prompt''' formats a prompt and an example for use with GPT-3. |
| − | + | This function helps to structure the input and example segment for a GPT-3 model in the right format. | |
== Parameters == | == Parameters == | ||
| − | '''Text:''' | + | '''Text:''' This parameter should contain the prompt that needs to be formatted for use with GPT-3. |
| − | '''Example:''' | + | '''Example:''' This represents the example that needs to accompany the prompt. |
| − | == | + | == Return Value == |
| − | + | This function returns a string, which is the formatted prompt and example for use with GPT-3. | |
== Example == | == Example == | ||
| + | |||
<pre> | <pre> | ||
| − | $prompt = $create prompt("Translate the following English text to French:", "The cat sat on the mat | + | $prompt = $create prompt("Translate the following English text to French:", "The cat sat on the mat") |
</pre> | </pre> | ||
| − | In this | + | |
| + | In this script, the prompt "Translate the following English text to French:" and the example "The cat sat on the mat" are formatted for use with GPT-3. The returned formatted string is then stored in the variable named "prompt". | ||
Revision as of 16:15, 30 June 2023
$create prompt formats a prompt and an example for use with GPT-3.
This function helps to structure the input and example segment for a GPT-3 model in the right format.
Parameters
Text: This parameter should contain the prompt that needs to be formatted for use with GPT-3.
Example: This represents the example that needs to accompany the prompt.
Return Value
This function returns a string, which is the formatted prompt and example for use with GPT-3.
Example
$prompt = $create prompt("Translate the following English text to French:", "The cat sat on the mat")
In this script, the prompt "Translate the following English text to French:" and the example "The cat sat on the mat" are formatted for use with GPT-3. The returned formatted string is then stored in the variable named "prompt".