Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
1 year ago | |
|---|---|---|
| .. | ||
| .config | 2 years ago | |
| .tools | 2 years ago | |
| eng | 1 year ago | |
| nuget | 2 years ago | |
| resource/images | 2 years ago | |
| sample | 1 year ago | |
| src | 1 year ago | |
| test | 1 year ago | |
| website | 1 year ago | |
| .editorconfig | 2 years ago | |
| .gitignore | 2 years ago | |
| AutoGen.sln | 2 years ago | |
| Directory.Build.props | 2 years ago | |
| NuGet.config | 2 years ago | |
| README.md | 2 years ago | |
| global.json | 2 years ago | |
[!NOTE]
Nightly build is available at:
Firstly, following the installation guide to install AutoGen packages.
Then you can start with the following code snippet to create a conversable agent and chat with it.
using AutoGen;
using AutoGen.OpenAI;
var openAIKey = Environment.GetEnvironmentVariable("OPENAI_API_KEY") ?? throw new Exception("Please set OPENAI_API_KEY environment variable.");
var gpt35Config = new OpenAIConfig(openAIKey, "gpt-3.5-turbo");
var assistantAgent = new AssistantAgent(
name: "assistant",
systemMessage: "You are an assistant that help user to do some tasks.",
llmConfig: new ConversableAgentConfig
{
Temperature = 0,
ConfigList = [gpt35Config],
})
.RegisterPrintMessage(); // register a hook to print message nicely to console
// set human input mode to ALWAYS so that user always provide input
var userProxyAgent = new UserProxyAgent(
name: "user",
humanInputMode: ConversableAgent.HumanInputMode.ALWAYS)
.RegisterPrintMessage();
// start the conversation
await userProxyAgent.InitiateChatAsync(
receiver: assistantAgent,
message: "Hey assistant, please do me a favor.",
maxRound: 10);
You can find more examples under the sample project.
ConversableAgent
Agent communication
Exclusive for dotnet
Workflow to GraphAddInitializeMessage to SendIntroductionSequentialGroupChat to RoundRobinGroupChatTextMessage, ImageMessage, MultiModalMessage and so on. PR #1676AutoGen.SemanticKernel to support seamless integration with Semantic KernelAutoGen.Core package. The AutoGen.Core package provides the abstraction for message type, agent and group chat and doesn't contain dependencies over Azure.AI.OpenAI or Semantic Kernel. This is useful when you want to leverage AutoGen's abstraction only and want to avoid introducing any other dependencies.GPTAgent, OpenAIChatAgent and all openai-dependencies to AutoGen.OpenAIMiddlewareStreamingAgent #1656FunctionContract from FunctionAttribute #1736AutoGen.LMStudio to support comsume openai-like API from LMStudio local serverMiddlewareAgentMiddlewareAgent to implement existing agent hooks (RegisterPreProcess, RegisterPostProcess, RegisterReply)AutoReplyAgent, PreProcessAgent, PostProcessAgent because they are replaced by MiddlewareAgentIAgent interface by removing ChatLLM PropertyGenerateReplyOptions to IAgent.GenerateReplyAsync which allows user to specify or override the options when generating replyIChatLLM as connector to LLMThis is a mirror of AutoGen from GitHub. AutoGen is a framework that enables the development of LLM applications using multiple agents that can converse with each other to solve tasks.
Python SVG Jupyter Notebook C# TSX other