You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to call the plugin using the Semantic Kernel. The model in use is mistral:7b with the local Ollama. Both the native plugin and the semantic plugin are working fine, and it appears that mistral:7b is correctly calling my plugin.
However, when I try to call the APIs in the OpenAPI schema with mistral:7b, it failed. Here is the sample code snippet:
Create Connector
var kernel = Kernel.CreateBuilder().AddOpenAIChatCompletion(modelId: "mistral:7b", apiKey: null, endpoint: new Uri("http://XX.XX.XX.XX:11434")).Build();
Import OpenAPI schema.
var apiPluginFile = @"C:/xxxx/swagger.json";
await kernel.await kernel.ImportPluginFromOpenApiAsync(
"jiraPlugin",
apiPluginFile, new OpenApiFunctionExecutive(
new OpenApiFunctionExecutionParameters(
authCallback: tokenProvider.AuthenticateRequestAsync,
serverUrlOverride: new Uri("http://xxx.xxx.xxx.xxx")
)
);
Create planner with FunctionCallingStepwisePlanner
var planner = new FunctionCallingStepwisePlanner(
new FunctionCallingStepwisePlannerOptions
{
MaxIterations = 6,
MaxTokens = 5000,
});
}
Execute the task with ExecuteAsync.
var result = await planner.ExecuteAsync(kernel, "XXXXXXXX");
Console.WriteLine(result.FinalAnswer)
result.FinalAnswer is empty. Looking at result.ChatHistory, I see that mistral:7b doesn't call any restfulAPI in swagger.json for me.
So, I switched the model to Azure Open AI's gpt-4o and found that it successfully called the correct RESTful APIs without any issues!"
I just replace the kernel with the following code:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to call the plugin using the Semantic Kernel. The model in use is mistral:7b with the local Ollama. Both the native plugin and the semantic plugin are working fine, and it appears that mistral:7b is correctly calling my plugin.
However, when I try to call the APIs in the OpenAPI schema with mistral:7b, it failed. Here is the sample code snippet:
result.FinalAnswer is empty. Looking at result.ChatHistory, I see that mistral:7b doesn't call any restfulAPI in swagger.json for me.
So, I switched the model to Azure Open AI's gpt-4o and found that it successfully called the correct RESTful APIs without any issues!"
I just replace the kernel with the following code:
Is it possible for mistral:7b or any other models to support OpenAPI Schema like gpt-4o?
Beta Was this translation helpful? Give feedback.
All reactions