skrawcz commented on code in PR #677:
URL: https://github.com/apache/burr/pull/677#discussion_r3108281175
##########
burr/integrations/__init__.py:
##########
@@ -14,3 +14,16 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+
+
+def __getattr__(name: str):
+ """Lazy load Bedrock integration to avoid requiring boto3 unless used."""
+ if name == "BedrockAction":
+ from burr.integrations.bedrock import BedrockAction
+
+ return BedrockAction
+ if name == "BedrockStreamingAction":
+ from burr.integrations.bedrock import BedrockStreamingAction
+
+ return BedrockStreamingAction
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
Review Comment:
Let's remove this -- this is inconsistent with how we work with the other
integrations.
We don't want to import this for every integration either.
We want users to do:
```
from burr.integrations import bedrock
# or
from burr.integrations.bedrock import BedrockAction
```
So remove this and then update the examples/code for that please.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]