Skip to content

Python: removed old search plugins #11035

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

Merged
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
3 changes: 0 additions & 3 deletions python/samples/concepts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,7 @@

### Search - Using [`Search`](https://github.com/microsoft/semantic-kernel/tree/main/python/semantic_kernel/connectors/search) services information

- [Bing Search Plugin](./search/bing_search_plugin.py)
- [Bing Text Search](./search/bing_text_search.py)
- [Bing Text Search as Plugin](./search/bing_text_search_as_plugin.py)
- [Google Search Plugin](./search/google_search_plugin.py)
- [Google Text Search as Plugin](./search/google_text_search_as_plugin.py)

### Service Selector - Shows how to create and use a custom service selector class
Expand Down
121 changes: 0 additions & 121 deletions python/samples/concepts/search/bing_plugin_examples.py

This file was deleted.

69 changes: 0 additions & 69 deletions python/samples/concepts/search/bing_search_plugin.py

This file was deleted.

48 changes: 0 additions & 48 deletions python/samples/concepts/search/bing_text_search.py

This file was deleted.

13 changes: 6 additions & 7 deletions python/samples/concepts/search/bing_text_search_as_plugin.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# Copyright (c) Microsoft. All rights reserved.


from collections.abc import Coroutine
from typing import Any
from collections.abc import Awaitable, Callable

from semantic_kernel import Kernel
from semantic_kernel.connectors.ai.function_choice_behavior import FunctionChoiceBehavior
from semantic_kernel.connectors.ai import FunctionChoiceBehavior
from semantic_kernel.connectors.ai.open_ai import (
OpenAIChatCompletion,
OpenAIChatPromptExecutionSettings,
)
from semantic_kernel.connectors.search.bing import BingSearch
from semantic_kernel.contents import ChatHistory
from semantic_kernel.filters.filter_types import FilterTypes
from semantic_kernel.filters.functions.function_invocation_context import FunctionInvocationContext
from semantic_kernel.filters import FilterTypes, FunctionInvocationContext
from semantic_kernel.functions import KernelArguments, KernelParameterMetadata, KernelPlugin

kernel = Kernel()
Expand Down Expand Up @@ -84,7 +81,9 @@


@kernel.filter(filter_type=FilterTypes.FUNCTION_INVOCATION)
async def log_bing_filter(context: FunctionInvocationContext, next: Coroutine[FunctionInvocationContext, Any, None]):
async def log_bing_filter(
context: FunctionInvocationContext, next: Callable[[FunctionInvocationContext], Awaitable[None]]
):
if context.function.plugin_name == "bing":
print("Calling Bing search with arguments:")
if "query" in context.arguments:
Expand Down
92 changes: 0 additions & 92 deletions python/samples/concepts/search/google_search_plugin.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
from typing import Any

from semantic_kernel import Kernel
from semantic_kernel.connectors.ai.function_choice_behavior import FunctionChoiceBehavior
from semantic_kernel.connectors.ai import FunctionChoiceBehavior
from semantic_kernel.connectors.ai.open_ai import (
OpenAIChatCompletion,
OpenAIChatPromptExecutionSettings,
)
from semantic_kernel.connectors.search.google import GoogleSearch
from semantic_kernel.contents import ChatHistory
from semantic_kernel.filters.filter_types import FilterTypes
from semantic_kernel.filters.functions.function_invocation_context import FunctionInvocationContext
from semantic_kernel.filters import FilterTypes, FunctionInvocationContext
from semantic_kernel.functions import KernelArguments, KernelParameterMetadata, KernelPlugin

# This sample shows how to setup Google Search as a plugin in the Semantic Kernel.
Expand Down
Loading
Loading