Replies: 1 comment
-
Tagging @crickman |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to build AI agents using the Semantic Kernel SDK Develop multi-agent solutions and create custom selection and termination strategies for agent collaboration.
I am planning to use this application as a playground and add multi agent collaboration.
https://github.com/microsoft/chat-copilot
Imagine an agent application where the agent will act as an interviewer collecting information from the users where he uses NLP processing to extract data for his profile.
I want to use react.js and c# asp.net web api (9) and I want to be able to save conversation history in Azure Cosmos nosql db and rehydrate the state of conversation while interacting with users in a possibly long conversation thread.
Imagine I can have some json instances where some worker agents will be equipped with tools: native function calls, open api endpoints and they can use the same shared instance and update portions of it and some other json instances might be created to define some reference data (there would be interaction with Cosmos nosql db items) which Primary keys (or composite partition keys) will be used to establish some referential integrity with parts of that shared json instance.
I used to see some Kernel's data structure which is a dictionary of objects and I would like some pointers to a complex application that does something similar or advise how to technically do it.
How whould I do the same as below, basically using OpenAI JSON output.
Because my json instance would require multple converstations with a user, it doesn't necesserily need to be valid accoring to generated json schema.
In this example, the OpenAI structure outputs API JSON schemas are automatically handled, ensuring consistent JSON responses that match your C# type. This removes the burden of having to parse or validate JSON manually.
`var kernelBuilder = Kernel.CreateBuilder();
var config = new AzureOpenAIConfig()
{
Endpoint = "https://xxxx.openai.azure.com/",
APIKey = "yourapikeyhere",
Deployment = "gpt-4o-mini",
Auth = AzureOpenAIConfig.AuthTypes.APIKey
};
Kernel kernel = kernelBuilder.Build();
var executionSettings = new OpenAIPromptExecutionSettings
{
ResponseFormat = typeof(Book), // Specify response format class
};
var result = await kernel.InvokePromptAsync("What is the most famous book?", new(executionSettings));
public class Book
{
public string Title { get; set; }
public int ReleaseDate { get; set; }
public string Author { get; set; }
}`
Beta Was this translation helpful? Give feedback.
All reactions