Gpt example

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Created page with "'''$create template''' is a function used to create a template for GPT-3 to follow. This function allows the creation of a format with specified prompt and completion that GP...")
 
Line 1: Line 1:
'''$create template''' is a function used to create a template for GPT-3 to follow.
+
'''$create template''' generates a template for GPT-3 to follow when producing text.  
  
This function allows the creation of a format with specified prompt and completion that GPT-3 will use to generate its responses.
+
This function is used during conversations with a GPT-3 model to provide a structured pattern for response creation.  
  
 
== Parameters ==
 
== Parameters ==
  
'''Prompt:''' The lead-in text for the GPT-3 model.
+
'''Prompt:''' This parameter refers to the starting point the model will use to generate a response. It should be formulated in a way that guides the GPT-3 model to follow the desired pattern.
  
'''Completion:''' The text that completes the prompt.
+
'''Completion:''' This parameter refers to the expected response or ending part of the text. This is used as an example for the GPT-3 model to understand how to complete a response based on the provided prompt.  
  
== Returns ==
+
== Return Value ==
  
A string, formatted as a template using the given prompt and completion.
+
This function returns a string, which represents the template for GPT-3 to follow. The template will use both the provided prompt and completion.
  
 
== Example ==
 
== Example ==
 +
 
<pre>
 
<pre>
$template = $create template("Translate the following English text to French: ", "The cat sat on the mat.")
+
$template = $create template("Translate the following english text to french:", "The cat sat on the mat.")
 
</pre>
 
</pre>
In this example, the function creates a new template for GPT-3 to translate a given sentence from English to French. The created template is stored in the variable '$template'.
+
 
 +
In this script the function creates a template with the prompt "Translate the following english text to french:" and the completion "The cat sat on the mat.". The generated template is then stored in the variable named "template".

Revision as of 16:15, 30 June 2023

$create template generates a template for GPT-3 to follow when producing text.

This function is used during conversations with a GPT-3 model to provide a structured pattern for response creation.

Parameters

Prompt: This parameter refers to the starting point the model will use to generate a response. It should be formulated in a way that guides the GPT-3 model to follow the desired pattern.

Completion: This parameter refers to the expected response or ending part of the text. This is used as an example for the GPT-3 model to understand how to complete a response based on the provided prompt.

Return Value

This function returns a string, which represents the template for GPT-3 to follow. The template will use both the provided prompt and completion.

Example

$template = $create template("Translate the following english text to french:", "The cat sat on the mat.")

In this script the function creates a template with the prompt "Translate the following english text to french:" and the completion "The cat sat on the mat.". The generated template is then stored in the variable named "template".

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox