You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# necessary importsasyncdefmain():
agent=ChatCompletionAgent(
service=OpenAIChatCompletion(),
plugins=[DatePlugin(), WeatherPlugin()], #optionalinstructions="you are a helpful assistant that can answer questions about the world", #optional
)
print(awaitagent.invoke("What is the capital of France?"))
if__name__=="__main__":
asyncio.run(main())
as well as make updates for invoke: from AsyncIterable -> couroutine.
The text was updated successfully, but these errors were encountered:
Wouldn't you need Kernel as well in order to do the function calling and have things like Filters available as well?
# necessary importsasyncdefmain():
kernel.add_plugins([DatePlugin(), WeatherPlugin()])
agent=ChatCompletionAgent(
service=OpenAIChatCompletion(),
kernel=kernelinstructions="you are a helpful assistant that can answer questions about the world", #optional
)
print(awaitagent.invoke("What is the capital of France?"))
if__name__=="__main__":
asyncio.run(main())
Today, if a kernel is not provided, we create one. So we'll use a model_validator after the model is formed, and add the plugins to the kernel for the caller. This is considered the "easiest" of easy paths where someone wants to write the most minimal amount of code to get started. We will still support that path where one can configure the kernel and pass it in, which you could say is the "medium/intermediate" path. Passing in plugins via the constructor will take precedence over any plugins added previously.
Supporting the simplified agent scenario:
as well as make updates for invoke: from AsyncIterable -> couroutine.
The text was updated successfully, but these errors were encountered: