.Net OpenAiAssistantAgent having trouble with function calls when FileSearch is enabled #11704
-
I have an OpenAiAssistantAgent that has a handful of KernelPlugins as well as some files to use for file search and I am finding that when the agent has access to both, it has a lot of trouble knowing that it can use the KernelPlugins unless you specifically prompt it to use a specific plugin, and even then it struggles sometimes. It works perfectly fine when it only has KernelPlugins OR file search enabled, but struggles when it has both. Has anyone run into this or has suggestions? Thanks! Additionally, I was looking for alternative approaches and found the following SK example for using "Assistant Tool Functions", but it does not appear to provide any better results, also, I do not see how it is different than just passing the plugins to the OpenAIAssistantAgent constructor as I am doing below. Here is a super short snippet of how I am initializing the agent, just in case I am doing something silly here, but I believe this is in line with the latest release. AssistantClient assistantClient = new(_openAiApiKey);
Assistant assistant = await assistantClient.CreateAssistantAsync(
modelId: model.GetModelDisplayName(),
name: agentName,
instructions: instructions,
temperature: temperature,
enableFileSearch: true,
vectorStoreId: vectorStoreId
);
OpenAIAssistantAgent agent = new(assistant, assistantClient, plugins); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
By chance, have you tried other samples to see if you get the same issue. This isn't one we've regularly seen. This is a good sample to look at as well: Step04_KernelFunctionStrategies How to utilize a KernelFunction as a chat strategy. |
Beta Was this translation helpful? Give feedback.
By chance, have you tried other samples to see if you get the same issue. This isn't one we've regularly seen.
This is a good sample to look at as well:
Step04_KernelFunctionStrategies How to utilize a KernelFunction as a chat strategy.