Skip to content

02-semantic-kernel.ipynb Cannot see information about function calls #366

@18964154265

Description

@18964154265

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions