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...")
 
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
'''$create prompt''' is a function used to format a prompt and an example for use with GPT-3.  
+
'''$create prompt''' is a function that formats a prompt and 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 allows for the text and example provided to be formatted correctly to ensure the highest quality of responses from the GPT-3 model.  
  
 
== Parameters ==
 
== Parameters ==
  
'''Text:''' The main prompt text that you want the model to respond to.  
+
'''Text:''' The prompt that you want to send to the GPT-3 model. This should be a well-crafted string that guides the model to produce the desired output.
  
'''Example:''' The example text that provides further instruction or context to the model.  
+
'''Example:''' An example input to add to the prompt. This should demonstrate the expected outcome.
  
== 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 adequately formatted prompt for use in a GPT-3 request.
  
 
== Example ==
 
== Example ==
 +
 
<pre>
 
<pre>
$prompt = $create prompt("Translate the following English text to French:", "The cat sat on the mat.")
+
set(#test prompt, $create prompt("Translate the following English text to French:", "The cat sat on the mat"), "Global")
 
</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'.
+
 
 +
Assuming you provide "Translate the following English text to French:" as the text and "The cat sat on the mat" as the example, this script sets #test prompt to a string prepared in a format suitable for the OpenAI GPT-3 model. For example, the #test prompt might be:
 +
 
 +
<blockquote>
 +
"Translate the following English text to French: The cat sat on the mat"
 +
</blockquote>
 +
 
 +
This prepared string can then be used in other commands or functions that interact with the GPT-3 model.

Latest revision as of 19:43, 30 June 2023

$create prompt is a function that formats a prompt and example for use with GPT-3.

This function allows for the text and example provided to be formatted correctly to ensure the highest quality of responses from the GPT-3 model.

[edit] Parameters

Text: The prompt that you want to send to the GPT-3 model. This should be a well-crafted string that guides the model to produce the desired output.

Example: An example input to add to the prompt. This should demonstrate the expected outcome.

[edit] Return Value

This function returns a string, which is the adequately formatted prompt for use in a GPT-3 request.

[edit] Example

set(#test prompt, $create prompt("Translate the following English text to French:", "The cat sat on the mat"), "Global")

Assuming you provide "Translate the following English text to French:" as the text and "The cat sat on the mat" as the example, this script sets #test prompt to a string prepared in a format suitable for the OpenAI GPT-3 model. For example, the #test prompt might be:

"Translate the following English text to French: The cat sat on the mat"

This prepared string can then be used in other commands or functions that interact with the GPT-3 model.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox