Skip to content

Commit 2efa50b

Browse files
authored
fix header images (#55)
1 parent a00560c commit 2efa50b

File tree

6 files changed

+39
-29
lines changed

6 files changed

+39
-29
lines changed

docs/.partials/index-header.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<div class="text-center">
2+
<img class="index-header" src="./img/pydantic-ai-dark.svg#only-dark" alt="PydanticAI">
3+
</div>
4+
<div class="text-center">
5+
<img class="index-header" src="./img/pydantic-ai-light.svg#only-light" alt="PydanticAI">
6+
</div>
7+
<p class="text-center">
8+
<em>Agent Framework / shim to use Pydantic with LLMs</em>
9+
</p>
10+
<p class="text-center">
11+
<a href="https://github.com/pydantic/pydantic-ai/actions/workflows/ci.yml?query=branch%3Amain">
12+
<img src="https://github.com/pydantic/pydantic-ai/actions/workflows/ci.yml/badge.svg?event=push" alt="CI">
13+
</a>
14+
<a href="https://pypi.python.org/pypi/pydantic-ai">
15+
<img src="https://img.shields.io/pypi/v/pydantic-ai.svg" alt="PyPI">
16+
</a>
17+
<a href="https://github.com/pydantic/pydantic-ai">
18+
<img src="https://img.shields.io/pypi/pyversions/pydantic-ai.svg" alt="versions">
19+
</a>
20+
<a href="https://github.com/pydantic/pydantic-ai/blob/main/LICENSE">
21+
<img src="https://img.shields.io/github/license/pydantic/pydantic-ai.svg" alt="license">
22+
</a>
23+
</p>

docs/agents.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ print(result.data)
6060

6161
There are three ways to run an agent:
6262

63-
1. [`#!python agent.run()`][pydantic_ai.Agent.run] — a coroutine which returns a result containing a completed response, returns a [`RunResult`][pydantic_ai.result.RunResult]
64-
2. [`#!python agent.run_sync()`][pydantic_ai.Agent.run_sync] — a plain function which returns a result containing a completed response (internally, this just calls `#!python asyncio.run(self.run())`), returns a [`RunResult`][pydantic_ai.result.RunResult]
65-
3. [`#!python agent.run_stream()`][pydantic_ai.Agent.run_stream] — a coroutine which returns a result containing methods to stream a response as an async iterable, returns a [`StreamedRunResult`][pydantic_ai.result.StreamedRunResult]
63+
1. [`agent.run()`][pydantic_ai.Agent.run] — a coroutine which returns a result containing a completed response, returns a [`RunResult`][pydantic_ai.result.RunResult]
64+
2. [`agent.run_sync()`][pydantic_ai.Agent.run_sync] — a plain function which returns a result containing a completed response (internally, this just calls `asyncio.run(self.run())`), returns a [`RunResult`][pydantic_ai.result.RunResult]
65+
3. [`agent.run_stream()`][pydantic_ai.Agent.run_stream] — a coroutine which returns a result containing methods to stream a response as an async iterable, returns a [`StreamedRunResult`][pydantic_ai.result.StreamedRunResult]
6666

6767
Here's a simple example demonstrating all three:
6868

docs/dependencies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def main():
4848
2. Pass the dataclass type to the `deps_type` argument of the [`Agent` constructor][pydantic_ai.Agent.__init__]. **Note**: we're passing the type here, NOT an instance, this parameter is not actually used at runtime, it's here so we can get full type checking of the agent.
4949
3. When running the agent, pass an instance of the dataclass to the `deps` parameter.
5050

51-
_(This example is complete, it can be run "as is" inside an async context)_
51+
_(This example is complete, it can be run "as is")_
5252

5353
## Accessing Dependencies
5454

@@ -98,7 +98,7 @@ async def main():
9898
3. Access dependencies through the [`.deps`][pydantic_ai.dependencies.CallContext.deps] attribute.
9999
4. Access dependencies through the [`.deps`][pydantic_ai.dependencies.CallContext.deps] attribute.
100100

101-
_(This example is complete, it can be run "as is" inside an async context)_
101+
_(This example is complete, it can be run "as is")_
102102

103103
### Asynchronous vs. Synchronous dependencies
104104

docs/extra/tweaks.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@
77
.hide {
88
display: none;
99
}
10+
11+
.text-center {
12+
text-align: center;
13+
}
14+
15+
img.index-header {
16+
width: 70%;
17+
max-width: 500px;
18+
}

docs/index.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,4 @@
1-
<p align="center">
2-
<img src="./img/pydantic-ai-dark.svg#only-dark" alt="PydanticAI" style="max-width: 600px">
3-
</p>
4-
<p align="center">
5-
<img src="./img/pydantic-ai-light.svg#only-light" alt="PydanticAI" style="max-width: 600px">
6-
</p>
7-
<p align="center">
8-
<em>Agent Framework / shim to use Pydantic with LLMs</em>
9-
</p>
10-
<p align="center">
11-
<a href="https://github.com/pydantic/pydantic-ai/actions/workflows/ci.yml?query=branch%3Amain">
12-
<img src="https://github.com/pydantic/pydantic-ai/actions/workflows/ci.yml/badge.svg?event=push" alt="CI">
13-
</a>
14-
<a href="https://pypi.python.org/pypi/pydantic-ai">
15-
<img src="https://img.shields.io/pypi/v/pydantic-ai.svg" alt="PyPI">
16-
</a>
17-
<a href="https://github.com/pydantic/pydantic-ai">
18-
<img src="https://img.shields.io/pypi/pyversions/pydantic-ai.svg" alt="versions">
19-
</a>
20-
<a href="https://github.com/pydantic/pydantic-ai/blob/main/LICENSE">
21-
<img src="https://img.shields.io/github/license/pydantic/pydantic-ai.svg" alt="license">
22-
</a>
23-
</p>
1+
--8<-- "docs/.partials/index-header.html"
242

253
# PydanticAI {.hide}
264

docs/message-history.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ async def main():
135135
]
136136
"""
137137
```
138-
_(This example is complete, it can be run "as is" inside an async context)_
138+
_(This example is complete, it can be run "as is")_
139139

140140
### Using Messages as Input for Further Agent Runs
141141

0 commit comments

Comments
 (0)