diff --git a/docs/.hooks/snippets.py b/docs/.hooks/snippets.py index 5ffaa9e63a..4ae608eb2c 100644 --- a/docs/.hooks/snippets.py +++ b/docs/.hooks/snippets.py @@ -149,7 +149,8 @@ def parse_snippet_directive(line: str) -> SnippetDirective | None: def parse_file_sections(file_path: Path) -> ParsedFile: """Parse a file and extract sections marked with ### [section] or /// [section]""" - input_lines = file_path.read_text().splitlines() + # input_lines = file_path.read_text().splitlines() + input_lines = file_path.read_text(encoding="utf-8").splitlines() output_lines: list[str] = [] lines_mapping: dict[int, int] = {} diff --git a/docs/mcp/client.md b/docs/mcp/client.md index 2558519c1b..d41617972e 100644 --- a/docs/mcp/client.md +++ b/docs/mcp/client.md @@ -54,7 +54,7 @@ Then we can create the client: from pydantic_ai import Agent from pydantic_ai.mcp import MCPServerStreamableHTTP -server = MCPServerStreamableHTTP('http://localhost:8000/mcp') # (1)! +server = MCPServerStreamableHTTP(url='http://localhost:8000/mcp') # (1)! agent = Agent('openai:gpt-4o', toolsets=[server]) # (2)! async def main():