mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-02 20:32:38 +02:00
rm sk agent
This commit is contained in:
parent
a3699128d1
commit
7e9dff545d
5 changed files with 0 additions and 209 deletions
|
|
@ -9,34 +9,12 @@ import importlib
|
|||
from typing import Callable, Coroutine, Literal, Optional, Union, overload
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, model_validator
|
||||
from semantic_kernel.skill_definition import sk_function
|
||||
|
||||
from metagpt.configs.search_config import SearchConfig
|
||||
from metagpt.logs import logger
|
||||
from metagpt.tools import SearchEngineType
|
||||
|
||||
|
||||
class SkSearchEngine:
|
||||
"""A search engine class for executing searches.
|
||||
|
||||
Attributes:
|
||||
search_engine: The search engine instance used for executing searches.
|
||||
"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.search_engine = SearchEngine(**kwargs)
|
||||
|
||||
@sk_function(
|
||||
description="searches results from Google. Useful when you need to find short "
|
||||
"and succinct answers about a specific topic. Input should be a search query.",
|
||||
name="searchAsync",
|
||||
input_description="search",
|
||||
)
|
||||
async def run(self, query: str) -> str:
|
||||
result = await self.search_engine.run(query)
|
||||
return result
|
||||
|
||||
|
||||
class SearchEngine(BaseModel):
|
||||
"""A model for configuring and executing searches with different search engines.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue