mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
### Motivation and Context To better align with SK dotnet v1, Python skills have been renamed to plugins. This removes the root samples skills directory as dotnet supports the plugins and their configs. This the beginning of more work to consolidate other files/names, per the backlog. I've run several greps for files or file names containing "skill" (case insensitive), and no results appear. Do alert if you find anything else that includes "skill." Fixes #3319 <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description This is a large, breaking change PR as the replacement of "skills" to "plugins" affects many files. It was difficult to break this up into smaller chunks without leaving the SK Python repo in a bad state for some time. Other updates include: - Prompt template has been updated to use `execution_settings`, which aligns with dotnet, from the previous `completion` that Python used. - AzureOpenAI/OpenAI function calling has been updated to match the current versions of tools/tool_choice. Parsing messages in the open_ai utils respects this as it now looks for tool_calls and it configures the function_call with the id (new), name, and argument). - File renames, where the filename used to contain "skill" will look like new code, but it's the same code, just with "plugin" in the name. - Kernel examples and notebooks have been tested and are working. Unit tests and integration tests are passing. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 --------- Co-authored-by: Evan Mattson <[email protected]>
57 lines
2.0 KiB
Python
57 lines
2.0 KiB
Python
# Copyright (c) Microsoft. All rights reserved.
|
|
|
|
from semantic_kernel import core_plugins, memory
|
|
from semantic_kernel.kernel import Kernel
|
|
from semantic_kernel.orchestration.context_variables import ContextVariables
|
|
from semantic_kernel.orchestration.sk_context import SKContext
|
|
from semantic_kernel.orchestration.sk_function_base import SKFunctionBase
|
|
from semantic_kernel.semantic_functions.chat_prompt_template import ChatPromptTemplate
|
|
from semantic_kernel.semantic_functions.prompt_template import PromptTemplate
|
|
from semantic_kernel.semantic_functions.prompt_template_config import (
|
|
PromptTemplateConfig,
|
|
)
|
|
from semantic_kernel.semantic_functions.semantic_function_config import (
|
|
SemanticFunctionConfig,
|
|
)
|
|
from semantic_kernel.utils.logging import setup_logging
|
|
from semantic_kernel.utils.null_logger import NullLogger
|
|
from semantic_kernel.utils.settings import (
|
|
azure_aisearch_settings_from_dot_env,
|
|
azure_aisearch_settings_from_dot_env_as_dict,
|
|
azure_cosmos_db_settings_from_dot_env,
|
|
azure_openai_settings_from_dot_env,
|
|
bing_search_settings_from_dot_env,
|
|
google_palm_settings_from_dot_env,
|
|
mongodb_atlas_settings_from_dot_env,
|
|
openai_settings_from_dot_env,
|
|
pinecone_settings_from_dot_env,
|
|
postgres_settings_from_dot_env,
|
|
redis_settings_from_dot_env,
|
|
)
|
|
|
|
__all__ = [
|
|
"Kernel",
|
|
"NullLogger",
|
|
"azure_cosmos_db_settings_from_dot_env",
|
|
"openai_settings_from_dot_env",
|
|
"azure_openai_settings_from_dot_env",
|
|
"azure_aisearch_settings_from_dot_env",
|
|
"azure_aisearch_settings_from_dot_env_as_dict",
|
|
"postgres_settings_from_dot_env",
|
|
"pinecone_settings_from_dot_env",
|
|
"bing_search_settings_from_dot_env",
|
|
"mongodb_atlas_settings_from_dot_env",
|
|
"google_palm_settings_from_dot_env",
|
|
"redis_settings_from_dot_env",
|
|
"PromptTemplateConfig",
|
|
"PromptTemplate",
|
|
"ChatPromptTemplate",
|
|
"SemanticFunctionConfig",
|
|
"ContextVariables",
|
|
"SKFunctionBase",
|
|
"SKContext",
|
|
"memory",
|
|
"core_plugins",
|
|
"setup_logging",
|
|
]
|