mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [BREAKING]: removed display_name, renamed context_providers, middleware and AggregateContextProvider (#3139)
* removed display_name, renamed context_providers, middleware and AggregateContextProvider * fixes * fixed test * testfix * removed mistakenly put back test * updated new test * rename middlewares to middleware * middleware fixes
This commit is contained in:
committed by
GitHub
Unverified
parent
ef44fb4960
commit
203fb7b1c4
@@ -185,7 +185,7 @@ async def main() -> None:
|
||||
"Before answering, always check for stored context"
|
||||
),
|
||||
tools=[],
|
||||
context_providers=provider,
|
||||
context_provider=provider,
|
||||
)
|
||||
|
||||
# Teach a user preference; the agent writes this to the provider's memory
|
||||
@@ -227,7 +227,7 @@ async def main() -> None:
|
||||
"Before answering, always check for stored context"
|
||||
),
|
||||
tools=search_flights,
|
||||
context_providers=provider,
|
||||
context_provider=provider,
|
||||
)
|
||||
# Invoke the tool; outputs become part of memory/context
|
||||
query = "Are there any flights from new york city (jfk) to la? Give me details"
|
||||
|
||||
@@ -70,7 +70,7 @@ async def main() -> None:
|
||||
"Before answering, always check for stored context"
|
||||
),
|
||||
tools=[],
|
||||
context_providers=provider,
|
||||
context_provider=provider,
|
||||
chat_message_store_factory=chat_message_store_factory,
|
||||
)
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ async def example_global_thread_scope() -> None:
|
||||
"Before answering, always check for stored context containing information"
|
||||
),
|
||||
tools=[],
|
||||
context_providers=provider,
|
||||
context_provider=provider,
|
||||
)
|
||||
|
||||
# Store a preference in the global scope
|
||||
@@ -128,7 +128,7 @@ async def example_per_operation_thread_scope() -> None:
|
||||
agent = client.create_agent(
|
||||
name="ScopedMemoryAssistant",
|
||||
instructions="You are an assistant with thread-scoped memory.",
|
||||
context_providers=provider,
|
||||
context_provider=provider,
|
||||
)
|
||||
|
||||
# Create a specific thread for this scoped provider
|
||||
@@ -193,7 +193,7 @@ async def example_multiple_agents() -> None:
|
||||
personal_agent = client.create_agent(
|
||||
name="PersonalAssistant",
|
||||
instructions="You are a personal assistant that helps with personal tasks.",
|
||||
context_providers=personal_provider,
|
||||
context_provider=personal_provider,
|
||||
)
|
||||
|
||||
work_provider = RedisProvider(
|
||||
@@ -211,7 +211,7 @@ async def example_multiple_agents() -> None:
|
||||
work_agent = client.create_agent(
|
||||
name="WorkAssistant",
|
||||
instructions="You are a work assistant that helps with professional tasks.",
|
||||
context_providers=work_provider,
|
||||
context_provider=work_provider,
|
||||
)
|
||||
|
||||
# Store personal information
|
||||
|
||||
Reference in New Issue
Block a user