fix: truthy value (#8208)

This commit is contained in:
Nam Vu 2024-09-11 14:44:53 +07:00 committed by GitHub
parent 5f4cdd66fa
commit 342607f4a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ class DatasetIndexToolCallbackHandler:
data_source_type=item.get("data_source_type"), data_source_type=item.get("data_source_type"),
segment_id=item.get("segment_id"), segment_id=item.get("segment_id"),
score=item.get("score") if "score" in item else None, 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, 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, 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, index_node_hash=item.get("index_node_hash") if "index_node_hash" in item else None,

View File

@ -115,7 +115,7 @@ class VertexAiLargeLanguageModel(LargeLanguageModel):
token = credentials.token token = credentials.token
# Vertex AI Anthropic Claude3 Opus model available in us-east5 region, Sonnet and Haiku available in us-central1 region # 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" location = "us-east5"
else: else:
location = "us-central1" location = "us-central1"