Azure / semantic-kernel-bot-in-a-box

Extensible Semantic Kernel Bot Solution Accelerator
MIT License
53 stars 11 forks source link

getting error ChatHistory is too long to get a completion. Try reducing the available functions. #3

Closed Naveen-Reddy237 closed 10 months ago

Naveen-Reddy237 commented 10 months ago

Hi,

I'm getting this error ChatHistory is too long to get a completion. Try reducing the available functions.

could you please advise, Thanks

MarcoABCardoso commented 10 months ago

Hello Naveen! Thank you for your interest in the project.

I have some code in progress to configure the number of chat history messages to keep in context. This should help address context size issues.

Could you provide some more details about your issue? Does it happen after multiple conversation turns, or after a particularly large prompt?

Naveen-Reddy237 commented 10 months ago

Thanks for your response.

It happens after multiple conversation turns.

MarcoABCardoso commented 10 months ago

Perfect, that is currently being worked on and should have a fix by today. I will link the commit to this issue when the change goes through.

Naveen-Reddy237 commented 10 months ago

ok Thank you and have one more issue when I try to upload any pdf file it is giving error saying file format is not supported.

MarcoABCardoso commented 10 months ago

A fix has been pushed, with a corresponding configuration CONVERSATION_HISTORY_MAX_MESSAGES. This should fix your original issue.

Regarding the UploadPlugin, PDF files should be the only type supported by default. If those are not working for you, please feel free to open a new issue with more details.

MarcoABCardoso commented 10 months ago

Closing this for now as this is likely solved by the fix provided. Please feel free to reopen if needed.

Naveen-Reddy237 commented 10 months ago

Hi @MarcoABCardoso

I have imported two functions like below kernel.ImportFunctions(new KBSearchPlugin(_config, conversationData), "KBSearchPlugin"); kernel.ImportFunctions(new SearchPlugin(_config, conversationData), "SearchPlugin");

When I search any information from KBSearchPlugin it is generating observations in the response but at the end instead of final Answer it is giving error ChatHistory is too long to get a completion. Try reducing the available functions.

could you please advise, Thanks