-
Couldn't load subscription status.
- Fork 14.5k
Description
I read the code in main() which indicates that once "get_random_destination" is called, the parameters and the function name will be printed. However, I cannot see these. I tried to announce argument_buffer and function_calls before main, and when I watch local variables, it suggests that they have 0 items. I tried to read the api usage on https://learn.microsoft.com/en-us/python/api/semantic-kernel/semantic_kernel.prompt_template.prompttemplateconfig?view=semantic-kernel-python#semantic-kernel-prompt-template-prompttemplateconfig-execution-settings ,and tried to adapt my code like below
kernel = Kernel() service_id = "agent" chat_service = OpenAIChatCompletion( ai_model_id="gpt-4o-mini", async_client=client, service_id=service_id, ) kernel.add_service(chat_service) kernel.add_plugin(DestinationsPlugin(), plugin_name="destinations") settings: OpenAIChatPromptExecutionSettings = kernel.get_prompt_execution_settings_from_service_id(service_id=service_id) settings.function_choice_behavior = FunctionChoiceBehavior.Required() agent = ChatCompletionAgent( kernel=kernel, name="TravelAgent", instructions="You are a helpful AI Agent that plans vacations. Always call a tool to pick a destination before replying.", arguments=KernelArguments(settings=settings), ),which force the model to call kernel_function, only to find nothing was output from TravelAgent