Conversation
lotif
left a comment
There was a problem hiding this comment.
Approved with minor comments.
| } | ||
|
|
||
| except Exception as e: | ||
| logger.error(f"Vertex AI Search failed: {e}") |
There was a problem hiding this comment.
If you use logger.exception the log will include additional information about the exception automatically.
| datastore_id = config.vertex_datastore_id | ||
| location = config.google_cloud_location | ||
|
|
||
| async def vertex_search(query: str) -> dict[str, Any]: |
There was a problem hiding this comment.
Inner functions are a bit confusing. This would work the same way if this function is made into a module level function with the added benefit of being a regular function that doesn't need a lot of explanations and is easier to debug.
There was a problem hiding this comment.
When is the user supposed to run this script? I don't see it on any README or notebook.
| gcloud auth application-default login | ||
|
|
||
| # Run from the repo root | ||
| uv run python scripts/create_test_datastore.py \\ |
There was a problem hiding this comment.
I think a better practice is to run scripts as modules instead: uv run python -m scripts.create_test_datastore.
Summary
Clickup Ticket(s): Link(s) if applicable.
Type of Change
Changes Made
Testing
uv run pytest tests/)uv run mypy <src_dir>)uv run ruff check src_dir/)Manual testing details:
Screenshots/Recordings
Related Issues
Deployment Notes
Checklist