Python: name changes executed (#607)

* name changes executed

* updated adr to accepted

* renamed openai base config

* renamed openai config to mixin

* added renames in user docs

* reverted mcperror

* fix tests

* remove sse from tests
This commit is contained in:
Eduard van Valkenburg
2025-09-04 15:00:38 +00:00
committed by GitHub
parent 6310ca5be0
commit 40ab6e9d67
100 changed files with 1223 additions and 1100 deletions
+10 -10
View File
@@ -65,11 +65,11 @@ Create agents and invoke them directly:
```python
import asyncio
from agent_framework import ChatClientAgent
from agent_framework import ChatAgent
from agent_framework.openai import OpenAIChatClient
async def main():
agent = ChatClientAgent(
agent = ChatAgent(
chat_client=OpenAIChatClient(),
instructions="""
1) A robot may not injure a human being...
@@ -94,14 +94,14 @@ You can use the chat client classes directly for advanced workflows:
```python
import asyncio
from agent_framework.openai import OpenAIChatClient
from agent_framework import ChatMessage, ChatRole
from agent_framework import ChatMessage, Role
async def main():
client = OpenAIChatClient()
messages = [
ChatMessage(role=ChatRole.SYSTEM, text="You are a helpful assistant."),
ChatMessage(role=ChatRole.USER, text="Write a haiku about Agent Framework.")
ChatMessage(role=Role.SYSTEM, text="You are a helpful assistant."),
ChatMessage(role=Role.USER, text="Write a haiku about Agent Framework.")
]
response = await client.get_response(messages)
@@ -127,7 +127,7 @@ import asyncio
from typing import Annotated
from random import randint
from pydantic import Field
from agent_framework import ChatClientAgent
from agent_framework import ChatAgent
from agent_framework.openai import OpenAIChatClient
@@ -149,7 +149,7 @@ def get_menu_specials() -> str:
async def main():
agent = ChatClientAgent(
agent = ChatAgent(
chat_client=OpenAIChatClient(),
instructions="You are a helpful assistant that can provide weather and restaurant information.",
tools=[get_weather, get_menu_specials]
@@ -173,19 +173,19 @@ Coordinate multiple agents to collaborate on complex tasks using orchestration p
```python
import asyncio
from agent_framework import ChatClientAgent
from agent_framework import ChatAgent
from agent_framework.openai import OpenAIChatClient
async def main():
# Create specialized agents
writer = ChatClientAgent(
writer = ChatAgent(
chat_client=OpenAIChatClient(),
name="Writer",
instructions="You are a creative content writer. Generate and refine slogans based on feedback."
)
reviewer = ChatClientAgent(
reviewer = ChatAgent(
chat_client=OpenAIChatClient(),
name="Reviewer",
instructions="You are a critical reviewer. Provide detailed feedback on proposed slogans."