mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [BREAKING] added SerializationMixin and applied to contents, agents, chat client… (#1012)
* added SerializationMixin and applied to contents, agents, chat clients, removed AFBaseModel * fix annotations type * mypy fixes * fix tests * fix serializable subvalues and added large docstring * updated indents in code block * fixed exported urls
This commit is contained in:
committed by
GitHub
Unverified
parent
3eb26632ce
commit
54ad135914
@@ -168,7 +168,7 @@ async def math_agent(task: MathProblem, llm: LLM) -> float:
|
||||
MCPStdioTool(name="calculator", command="uvx", args=["mcp-server-calculator"]) as mcp_server,
|
||||
ChatAgent(
|
||||
chat_client=OpenAIChatClient(
|
||||
ai_model_id=llm.model, # This is the model being trained
|
||||
model_id=llm.model, # This is the model being trained
|
||||
api_key=os.getenv("OPENAI_API_KEY") or "dummy", # Can be dummy when connecting to training LLM
|
||||
base_url=llm.endpoint, # vLLM server endpoint provided by agent-lightning
|
||||
),
|
||||
|
||||
@@ -103,14 +103,14 @@ class Tau2Agent(LitAgent):
|
||||
assistant_chat_client = OpenAIChatClient(
|
||||
base_url=llm.endpoint, # vLLM endpoint for the model being trained
|
||||
api_key=openai_api_key,
|
||||
ai_model_id=llm.model, # Model ID being trained
|
||||
model_id=llm.model, # Model ID being trained
|
||||
)
|
||||
|
||||
# User simulator: uses a fixed, capable model for consistent simulation
|
||||
user_simulator_chat_client = OpenAIChatClient(
|
||||
base_url=openai_base_url, # External API endpoint
|
||||
api_key=openai_api_key,
|
||||
ai_model_id="gpt-4.1", # Fixed model for user simulator
|
||||
model_id="gpt-4.1", # Fixed model for user simulator
|
||||
)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user