Skip to content

Commit d8c8959

Browse files
authored
Updated Docs (#773)
1 parent 0adb76a commit d8c8959

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

docs/models.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ agent = Agent(model)
264264
Internally this uses [`google.auth.default()`](https://google-auth.readthedocs.io/en/master/reference/google.auth.html) from the `google-auth` package to obtain credentials.
265265

266266
!!! note "Won't fail until `agent.run()`"
267+
267268
Because `google.auth.default()` requires network requests and can be slow, it's not run until you call `agent.run()`. Meaning any configuration or permissions error will only be raised when you try to use the model. To initialize the model for this check to be run, call [`await model.ainit()`][pydantic_ai.models.vertexai.VertexAIModel.ainit].
268269

269270
You may also need to pass the [`project_id` argument to `VertexAIModel`][pydantic_ai.models.vertexai.VertexAIModel.__init__] if application default credentials don't set a project, if you pass `project_id` and it conflicts with the project set by application default credentials, an error is raised.

docs/results.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ async def validate_result(ctx: RunContext[DatabaseConn], result: Response) -> Re
149149

150150

151151
result = agent.run_sync(
152-
'get me uses who were last active yesterday.', deps=DatabaseConn()
152+
'get me users who were last active yesterday.', deps=DatabaseConn()
153153
)
154154
print(result.data)
155155
#> sql_query='SELECT * FROM users WHERE last_active::date = today() - interval 1 day'

tests/test_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def rich_prompt_ask(prompt: str, *_args: Any, **_kwargs: Any) -> str:
225225
tool_name='final_result_list_2',
226226
args={'response': [10, 20, 30]},
227227
),
228-
'get me uses who were last active yesterday.': ToolCallPart(
228+
'get me users who were last active yesterday.': ToolCallPart(
229229
tool_name='final_result_Success',
230230
args={'sql_query': 'SELECT * FROM users WHERE last_active::date = today() - interval 1 day'},
231231
),

0 commit comments

Comments
 (0)