|
1 | | -from pydantic import BaseModel, HttpUrl, PrivateAttr, Field |
| 1 | +from pydantic import BaseModel, HttpUrl, PrivateAttr, Field, ConfigDict |
2 | 2 | from typing import List, Dict, Optional, Callable, Awaitable, Union, Any |
3 | 3 | from typing import AsyncGenerator |
4 | 4 | from typing import Generic, TypeVar |
@@ -153,8 +153,7 @@ class CrawlResult(BaseModel): |
153 | 153 | console_messages: Optional[List[Dict[str, Any]]] = None |
154 | 154 | tables: List[Dict] = Field(default_factory=list) # NEW – [{headers,rows,caption,summary}] |
155 | 155 |
|
156 | | - class Config: |
157 | | - arbitrary_types_allowed = True |
| 156 | + model_config = ConfigDict(arbitrary_types_allowed=True) |
158 | 157 |
|
159 | 158 | # NOTE: The StringCompatibleMarkdown class, custom __init__ method, property getters/setters, |
160 | 159 | # and model_dump override all exist to support a smooth transition from markdown as a string |
@@ -332,8 +331,7 @@ class AsyncCrawlResponse(BaseModel): |
332 | 331 | network_requests: Optional[List[Dict[str, Any]]] = None |
333 | 332 | console_messages: Optional[List[Dict[str, Any]]] = None |
334 | 333 |
|
335 | | - class Config: |
336 | | - arbitrary_types_allowed = True |
| 334 | + model_config = ConfigDict(arbitrary_types_allowed=True) |
337 | 335 |
|
338 | 336 | ############################### |
339 | 337 | # Scraping Models |
|
0 commit comments