Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Remove old references of plugin import #10462

Merged
merged 4 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) Microsoft. All rights reserved.

import asyncio
import os

from semantic_kernel import Kernel
from semantic_kernel.connectors.ai import FunctionChoiceBehavior
Expand Down Expand Up @@ -29,10 +28,7 @@
# Note: the underlying gpt-35/gpt-4 model version needs to be at least version 0613 to support tools.
kernel.add_service(OpenAIChatCompletion(service_id="chat"))

plugins_directory = os.path.join(__file__, "../../../../../prompt_template_samples/")
# adding plugins to the kernel
# the joke plugin in the FunPlugins is a semantic plugin and has the function calling disabled.
# kernel.import_plugin_from_prompt_directory("chat", plugins_directory, "FunPlugin")
# the math plugin is a core plugin and has the function calling enabled.
kernel.add_plugin(MathPlugin(), plugin_name="math")
kernel.add_plugin(TimePlugin(), plugin_name="time")
Expand Down
4 changes: 2 additions & 2 deletions python/samples/getting_started/05-using-the-planner.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@
" Description: EmailPlugin provides a set of functions to send emails.\n",
"\n",
" Usage:\n",
" kernel.import_plugin_from_object(EmailPlugin(), plugin_name=\"email\")\n",
" kernel.add_plugin(EmailPlugin(), plugin_name=\"email\")\n",
"\n",
" Examples:\n",
" {{email.SendEmail}} => Sends an email with the provided subject and body.\n",
Expand Down Expand Up @@ -581,7 +581,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.6"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
Loading