Use current agent id as template search dir.
This commit is contained in:
parent
8a6593dc01
commit
2a0c54a915
18
README.md
18
README.md
|
|
@ -39,12 +39,30 @@ It's written in C# running on .Net Core that is full cross-platform framework, t
|
|||
```
|
||||
2. Run UI project, reference to [Chatbot UI](src/Plugins/BotSharp.Plugin.ChatbotUI/Chatbot-UI.md).
|
||||
|
||||
### Core Modules
|
||||
|
||||
The core module is mainly composed of abstraction and framework function implementation, combined with some common tools.
|
||||
|
||||
- Plugin Loader
|
||||
- Hooking
|
||||
- Authentication
|
||||
- Agent Profile
|
||||
- Conversation & State
|
||||
- Routing & Planning
|
||||
- Templating
|
||||
- File Repository
|
||||
- Caching
|
||||
- Rich Content
|
||||
- LLM Provider
|
||||
|
||||
|
||||
### Plugins
|
||||
|
||||
BotSharp uses component design, the kernel is kept to a minimum, and business functions are implemented by external components. The modular design also allows contributors to better participate. Below are the bulit-in plugins:
|
||||
|
||||
#### Data Storages
|
||||
- BotSharp.Plugin.MongoStorage
|
||||
- BotSharp.Plugin.MongoStorage
|
||||
|
||||
#### LLMs
|
||||
- BotSharp.Plugin.AzureOpenAI
|
||||
|
|
|
|||
|
|
@ -62,11 +62,10 @@ public partial class RoutingService
|
|||
if (!message.StopCompletion)
|
||||
{
|
||||
var routing = _services.GetRequiredService<RoutingContext>();
|
||||
var agentId = routing.GetCurrentAgentId();
|
||||
|
||||
|
||||
// Find response template
|
||||
var templateService = _services.GetRequiredService<IResponseTemplateService>();
|
||||
var responseTemplate = await templateService.RenderFunctionResponse(agentId, message);
|
||||
var responseTemplate = await templateService.RenderFunctionResponse(message.CurrentAgentId, message);
|
||||
if (!string.IsNullOrEmpty(responseTemplate))
|
||||
{
|
||||
dialogs.Add(RoleDialogModel.From(message,
|
||||
|
|
@ -80,7 +79,8 @@ public partial class RoutingService
|
|||
role: AgentRole.Function,
|
||||
content: message.Content));
|
||||
|
||||
// Send to LLM
|
||||
// Send to Next LLM
|
||||
var agentId = routing.GetCurrentAgentId();
|
||||
await InvokeAgent(agentId, dialogs);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue