GoogleCloudPlatform / GoogleCloudPlatform/generative-ai

[Bug] enable_search_toggle will always evaluate to True

Open
#1,633 0 comments 0 reactions 1 assignee Claimed by @lavinigam-gcp View on GitHub
Dominant language
Jupyter Notebook
Stars
17.7k
Forks
4.5k
Avg merge
12h 38m
Merged PRs (30d)
42

Description

in the following code in agent_02_PlanningAgent.py
```
enable_search_toggle = self._determine_search_requirement().strip()
if self.debug:
print("Search toggle: ", enable_search_toggle)

# Create steps based on validation
steps = self._create_steps(validated_query, enable_search_toggle)
```

enable_search_toggle is a str but _create_steps expects a bool. Thus a "False" from enable_search_toggle would still evaluate as true inside the _create_steps function.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.