Skip to content

Commit 9edee4a

Browse files
committed
uv sync --upgrade-package pydantic-ai
1 parent 69cb0b6 commit 9edee4a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ dependencies = [
1919
"logfire[celery,django,psycopg,system-metrics]>=3.16.0",
2020
"lxml>=5.3.2",
2121
"markdown>=3.7",
22+
"markitdown[all]>=0.1.2",
2223
"psycopg[binary]>=3.2.5",
2324
"pydantic-ai-slim[anthropic,openai]>=0.2.6",
2425
"pydantic-ai[logfire]>=0.2.6",
2526
"pytz>=2025.2",
2627
"readtime>=3.0.0",
2728
"requests>=2.32.3",
2829
"tiktoken>=0.9.0",
30+
"trafilatura>=2.0.0",
2931
"wagtail>=6.4.1",
3032
"wagtail-bakery>=0.8.0",
3133
]

pythonkr_backend/curation/utils_trans.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,27 @@ def translate_rssitem(rss_item_id: int):
9494
)
9595

9696
return translated_content
97+
98+
class PyCondersSource(BaseModel):
99+
title: str = Field(description="The title of curated article title")
100+
summary: str = Field(
101+
description="summary of curated article"
102+
)
103+
curated_source_url: str = Field(description="url of curated source")
104+
content_source_type: str = Field(description="type of curated contents in ‘sponsor’,’course’,’release’,’news’,’article’,’others’,’project’,’tutorial’,’event’ ")
105+
author: str = Field(description="author of curated article")
106+
107+
class PyCondersWeeklyResult(BaseModel):
108+
issue_number: str = Field(description="number of issue")
109+
published_date: date = Field(description="The published date of the weekly article")
110+
issues: list[PyCondersSource] = Field(description="issues of the newletters")
111+
112+
113+
system_prompt = "You are an AI assistant specialized in extracting core curated content from a given weekly newsletter URL and clearly separating each content item."
114+
115+
system_prompt = "You are an AI assistant specialized in extacting core curated content from a given weekly newsletter html and clearly separating each content item."
116+
117+
system_prompt = "You are an AI assistant specialized in extracting core curated content from a given weekly newsletter markdown and clearly separating each content item."
118+
agent = Agent("google-gla:gemini-2.5-flash-preview-04-17",
119+
system_prompt=system_prompt,
120+
output_type=PyCondersWeeklyResult)

0 commit comments

Comments
 (0)