Skip to content

Commit

Permalink
fix(langchain/AzureChatOpenai): unnecessary logs (#919)
Browse files Browse the repository at this point in the history
  • Loading branch information
hassiebp authored Sep 10, 2024
1 parent 9a15551 commit e02fb8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions langfuse/Sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def sample_event(self, event: dict):
if "type" in event and "body" in event:
event_type = event["type"]

if event_type == "sdk-log":
return True

trace_id = None

if event_type == "trace-create" and "id" in event["body"]:
Expand Down
1 change: 1 addition & 0 deletions langfuse/extract_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def _extract_model_name(
("ChatOpenAI", ["invocation_params", "model_name"], "kwargs"),
("AzureChatOpenAI", ["invocation_params", "model"], "kwargs"),
("AzureChatOpenAI", ["invocation_params", "model_name"], "kwargs"),
("AzureChatOpenAI", ["invocation_params", "azure_deployment"], "kwargs"),
("HuggingFacePipeline", ["invocation_params", "model_id"], "kwargs"),
("BedrockChat", ["kwargs", "model_id"], "serialized"),
("Bedrock", ["kwargs", "model_id"], "serialized"),
Expand Down

0 comments on commit e02fb8c

Please sign in to comment.