Rename variable to use same convention
This commit is contained in:
@@ -132,15 +132,15 @@ class CompletionPromptTokenizingStrategy(InstructionPromptTokenizingStrategy):
|
||||
)
|
||||
|
||||
def tokenize_prompt(self, prompt):
|
||||
text = self.parse_instruction_fields(prompt)
|
||||
full_prompt = self._build_full_prompt(text)
|
||||
instruction = self.parse_instruction_fields(prompt)
|
||||
full_prompt = self._build_full_prompt(instruction)
|
||||
tokenized_full_prompt = self._tokenize(full_prompt)
|
||||
|
||||
return tokenized_full_prompt
|
||||
|
||||
def _build_full_prompt(self, text):
|
||||
def _build_full_prompt(self, instruction):
|
||||
return self.prompter.build_prompt(
|
||||
text
|
||||
instruction
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ class JeopardyPrompter(AlpacaPrompter):
|
||||
class CompletionPrompter(AlpacaPrompter):
|
||||
def build_prompt(
|
||||
self,
|
||||
text: str
|
||||
instruction: str
|
||||
) -> str:
|
||||
return text
|
||||
return instruction
|
||||
|
||||
def get_response(self, output: str) -> str:
|
||||
return output.strip()
|
||||
|
||||
Reference in New Issue
Block a user