Update src/fastmcp/client/client.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Jeremiah Lowin 2025-06-22 10:33:59 -04:00 committed by GitHub
commit a19a84e7a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -533,7 +533,7 @@ class Client(Generic[ClientTransportT]):
serialized_arguments[key] = value
else:
# Use pydantic_core.to_json for consistent serialization
serialized_arguments[key] = pydantic_core.to_json(value).decode()
serialized_arguments[key] = pydantic_core.to_json(value).decode('utf-8')
result = await self.session.get_prompt(
name=name, arguments=serialized_arguments