Skip to content

Commit

Permalink
doc improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oceania2018 committed Aug 14, 2023
1 parent 893acaa commit 62f8800
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 53 deletions.
16 changes: 3 additions & 13 deletions docs/agent/account.md → docs/agent/intro.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
# Agent
Agent is a collection that contains prompt words and function Json Schema definitions, few-shot examples and knowledge base data. You can create multiple different Agents to perform specific operations in specific domains. BotSharp has built-in maintenance for Agents, including creating, updating and deleting, importing and exporting.

## User Account
As a Bot construction framework, the most basic step is to integrate the user authentication function, so that the back-end API can recognize which user the current request comes from. In this way, a more complete business system can be further constructed. BotSharp can be combined with the user authentication function of ASP.NET MVC.

### Create a user account
Use the [Account Creation](https://www.postman.com/orange-flare-634868/workspace/botsharp/request/1346299-1b868c08-c6ac-48a5-94ab-93f6f080c085) API in BotSharp to create the first platform user.
# Agent Introduction

![Alt text](assets/account-creation.png)
An agent helps you process user sentences (unstructure data) into structure data that you can use to return an appropriate response.

### Get access token
After the platform user is created, the user token can be obtained through the [Get Token](https://www.postman.com/orange-flare-634868/workspace/botsharp/request/1346299-5d70fec4-dfa0-4b74-a4fd-8cd21009d44f) API, and this token is required in all subsequent APIs.

![Alt text](assets/account-token.png)
Agent is a collection that contains prompt words and function Json Schema definitions, few-shot examples and knowledge base data. You can create multiple different Agents to perform specific operations in specific domains. BotSharp has built-in maintenance for Agents, including creating, updating and deleting, importing and exporting.

## My Agent
After creating the platform account, you can start to enter the steps of creating the Agent.
Expand Down
3 changes: 3 additions & 0 deletions docs/agent/state.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Conversation State

BotSharp has a built-in dialogue state management function, which automatically saves the input parameters of the function to the dialogue state by default, and is valid throughout the life cycle of the dialogue. If the parameter name is repeated, it will be overwritten.
File renamed without changes
File renamed without changes
14 changes: 14 additions & 0 deletions docs/architecture/authentication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Authentication

## User Account
As a Bot construction framework, the most basic step is to integrate the user authentication function, so that the back-end API can recognize which user the current request comes from. In this way, a more complete business system can be further constructed. BotSharp can be combined with the user authentication function of ASP.NET MVC.

### Create a user account
Use the [Account Creation](https://www.postman.com/orange-flare-634868/workspace/botsharp/request/1346299-1b868c08-c6ac-48a5-94ab-93f6f080c085) API in BotSharp to create the first platform user.

![Alt text](assets/account-creation.png)

## Get access token
After the platform user is created, the user token can be obtained through the [Get Token](https://www.postman.com/orange-flare-634868/workspace/botsharp/request/1346299-5d70fec4-dfa0-4b74-a4fd-8cd21009d44f) API, and this token is required in all subsequent APIs.

![Alt text](assets/account-token.png)
File renamed without changes.
1 change: 1 addition & 0 deletions docs/architecture/hooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Hooks
1 change: 1 addition & 0 deletions docs/architecture/plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Plug-in
3 changes: 3 additions & 0 deletions docs/channels/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Channel Introduction

When you already trained a chatbot on Botsharp, you may want it to play a really role in life. So we intergrate some popular channels in Botsharp including Twilio, facebook messenger, Telegram, WeChat and some other RPAs. These channels can make your robot "real" in life. For example, on facebook when a user visit your page and sends you a message, they can talk to your agent. You can also set a virtral assistant based on Twilio to chat with your clients for ordering, consulting, problem solving and many other business processes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Facebook Messenger
Messenger
==================

The BotSharp Facebook integration allows you to easily create a Facebook Messenger bot with natural language understanding, based on the BotSharp technology.
Expand Down
1 change: 1 addition & 0 deletions docs/channels/wechat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# WeChat
36 changes: 19 additions & 17 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@ BotSharp is strictly in accordance with the components principle and decouples e
.. image:: static/logos/BotSharp.png
:height: 64px

Some Features
-------------

* Built-in multi-Agents management, easy to build Bot as a Service platform.
* Integrate with multiple LLMs like ChatGPT and LLaMA.
* Using plug-in design, it is easy to expand functions.
* Working with multiple Vector Stores for senmatic search.
* Supporting different UI providers like `Chatbot UI`_ and `HuggingChat UI`_.
* Integrated with popular social platforms like Facebook Messenger, Slack and Telegram.
* Providing REST APIs to work with your own UI.

Indices and tables
==================
The main documentation for the site is organized into the following sections:
Expand All @@ -59,16 +48,19 @@ The main documentation for the site is organized into the following sections:
:maxdepth: 3
:caption: Agent & Conversation

agent/account
agent/intro
agent/conversation
agent/state

.. _integration-docs:

.. toctree::
:maxdepth: 3
:caption: Channels Integration
:caption: Interactive Channels

integrations/facebook-messenger
channels/intro
channels/messenger
channels/wechat

.. _knowledge-base:

Expand All @@ -79,17 +71,27 @@ The main documentation for the site is organized into the following sections:
knowledge-base/text-embedding
knowledge-base/vector-database
knowledge-base/similarity-search
knowledge-base/build-qa-bot

.. _prompting:

.. toctree::
:maxdepth: 3
:caption: Prompt Engineering

prompt/intro

.. _architecture-docs:

.. toctree::
:maxdepth: 3
:caption: Architecture:

architecture/data_storage
architecture/authentication
architecture/plugin
architecture/hooks
architecture/data-persistence

If you feel that this project is helpful to you, please Star us on the project, we will be very grateful.

.. _Chatbot UI: https://github.com/mckaywrigley/chatbot-ui
.. _HuggingChat UI: https://github.com/huggingface/chat-ui
.. _discord: https://discord.gg/qRVm82fKTS
14 changes: 14 additions & 0 deletions docs/knowledge-base/build-qa-bot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Build Q&A Bot

## Feed knowledge

Use the feed knowledge interface to feed knowledge into the database. Before that, you need to create an Agent to manage the Chatbot, and the Agent's `id` is needed in subsequent operations.
`http://localhost:5500/knowledge/{agentId}`, You can add `startPageNum` and `endPageNum` to select useful parts of the document.

![Alt text](assets/feed_knowledge_pdf.png)

## Retrieve knowledge

After you have finished inputting knowledge, you can start asking related questions with your AI Assistant.

![Alt text](assets/feed_knowledge_answer.png)
13 changes: 0 additions & 13 deletions docs/knowledge-base/similarity-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,3 @@

After we have learned the concepts of `Text Embedding` and `Vector Database`, we can start to use BotSharp to actually build an LLM-based knowledge base question system.
Below we will walk through how to use an existing PDF document to make a Q&A chatbot.

## Feed knowledge

Use the feed knowledge interface to feed knowledge into the database. Before that, you need to create an Agent to manage the Chatbot, and the Agent's `id` is needed in subsequent operations.
`http://localhost:5500/knowledge/{agentId}`, You can add `startPageNum` and `endPageNum` to select useful parts of the document.

![Alt text](assets/feed_knowledge_pdf.png)

## Retrieve knowledge

After you have finished inputting knowledge, you can start asking related questions with your AI Assistant.

![Alt text](assets/feed_knowledge_answer.png)
1 change: 1 addition & 0 deletions docs/prompt/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Prompt Engineering
2 changes: 1 addition & 1 deletion docs/quick-start/installation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Quick Start
# Installation

BotSharp strictly follows the modular design principle and adopts a structure in which views and logic are separated. It also provides a complete Web API interface to integrate with your own system. At the architectural level, Hook and EvenT are designed for different purposes, which can expand Chatbot's dialogue capabilities without changing the kernel.

Expand Down
17 changes: 9 additions & 8 deletions docs/quick-start/overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Overview
*Haiping Chen --06/18/2023*

BotSharp is an open source machine learning framework for AI Bot platform builder. This project involves natural language understanding and audio processing technologies, and aims to promote the development and application of intelligent robot assistants in information systems. Out of the box machine learning algorithms allow ordinary programmers to develop artificial intelligence applications faster and easier.

Expand All @@ -24,11 +23,13 @@ Your code would have to handle all these different types of requests ro carry ou

However, BotSharp lets you easily achieve a conversational user experience by handling the natural language understanding (NLU) for you.When you use BotSharp, you can create agents that can understand the meaning of natural language and the nuances and trainslate that to structured meaning your software can understand.

## Agent
An agent helps you process user sentences (unstructure data) into structure data that you can use to return an appropriate response.
Features
-------------

When users say something, your agent matches the user utterance to an exactly matched intent or closely matched intent. Besides, the agent will return extra information about named entities which you need from the utterance. This can be name, location date or a host of other data categories (entities). You can define both the intent and the entities in your training data sets. You can also define what else to extact in your training phares as well.Then you can send a response to user to continue the conversation or to just end the conversation. It is very simple to create your own agent in BotSharp. The only thing you need is to assign you agent a name and a brief discription.


## Channels
When you already trained a chatbot on Botsharp, you may want it to play a really role in life. So we intergrate some popular channels in Botsharp including Twilio, facebook messenger, Telegram, WeChat and some other RPAs. These channels can make your robot "real" in life. For example, on facebook when a user visit your page and sends you a message, they can talk to your agent. You can also set a virtral assistant based on Twilio to chat with your clients for ordering, consulting, problem solving and many other business processes.
* Built-in multi-Agents management, easy to build Bot as a Service platform.
* Integrate with multiple LLMs like ChatGPT and LLaMA.
* Using plug-in design, it is easy to expand functions.
* Working with multiple Vector Stores for senmatic search.
* Supporting different UI providers like [Chatbot UI](https://github.com/mckaywrigley/chatbot-ui) and [HuggingChat UI](https://github.com/huggingface/chat-ui).
* Integrated with popular social platforms like Facebook Messenger, Slack and Telegram.
* Providing REST APIs to work with your own UI.

0 comments on commit 62f8800

Please sign in to comment.