Create prompt

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(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''' is a function used to format a prompt and an example for use with GPT-3.  
+
'''$create prompt''' formats a prompt and an example for use with GPT-3.
  
It accepts two parameters, "text" and "example", to form a formatted string used as a prompt for GPT-3.
+
This function helps to structure the input and example segment for a GPT-3 model in the right format.
  
 
== Parameters ==
 
== Parameters ==
  
'''Text:''' The main prompt text that you want the model to respond to.  
+
'''Text:''' This parameter should contain the prompt that needs to be formatted for use with GPT-3.
  
'''Example:''' The example text that provides further instruction or context to the model.  
+
'''Example:''' This represents the example that needs to accompany the prompt.
  
== Returns ==
+
== Return Value ==
  
A string, formatted using the input text and example suitable for use as a prompt with GPT-3.
+
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 example, the function creates a new prompt for GPT-3 to translate the phrase "The cat sat on the mat" from English to French. The created prompt is stored in the variable '$prompt'.
+
 
 +
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".

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox