Rename variable to use same convention

This commit is contained in:
NanoCode012
2023-05-09 00:54:46 +09:00
parent cf681537ec
commit 174b74ddc9
2 changed files with 6 additions and 6 deletions

View File

@@ -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
)

View File

@@ -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()