Gpt example
(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''' | + | '''$create template''' generates a template for GPT-3 to follow when producing text. |
− | This function | + | This function is used during conversations with a GPT-3 model to provide a structured pattern for response creation. |
== Parameters == | == Parameters == | ||
− | '''Prompt:''' | + | '''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:''' | + | '''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 == | == Example == | ||
+ | |||
<pre> | <pre> | ||
− | $template = $create template("Translate the following | + | $template = $create template("Translate the following english text to french:", "The cat sat on the mat.") |
</pre> | </pre> | ||
− | In this | + | |
+ | 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".