Skip to content

Commit

Permalink
🔨 chore: fix line formatting in function.py and receiver_client.py
Browse files Browse the repository at this point in the history
- Fixed line formatting in function.py to improve readability.
- Fixed line formatting in receiver_client.py to improve readability and
  consistency.
  • Loading branch information
sudoskys committed Nov 29, 2023
1 parent 45d17fb commit 097c9f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions llmkira/receiver/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ async def run_pending_task(task: TaskHeader, pending_task: TaskBatch):
_env_dict = await EnvManager.from_uid(uid=task.receiver.uid).get_env_list(name_list=_tool_obj.env_list)
assert isinstance(_env_dict, dict), "unexpected env dict? it should be dict..."
# Resign Chain
if (task.task_meta.resign_next_step or task.task_meta.is_complete(
num_end=1)) and not _tool_obj.repeatable:
if ((task.task_meta.resign_next_step or task.task_meta.is_complete(num_end=1))
and not _tool_obj.repeatable):
logger.debug(f"Function {pending_task.get_batch_name()} need resign chain")
await chain_func.resign_chain(
task=task,
Expand Down Expand Up @@ -248,7 +248,7 @@ async def process_function_call(self, message: AbstractIncomingMessage
logger.trace("No Function Call")
return None
pending_task: TaskBatch
logger.debug(f"Received A Batch FunctionRequest")
logger.debug("Received A Batch FunctionRequest")
try:
await self.run_pending_task(task=task, pending_task=pending_task)
except Exception as e:
Expand Down
4 changes: 2 additions & 2 deletions llmkira/receiver/receiver_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ async def llm_request(
raise Exception(e)
except httpx.RemoteProtocolError as e:
logger.error(f"[Network RemoteProtocolError] {e}")
raise ReplyNeededError(message=f"Server disconnected without sending a response.")
raise ReplyNeededError(message="Server disconnected without sending a response.")
except ServiceUnavailableError as e:
logger.error(f"[Service Unavailable Error] {e}")
raise ReplyNeededError(message=f"[551721]Service Unavailable {e}")
Expand All @@ -214,7 +214,7 @@ async def llm_request(
raise ReplyNeededError(message=f"[551183]Service Provider Error {e}")
except PydanticValidationError as e:
logger.exception(e)
raise ReplyNeededError(message=f"[551684]Request Data ValidationError")
raise ReplyNeededError(message="[551684]Request Data ValidationError")
except Exception as e:
logger.exception(e)
raise e
Expand Down

0 comments on commit 097c9f6

Please sign in to comment.