Skip to content

Plugin execution using semantic kernel causes error #9210

Closed Answered by moonbox3
jais001 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jais001, thanks for your question. There's a simple fix for the issue you're encountering. You'll need to make sure your send_email function includes the self argument in the method definition.

@kernel_function(
            description="Takes recipient as list, cc as list  as input and sends email",
            name="send_email"
    )
    def send_email(
        self,
        recipients: Annotated[List[str], "The input is recipients as list"],
        cc: Annotated[List[str], "The input is cc as list"]
        ) -> Annotated[str, "The output is a string"]:
            # rest of your logic

You're seeing this error because Python is trying to pass the instance of EmailPlugin as an argum…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jais001
Comment options

Answer selected by moonbox3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
python Pull requests for the Python Semantic Kernel
2 participants