Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pydantic-ai example #152

Merged
merged 5 commits into from
Dec 27, 2024
Merged

Add pydantic-ai example #152

merged 5 commits into from
Dec 27, 2024

Conversation

MarcSkovMadsen
Copy link
Collaborator

I created this example to try out pydantic-ai. Then I thought it was worth persisting here.

I cannot install llama-cpp in my development environent. I don't believe I can install linux dependencies to generate screenshots and videos in my environment. Thus I created thumbnail and video manually. Feel free to create via commands.

pydanticai_find_city_agent.mp4

pydantic-ai looks nice. For me the main downside is the very strong integration with logfire for telemetry. Would be very nice to display telemetry directly in the Panel app instead for the internal tools I create.

@ahuang11
Copy link
Collaborator

ahuang11 commented Dec 27, 2024

I think just linting; otherwise looks good!

@MarcSkovMadsen
Copy link
Collaborator Author

I think just linting; otherwise looks good!

Done. I don't know why pre-commit run --all locally did not fix lint issues?

@ahuang11
Copy link
Collaborator

It seems like there's an issue with the lint setup

cmd [1] | isort . --check-only
Skipped 1 files
cmd [2] | black --check .
All done! ✨ 🍰 ✨
29 files would be left unchanged.
cmd [3] | ruff check .
warning: The top-level linter settings are deprecated in favour of their counterparts in the lint section. Please update the following options in pyproject.toml:

  • 'extend-select' -> 'lint.extend-select'
    docs/examples/applicable_recipes/pydanticai_find_city_agent.py:11:8: F401 [*] param imported but unused

@MarcSkovMadsen
Copy link
Collaborator Author

Problems seems fixed. Should I merge?

@ahuang11 ahuang11 merged commit 9a36845 into main Dec 27, 2024
2 checks passed
@ahuang11
Copy link
Collaborator

Thanks! Merged!

@MarcSkovMadsen
Copy link
Collaborator Author

Thanks. Do you publish this? Update the website?

I'm not sure I know how to do this.

@ahuang11
Copy link
Collaborator

ahuang11 commented Dec 27, 2024

Should be automated on merge. See actions
https://holoviz-topics.github.io/panel-chat-examples/applicable_recipes/

@MarcSkovMadsen
Copy link
Collaborator Author

Seems like the docs html is not rebuilt as the released version is not fully up to date:

image

@ahuang11
Copy link
Collaborator

@MarcSkovMadsen
Copy link
Collaborator Author

I would expect to see what is shown on the left. But when I run build below in terminal it changes to the older diff on the right. Don't know?

image

@MarcSkovMadsen
Copy link
Collaborator Author

Ahh. Now I know. Its because the markdown is autogenerated from the .py file. Did not remember that.

@ahuang11
Copy link
Collaborator

It's based on the docstring.

@ahuang11
Copy link
Collaborator

Yeah I forgot about that too. Maybe we should leave a comment up top saying # DO NOT EDIT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants