Skip to content

Commit

Permalink
add: valuerror
Browse files Browse the repository at this point in the history
  • Loading branch information
soumik12345 committed Oct 28, 2024
1 parent c78c476 commit ee3cf42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions weave/integrations/google_ai_studio/google_ai_studio_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def gemini_on_finish(
original_model_name = call.inputs["self"].model_name
elif hasattr(call.inputs["self"], "model"):
original_model_name = call.inputs["self"].model.model_name
else:
raise ValueError("Unknown model type")
model_name = original_model_name.split("/")[-1]
usage = {model_name: {"requests": 1}}
summary_update = {"usage": usage}
Expand Down

0 comments on commit ee3cf42

Please sign in to comment.