Python: [BREAKING] update to v1.0.0 (#5062)

* updates to final deprecated pieces and versions

* fix mypy

* fix readme links
This commit is contained in:
Eduard van Valkenburg
2026-04-02 17:26:30 +02:00
committed by GitHub
Unverified
parent 5f06b68535
commit 3446eb8d5d
171 changed files with 2580 additions and 2392 deletions
@@ -88,7 +88,7 @@ async def main(client_name: ClientName = "openai_chat") -> None:
"""Run a basic prompt using a selected built-in client."""
client = get_client(client_name)
message = Message("user", text="What's the weather in Amsterdam and in Paris?")
message = Message("user", contents=["What's the weather in Amsterdam and in Paris?"])
stream = os.getenv("STREAM", "false").lower() == "true"
print(f"Client: {client_name}")
print(f"User: {message.text}")
@@ -31,7 +31,7 @@ async def main() -> None:
try:
task = asyncio.create_task(
client.get_response(messages=[Message(role="user", text="Tell me a fantasy story.")])
client.get_response(messages=[Message(role="user", contents=["Tell me a fantasy story."])])
)
await asyncio.sleep(1)
task.cancel()
@@ -98,7 +98,7 @@ class EchoingChatClient(BaseChatClient[OptionsT]):
response_text = f"{response_text} {suffix}"
stream_delay_seconds = float(options.get("stream_delay_seconds", 0.05))
response_message = Message(role="assistant", text=response_text)
response_message = Message(role="assistant", contents=[response_text])
response = ChatResponse(
messages=[response_message],
@@ -150,7 +150,7 @@ async def main() -> None:
# Use the chat client directly
print("Using chat client directly:")
direct_response = await echo_client.get_response(
[Message(role="user", text="Hello, custom chat client!")],
[Message(role="user", contents=["Hello, custom chat client!"])],
options={
"uppercase": True,
"suffix": "(CUSTOM OPTIONS)",