Skip to content

Issue with RAG|ChatWithRetrieval sample #15

@davefloodnz

Description

@davefloodnz

Hi Willem. Very useful book, thankyou.

I'm having an issue with the RAG|ChatWithRetrieval sample, maybe you could suggest a fix?

It's failing on line 28 in the QuestionAnsweringBot() class ... kernel.Plugins.AddFromObject(textSearch.CreateWithSearch("SearchPlugin"));

With System.ArgumentException: 'The Microsoft.SemanticKernel.DefaultKernelPlugin instance doesn't implement any [KernelFunction]-attributed methods.'

CoPilot says: You are getting this error because either:
• The class returned by CreateWithSearch does not have any [KernelFunction]-decorated methods.
• Or, CreateWithSearch is returning a default plugin (like DefaultKernelPlugin) that is not properly implemented.
To fix this, ensure that the class returned by CreateWithSearch has at least one public method decorated with [KernelFunction]. If you need more information, please provide the code for VectorStoreTextSearch and its CreateWithSearch method.

As this code is part of Semantic Kernel, I'm not sure how to proceed. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions