11"""MarketingTools class provides various marketing functions for a marketing agent."""
2-
32import inspect
4- from typing import Callable , List
3+ import json
4+ from typing import Callable , List , get_type_hints
55
6- from semantic_kernel .functions import kernel_function
76from models .messages_kernel import AgentType
87
9- import inspect
10- import json
11- from typing import Any , Dict , List , get_type_hints
8+ from semantic_kernel .functions import kernel_function
129
1310
1411class MarketingTools :
@@ -278,6 +275,7 @@ async def analyze_website_traffic(source: str) -> str:
278275 @staticmethod
279276 @kernel_function (description = "Develop customer personas for a specific segment." )
280277 async def develop_customer_personas (segment_name : str ) -> str :
278+ """ Develop customer personas for a specific segment. """
281279 return f"Customer personas developed for segment '{ segment_name } '."
282280
283281 # This function does NOT have the kernel_function annotation
@@ -290,7 +288,6 @@ def generate_tools_json_doc(cls) -> str:
290288 Returns:
291289 str: JSON string containing the methods' information
292290 """
293-
294291 tools_list = []
295292
296293 # Get all methods from the class that have the kernel_function annotation
@@ -320,7 +317,7 @@ def generate_tools_json_doc(cls) -> str:
320317 type_hints = get_type_hints (method )
321318
322319 # Process parameters
323- for param_name , param in sig .parameters .items ():
320+ for param_name in sig .parameters .items ():
324321 # Skip first parameter 'cls' for class methods (though we're using staticmethod now)
325322 if param_name in ["cls" , "self" ]:
326323 continue
@@ -345,7 +342,6 @@ def generate_tools_json_doc(cls) -> str:
345342 param_type = "string"
346343
347344 # Create parameter description
348- param_desc = param_name .replace ("_" , " " )
349345 args_dict [param_name ] = {
350346 "description" : param_name ,
351347 "title" : param_name .replace ("_" , " " ).title (),
@@ -370,7 +366,8 @@ def generate_tools_json_doc(cls) -> str:
370366 @classmethod
371367 def get_all_kernel_functions (cls ) -> dict [str , Callable ]:
372368 """
373- Returns a dictionary of all methods in this class that have the @kernel_function annotation.
369+ Return a dictionary of all methods in this class that have the @kernel_function annotation.
370+
374371 This function itself is not annotated with @kernel_function.
375372
376373 Returns:
0 commit comments