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