diff --git a/python/openwebui/pipe_mcts.py b/python/openwebui/pipe_mcts.py index a036794..7c0496a 100644 --- a/python/openwebui/pipe_mcts.py +++ b/python/openwebui/pipe_mcts.py @@ -186,7 +186,8 @@ def get_chunk_content(self, chunk): if "content" in delta: yield delta["content"] except json.JSONDecodeError: - logger.error(f'ChunkDecodeError: unable to parse "{chunk_str[:100]}"') + logger.error( + f'ChunkDecodeError: unable to parse "{chunk_str[:100]}"') # ============================================================================= @@ -441,7 +442,8 @@ async def update_approach(self, answer: str, improvements: str): return await self.generate_completion(prompt) async def evaluate_answer(self, answer: str): - prompt = eval_answer_prompt.format(question=self.question, answer=answer) + prompt = eval_answer_prompt.format( + question=self.question, answer=answer) result = await self.generate_completion(prompt) try: score = int(re.search(r"\d+", result).group()) @@ -672,7 +674,8 @@ async def pipe( if match: backend, model_name = match.groups() else: - logger.error("Model ID should be in the format '*.mcts/backend/model_name'") + logger.error( + "Model ID should be in the format '*.mcts/backend/model_name'") logger.error(f"Invalid model ID: {model_id}") return ""