Skip to content

Commit

Permalink
pass model and cost so that langfuse can show cost
Browse files Browse the repository at this point in the history
  • Loading branch information
obadakhalili committed Jan 30, 2025
1 parent b09c39c commit 6f97044
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,8 +1066,10 @@ def to_dict(self) -> dict:
"id": self.id,
"app_id": self.app_id,
"conversation_id": self.conversation_id,
"model_id": self.model_id,
"inputs": self.inputs,
"query": self.query,
"total_price": self.total_price,
"message": self.message,
"answer": self.answer,
"status": self.status,
Expand All @@ -1088,7 +1090,9 @@ def from_dict(cls, data: dict):
id=data["id"],
app_id=data["app_id"],
conversation_id=data["conversation_id"],
model_id=data["model_id"],
inputs=data["inputs"],
total_price=data["total_price"],
query=data["query"],
message=data["message"],
answer=data["answer"],
Expand Down

0 comments on commit 6f97044

Please sign in to comment.