Namespace: AlpacaPrompt
Functions
chat
▸ chat(): TextGenerationPromptTemplate
<ChatPrompt
, string
>
Not supported by Alpaca.
Returns
TextGenerationPromptTemplate
<ChatPrompt
, string
>
Defined in
packages/modelfusion/src/model-function/generate-text/prompt-template/AlpacaPromptTemplate.ts:103
instruction
▸ instruction(): TextGenerationPromptTemplate
<InstructionPrompt
& { input?
: string
}, string
>
Formats an instruction prompt as an Alpaca prompt.
If the instruction has a system prompt, it overrides the default system prompt (which can impact the results, because the model may be trained on the default system prompt).
Prompt template with input:
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
{instruction}
### Input:
{input}
### Response:
Prompt template without input:
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
{instruction}
### Response:
Returns
TextGenerationPromptTemplate
<InstructionPrompt
& { input?
: string
}, string
>
See
https://github.com/tatsu-lab/stanford_alpaca#data-release
Defined in
packages/modelfusion/src/model-function/generate-text/prompt-template/AlpacaPromptTemplate.ts:64
text
▸ text(): TextGenerationPromptTemplate
<string
, string
>
Formats a text prompt as an Alpaca prompt.
Returns
TextGenerationPromptTemplate
<string
, string
>
Defined in
packages/modelfusion/src/model-function/generate-text/prompt-template/AlpacaPromptTemplate.ts:14