Skip to content

Commit

Permalink
fix: truthy value (langgenius#8208)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuzooVn authored and cuiks committed Sep 26, 2024
1 parent 76b5af5 commit a0fce72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/core/callback_handler/index_tool_callback_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def return_retriever_resource_info(self, resource: list):
data_source_type=item.get("data_source_type"),
segment_id=item.get("segment_id"),
score=item.get("score") if "score" in item else None,
hit_count=item.get("hit_count") if "hit_count" else None,
hit_count=item.get("hit_count") if "hit_count" in item else None,
word_count=item.get("word_count") if "word_count" in item else None,
segment_position=item.get("segment_position") if "segment_position" in item else None,
index_node_hash=item.get("index_node_hash") if "index_node_hash" in item else None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _generate_anthropic(
token = credentials.token

# Vertex AI Anthropic Claude3 Opus model available in us-east5 region, Sonnet and Haiku available in us-central1 region
if "opus" or "claude-3-5-sonnet" in model:
if "opus" in model or "claude-3-5-sonnet" in model:
location = "us-east5"
else:
location = "us-central1"
Expand Down

0 comments on commit a0fce72

Please sign in to comment.