Skip to content

Commit

Permalink
comment out onChainStart callback
Browse files Browse the repository at this point in the history
  • Loading branch information
minump committed Nov 22, 2023
1 parent a6d2ebd commit fd53fc7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ai_ta_backend/agents/customcallbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ def on_agent_finish(self, finish: AgentFinish, **kwargs: Any) -> Any:
# def on_llm_new_token(self, token: str, **kwargs: Any) -> Any:
# print(f"on_new_token {token}")

def on_chain_start(self, serialized: Dict[str, Any], inputs: Dict[str, Any], **kwargs: Any) -> Any:
print("on_chain_start")
if self.is_exists_image():
self.supabase_client.table("docker_images").update({"on_chain_start": str(serialized)}).\
eq("image_name", self.image_name).execute()
else:
self.supabase_client.table("docker_images").upsert(
{"langsmith_id": self.langsmith_run_id, "image_name": self.image_name, "on_chain_start": str(serialized)}).execute()
# def on_chain_start(self, serialized: Dict[str, Any], inputs: Dict[str, Any], **kwargs: Any) -> Any:
# print("on_chain_start")
# if self.is_exists_image():
# self.supabase_client.table("docker_images").update({"on_chain_start": str(serialized)}).\
# eq("image_name", self.image_name).execute()
# else:
# self.supabase_client.table("docker_images").upsert(
# {"langsmith_id": self.langsmith_run_id, "image_name": self.image_name, "on_chain_start": str(serialized)}).execute()


def get_custom_callback_handler():
Expand Down

0 comments on commit fd53fc7

Please sign in to comment.