Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[.Net][Document] Add function comparison page between python AutoGen to website #3184

Closed
LittleLittleCloud opened this issue Jul 21, 2024 · 6 comments · Fixed by #3367
Closed
Assignees
Labels
dotnet issues related to AutoGen.Net

Comments

@LittleLittleCloud
Copy link
Collaborator

LittleLittleCloud commented Jul 21, 2024

Agentic pattern

feature AutoGen AutoGen.Net
code interpreter run python code in local/docker/notebook executor run csharp code in dotnet interactive executor
single agent chat pattern ✔️ ✔️
two agent chat pattern ✔️ ✔️
group chat (include FSM) ✔️ ✔️ (using workflow for FSM groupchat)
nest chat ✔️ ✔️ (using middleware pattern)
sequential chat ✔️ ❌ (need to manually create task in code)
tool ✔️ ✔️

LLM platform support

Note

Other than the platforms list below, AutoGen.Net also supports all the platforms that semantic kernel supports via AutoGen.SemanticKernel as a bridge

feature AutoGen AutoGen.Net
OpenAI (include third-party) ✔️ ✔️
Mistral ✔️ ✔️
Ollama ✔️ ✔️
Claude ✔️ ✔️
Gemini (Include Vertex) ✔️ ✔️

Popular Contrib Agent support

feature AutoGen AutoGen.Net
Rag Agent ✔️
Web surfer ✔️

@sonichi @qingyun-wu please suggest any features I forget to add to this list.

Originally posted by @ChristianWeyer in #2787 (reply in thread)

@LittleLittleCloud LittleLittleCloud added this to the AutoGen.Net 0.1.0 milestone Jul 21, 2024
@LittleLittleCloud LittleLittleCloud added the dotnet issues related to AutoGen.Net label Jul 21, 2024
@olaoluwasalami olaoluwasalami self-assigned this Jul 21, 2024
@ChristianWeyer
Copy link

Should we add that the .NET version explicitly supports the graph concept (https://microsoft.github.io/autogen-for-net/articles/Use-graph-in-group-chat.html) while the Python version does not?

@ChristianWeyer
Copy link

Do we have a sample for sequential chat in .NET?

@LittleLittleCloud
Copy link
Collaborator Author

@ChristianWeyer In .NET there is no apple2apple implementation of the sequential chat in python, which takes a json object task description and run that object in one pass. So you need to manually create the tasks to agents.

Here is the sequential chat tasks in python and its equivalence in AutoGen.Net
image

// Creating Tasks
// In python AutoGen, you can use initiate_chats to create and run a sequential of tasks in json object
// In dotnet AutoGen, however, that feature is not available, so you need to manually create these tasks using code.

// Task 1. Onboard customer by gathering name and location
// (onboard_personal_information_agent -> user .. (repeat less than two times)) -> summarizer
var greetingMessage = new TextMessage(Role.Assistant, """
    Hello, I'm here to help you get started with our product.
    Could you tell me your name and location?
    """, from: onboardingPersonalInformationAgent.Name);

var conversation = await onboardingPersonalInformationAgent.SendAsync(
    receiver: user,
    [greetingMessage],
    maxRound: 2);

var summarizePrompt = """
    Return the customer information into as JSON object only: {'name': '', 'location': ''}
    """;

var summary = await summarizer.SendAsync(summarizePrompt, conversation);

// Task 2. Gapther customer's preferences on news topics
// (onboarding_topic_preference_agent -> user .. (repeat one time)) -> summarizer
var topicPreferenceMessage = new TextMessage(Role.Assistant, """
    Great! Could you tell me what topics you are interested in reading about?
    """, from: onboardingTopicPreferenceAgent.Name);

conversation = await onboardingTopicPreferenceAgent.SendAsync(
    receiver: user,
    [topicPreferenceMessage],
    maxRound: 1);

// Keep summarizing
summary = await summarizer.SendAsync(chatHistory: new[] { summary }.Concat(conversation));

// Task 3. Engage the customer with fun facts, jokes, or interesting stories based on the user's personal information and topic preferences
// (user(find fun thing to read) -> customerEngagementAgent .. (repeat 1 time)) -> summarizer
var funFactMessage = new TextMessage(Role.User, """
    Let's find something fun to read.
    """, from: user.Name);

conversation = await user.SendAsync(
    receiver: customerEngagementAgent,
    chatHistory: conversation.Concat([funFactMessage]), // this time, we keep the previous conversation history
    maxRound: 1);

@LittleLittleCloud
Copy link
Collaborator Author

Hey @olaoluwasalami , any updates on this issue

@olaoluwasalami
Copy link
Collaborator

Hey @olaoluwasalami , any updates on this issue

Working on it now. Would create a PR now

@olaoluwasalami
Copy link
Collaborator

@LittleLittleCloud I have created a PR. Please take a look #3367

especially the location of the article and the title

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet issues related to AutoGen.Net
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants