Skip to content

Commit

Permalink
uprev to v0.0.19 (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin authored Jan 15, 2025
1 parent 1e833ea commit a5dca23
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 16 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ This is useful for testing and eval-driven iterative development.
* __Streamed Responses__
Provides the ability to [stream](https://ai.pydantic.dev/results/#streamed-results) LLM outputs continuously, with immediate validation, ensuring rapid and accurate results.

* __Graph Support__
[Pydantic Graph](https://ai.pydantic.dev/graph) provides a powerful way to define graphs using typing hints, this is useful in complex applications where standard control flow can degrade to spaghetti code.

## In Beta!

PydanticAI is in early beta, the API is still subject to change and there's a lot more to do.
Expand Down
2 changes: 1 addition & 1 deletion docs/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ stateDiagram-v2

The "state" concept in `pydantic-graph` provides an optional way to access and mutate an object (often a `dataclass` or Pydantic model) as nodes run in a graph. If you think of Graphs as a production line, then you state is the engine being passed along the line and built up by each node as the graph is run.

In future, we intend to extend `pydantic-graph` to provide state persistence with the state recorded after each node is run, see [#695](https://github.com/pydantic/pydantic-ai/issues/695).
In the future, we intend to extend `pydantic-graph` to provide state persistence with the state recorded after each node is run, see [#695](https://github.com/pydantic/pydantic-ai/issues/695).

Here's an example of a graph which represents a vending machine where the user may insert coins and select a product to purchase.

Expand Down
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ This is useful for testing and eval-driven iterative development.
:material-sine-wave:{ .md .middle }&nbsp;<strong class="vertical-middle">Streamed Responses</strong><br>
Provides the ability to [stream](results.md#streamed-results) LLM outputs continuously, with immediate validation, ensuring rapid and accurate results.

:material-graph:{ .md .middle .graph-green }&nbsp;<strong class="vertical-middle">Graph Support</strong><br>
[Pydantic Graph](graph.md) provides a powerful way to define graphs using typing hints, this is useful in complex applications where standard control flow can degrade to spaghetti code.

!!! example "In Beta"
PydanticAI is in early beta, the API is still subject to change and there's a lot more to do.
[Feedback](https://github.com/pydantic/pydantic-ai/issues) is very welcome!
Expand Down
4 changes: 2 additions & 2 deletions examples/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "pydantic-ai-examples"
version = "0.0.18"
version = "0.0.19"
description = "Examples of how to use PydanticAI and what it can do."
authors = [
{ name = "Samuel Colvin", email = "[email protected]" },
Expand Down Expand Up @@ -34,7 +34,7 @@ classifiers = [
]
requires-python = ">=3.9"
dependencies = [
"pydantic-ai-slim[openai,vertexai,groq,anthropic]==0.0.18",
"pydantic-ai-slim[openai,vertexai,groq,anthropic]==0.0.19",
"asyncpg>=0.30.0",
"fastapi>=0.115.4",
"logfire[asyncpg,fastapi,sqlite3]>=2.6",
Expand Down
4 changes: 2 additions & 2 deletions pydantic_ai_slim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "pydantic-ai-slim"
version = "0.0.18"
version = "0.0.19"
description = "Agent Framework / shim to use Pydantic with LLMs, slim package"
authors = [
{ name = "Samuel Colvin", email = "[email protected]" },
Expand Down Expand Up @@ -44,7 +44,7 @@ dependencies = [
[project.optional-dependencies]
# WARNING if you add optional groups, please update docs/install.md
logfire = ["logfire>=2.3"]
graph = ["pydantic-graph==0.0.18"]
graph = ["pydantic-graph==0.0.19"]
openai = ["openai>=1.54.3"]
vertexai = ["google-auth>=2.36.0", "requests>=2.32.3"]
anthropic = ["anthropic>=0.40.0"]
Expand Down
2 changes: 1 addition & 1 deletion pydantic_graph/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "pydantic-graph"
version = "0.0.18"
version = "0.0.19"
description = "Graph and state machine library"
authors = [
{ name = "Samuel Colvin", email = "[email protected]" },
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "pydantic-ai"
version = "0.0.18"
version = "0.0.19"
description = "Agent Framework / shim to use Pydantic with LLMs"
authors = [
{ name = "Samuel Colvin", email = "[email protected]" },
Expand Down Expand Up @@ -37,7 +37,7 @@ classifiers = [
]
requires-python = ">=3.9"

dependencies = ["pydantic-ai-slim[graph,openai,vertexai,groq,anthropic,mistral]==0.0.18"]
dependencies = ["pydantic-ai-slim[graph,openai,vertexai,groq,anthropic,mistral]==0.0.19"]

[project.urls]
Homepage = "https://ai.pydantic.dev"
Expand All @@ -46,7 +46,7 @@ Documentation = "https://ai.pydantic.dev"
Changelog = "https://github.com/pydantic/pydantic-ai/releases"

[project.optional-dependencies]
examples = ["pydantic-ai-examples==0.0.18"]
examples = ["pydantic-ai-examples==0.0.19"]
logfire = ["logfire>=2.3"]

[tool.uv.sources]
Expand Down
6 changes: 3 additions & 3 deletions uprev.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ def sub_version(m: re.Match[str]) -> str:

def replace_deps_version(text: str) -> tuple[str, int]:
ovr = re.escape(old_version)
text, c = re.subn(f'(pydantic-ai-.+?==){ovr}', fr'\g<1>{version}', text, count=5)
text, c1 = re.subn(f'(pydantic-(?:ai-.+?|graph)==){ovr}', fr'\g<1>{version}', text, count=5)
text, c2 = re.subn(
fr'^(version ?= ?)(["\']){ovr}\2$', fr'\g<1>\g<2>{version}\g<2>', text, count=5, flags=re.M
)
return text, c + c2
return text, c1 + c2


root_pp_text, count_root = replace_deps_version(root_pp_text)
Expand All @@ -72,7 +72,7 @@ def replace_deps_version(text: str) -> tuple[str, int]:
graph_pp_text = graph_pp.read_text()
graph_pp_text, count_graph = replace_deps_version(graph_pp_text)

if count_root == 2 and count_ex == 2 and count_slim == 1 and count_graph == 1:
if count_root == 2 and count_ex == 2 and count_slim == 2 and count_graph == 1:
root_pp.write_text(root_pp_text)
examples_pp.write_text(examples_pp_text)
slim_pp.write_text(slim_pp_text)
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a5dca23

Please sign in to comment.