Prompt Template
PromptTemplate Class in Eclipse
The PromptTemplate
class in the Eclipse framework is designed to create and manage prompts sent to a language model. It allows developers to define a structured template with placeholders, which can be dynamically replaced with actual values during runtime. This approach enhances flexibility and reusability across various scenarios.
Parameters
Prompt Type
prompt_type
str
(Optional) Specifies the type of prompt. Default is None
.
System Message
system_message
str
(Optional) Defines a system-level message for the prompt. Default is None
.
Example Usage
Below is an example of how to initialize a PromptTemplate
instance:
In this example, the PromptTemplate
is initialized with a specified prompt_type
and a system_message
. These parameters are optional and can be customized based on the specific requirements of your application.
By utilizing the PromptTemplate
class, developers can efficiently manage and generate prompts tailored to various contexts within the Eclipse framework.
Last updated