Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.vs/
bin/
obj/
.user
/BuildOutPut
/.DS_Store
appsettings.test.json
appsettings.Development.json
/src/Senparc.AI.Kernel.Tests/App_Data/SenparcTraceLog
*.DS_Store
/src/.idea/.idea.Senparc.AI/.idea
/Samples/Senparc.AI.Samples.Consoles/Properties/PublishProfiles
/Samples/Senparc.AI.Samples.Consoles/Senparc.AI.Samples.Consoles.csproj.user
.vs/
bin/
obj/
.user
/BuildOutPut
/.DS_Store
appsettings.test.json
appsettings.Development.json
/src/Senparc.AI.Kernel.Tests/App_Data/SenparcTraceLog
*.DS_Store
/src/.idea/.idea.Senparc.AI/.idea
/Samples/Senparc.AI.Samples.Consoles/Properties/PublishProfiles
/Samples/Senparc.AI.Samples.Consoles/Senparc.AI.Samples.Consoles.csproj.user
402 changes: 201 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

380 changes: 190 additions & 190 deletions README.md

Large diffs are not rendered by default.

96 changes: 48 additions & 48 deletions Samples/Senaprc.AI.Samples.Agents/AgentKeys.cs
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoGen.Core;
using Senparc.CO2NET.Trace;

namespace Senaprc.AI.Agents
{
public static class AgentKeys
{
public static string AgentKey1 = null;
public static string AgentKey2 = null;
public static string AgentKey3 = null;

public static Action<IAgent, IMessage, string> SendWechatMessage => async (agent, replyObject, message) =>
{
string key = null;
switch (agent.Name)
{
case "行政主管":
key = AgentKeys.AgentKey1;
break;
case "产品经理":
key = AgentKeys.AgentKey2;
break;
case "项目经理":
key = AgentKeys.AgentKey3;
break;
default:
break;
}

if (key != null)
{
try
{
await Senparc.Weixin.Work.AdvancedAPIs.Webhook.WebhookApi.SendTextAsync(key, message);
}
catch (Exception ex)
{
SenparcTrace.BaseExceptionLog(ex);
}
}
};
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoGen.Core;
using Senparc.CO2NET.Trace;
namespace Senaprc.AI.Agents
{
public static class AgentKeys
{
public static string AgentKey1 = null;
public static string AgentKey2 = null;
public static string AgentKey3 = null;
public static Action<IAgent, IMessage, string> SendWechatMessage => async (agent, replyObject, message) =>
{
string key = null;
switch (agent.Name)
{
case "行政主管":
key = AgentKeys.AgentKey1;
break;
case "产品经理":
key = AgentKeys.AgentKey2;
break;
case "项目经理":
key = AgentKeys.AgentKey3;
break;
default:
break;
}
if (key != null)
{
try
{
await Senparc.Weixin.Work.AdvancedAPIs.Webhook.WebhookApi.SendTextAsync(key, message);
}
catch (Exception ex)
{
SenparcTrace.BaseExceptionLog(ex);
}
}
};
}
}
Loading