This commit is contained in:
Rodrigo Rodriguez 2024-08-29 22:35:27 -03:00
parent dcd68933f0
commit cc88a898d9
7 changed files with 176 additions and 132 deletions

View file

@ -88,37 +88,39 @@ npm install -g node-gyp
Visual Studio Code
```
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt update
sudo apt install code
apt update
apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | apt-key add -
add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
apt update
apt install code
```
Node JS 20
```
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -fsSL https://deb.nodesource.com/setup_20.x | -E bash -
apt-get install -y nodejs
node -v
sudo apt install npm
apt install npm
npm -v
```
Opening 443 Port in Linux
```
sudo setcap 'cap_net_bind_service=+ep' $(readlink -f $(which node))
setcap 'cap_net_bind_service=+ep' $(readlink -f $(which node))
```
Additional Infrastructure
```
sudo apt-get install libxtst-dev
apt-get install cpulimit
sudo apt-get install expect
apt-get install libxtst-dev
apt-get install libpng-dev
sudo apt-get install python g++ build-essential
apt-get install python g++ build-essential
npm install -g node-gyp
```
@ -195,9 +197,9 @@ Linux
```
# MS Remote Desktop Connection (RDP Client)
sudo apt-add-repository ppa:remmina-ppa-team/remmina-next
sudo apt update
sudo apt install remmina remmina-plugin-rdp remmina-plugin-secret
apt-add-repository ppa:remmina-ppa-team/remmina-next
apt update
apt install remmina remmina-plugin-rdp remmina-plugin-secret
```
@ -216,17 +218,17 @@ sudo apt install remmina remmina-plugin-rdp remmina-plugin-secret
```
# Removing Node.js on Linux
```
sudo rm -rf /usr/local/bin/npm
sudo rm -rf /usr/local/share/man/man1/node*
sudo rm -rf /usr/local/lib/dtrace/node.d
sudo rm -rf ~/.npm
sudo rm -rf ~/.node-gyp
sudo rm -rf /opt/local/bin/node
sudo rm -rf opt/local/include/node
sudo rm -rf /opt/local/lib/node_modules
sudo rm -rf /usr/local/lib/node*
sudo rm -rf /usr/local/include/node*
sudo rm -rf /usr/local/bin/node*
rm -rf /usr/local/bin/npm
rm -rf /usr/local/share/man/man1/node*
rm -rf /usr/local/lib/dtrace/node.d
rm -rf ~/.npm
rm -rf ~/.node-gyp
rm -rf /opt/local/bin/node
rm -rf opt/local/include/node
rm -rf /opt/local/lib/node_modules
rm -rf /usr/local/lib/node*
rm -rf /usr/local/include/node*
rm -rf /usr/local/bin/node*
```

View file

@ -10,8 +10,6 @@ sidebar_position: 90
| ------------------------ | -------------------------------------------------- |
| Collection of Public API | https://github.com/public-apis/public-apis |
| Wheather | https://github.com/Yeqzids/7timer-issues/wiki/Wiki |
| Free Public APIs | https://www.freepublicapis.com/tags/public-data |
# Service News

View file

@ -1,52 +0,0 @@
---
sidebar_position: 0
---
# General Bots Documentation
Welcome to the General Bots documentation. This is a reference material that can be used
to understand how the bot server is organized in a form of packages itself and
this arrangement can be used to all custom deployed packages like .gbkb, .gbtheme
or .gbapp.
This book is organized in ten chapters that can be accessed throuhg this table bellow:
* [Chapter 01 - Run and Talk](chapter-01-run-and-talk.md)
* [Chapter 02 - About Packages](chapter-02-the-package-based.md)
* [Chapter 03 - gbkb Reference](chapter-03-gbkb-reference.md)
* [Chapter 04 - gbtheme Reference](chapter-04-gbtheme-reference.md)
* [Chapter 05 - gbdialog Reference](chapter-05-gbdialog-reference.md)
* [Chapter 06 - gbapp Reference](chapter-06-gbapp-reference.md)
* [Chapter 07 - gbot Reference](chapter-07-gbot-reference.md)
* [Chapter 08 - Tooling](chapter-08-tooling.md)
* [Chapter 09 - Services](chapter-09-services.md)
* [Chapter 10 - Contributing](chapter-10-contributing.md)
* [Apendix I - Database Model](apendix-i-database-model.md)
* [Glossary](glossary.md)
## Getting Started
Get started by **creating a new bot**.
Or **[Create Bot](https://gb.pragmatismo.cloud/PROD-GeneralBots006)** with General Bots Online.
### What you'll need
- [Node.js](https://nodejs.org/en/download/) version 20:
- [Git](https://nodejs.org/en/download/) version 20:
```
git clone https://github.com/GeneralBots/BotServer
npm run start
```
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
The command also installs all necessary dependencies you need to run Docusaurus.
## Navigate to your bot
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:4242/.
Type `/publish` to publish bot packages and start talking to the bot.

View file

@ -108,7 +108,7 @@ const config: Config = {
items: [
{
label: "Documentation",
to: "/docs/intro",
to: "/index",
},
],
},

146
site/src/pages/index.md Normal file
View file

@ -0,0 +1,146 @@
---
sidebar_position: 0
---
# General Bots Documentation
![General Bots Logo](https://user-images.githubusercontent.com/65977273/94922431-949c3900-0490-11eb-800a-6b478d689f2a.png)
## Introduction
Welcome to the comprehensive General Bots documentation. This guide serves as an essential reference for developers looking to harness the power and flexibility of the General Bots server. Our platform is designed with modularity in mind, allowing for easy customization and extension through various package types.
In this documentation, we'll explore the architecture of the General Bots server, diving deep into its package-based structure. You'll learn how to leverage this modular approach for custom deployments, whether you're working with knowledge bases (.gbkb), themes (.gbtheme), or full-fledged applications (.gbapp).
## Table of Contents
* [Chapter 01 - Run and Talk](docs/chapter-01-run-and-talk)
* [Chapter 02 - About Packages](docs/chapter-02-the-package-based)
* [Chapter 03 - gbkb Reference](docs/chapter-03-gbkb-reference)
* [Chapter 04 - gbtheme Reference](docs/chapter-04-gbtheme-reference)
* [Chapter 05 - gbdialog Reference](docs/chapter-05-gbdialog-reference)
* [Chapter 06 - gbapp Reference](docs/chapter-06-gbapp-reference)
* [Chapter 07 - gbot Reference](docs/chapter-07-gbot-reference)
* [Chapter 08 - Tooling](docs/chapter-08-tooling)
* [Chapter 09 - Services](docs/chapter-09-services)
* [Chapter 10 - Contributing](docs/chapter-10-contributing)
* [Apendix I - Database Model](docs/apendix-i-database-model)
* [Glossary](docs/glossary)
## Getting Started
### Prerequisites
Before you embark on your General Bots journey, ensure you have the following tools installed:
- **Node.js (version 20 or later)**: General Bots leverages the latest features of Node.js to provide a robust and efficient runtime environment. Download it from [nodejs.org](https://nodejs.org/en/download/).
- **Git (latest stable version)**: Essential for version control and collaborating on bot projects. Get it from [git-scm.com](https://git-scm.com/downloads).
### Quick Start Guide
Follow these steps to get your General Bots server up and running:
1. Clone the repository:
```bash
git clone https://github.com/GeneralBots/BotServer
```
This command creates a local copy of the General Bots server repository on your machine.
2. Navigate to the project directory:
```bash
cd BotServer
```
This changes your current directory to the newly cloned BotServer folder.
3. Install dependencies and start the server:
```bash
npm install
npm run start
```
The `npm install` command installs all necessary dependencies for the project. `npm run start` builds your bot server locally and serves it through a development server.
### Accessing Your Bot
Once the server is running, you can access your bot at `http://localhost:4242/`. This local server allows you to interact with your bot and test its functionality in real-time.
To publish bot packages and initiate a conversation with the bot, use the command:
```
/publish
```
This command prepares your bot packages for use and allows you to start interacting with your bot immediately.
## Development Workflow
### 1. Project Structure
The General Bots server follows a modular architecture designed for flexibility and scalability. Here's an overview of the main directories:
```
BotServer/
├── packages/
│ ├── core.gbapp/ # Core bot functionality
│ ├── kb.gbapp/ # Knowledge base packages
├── src / # Main entry point
└── package.json # Project configuration
```
This structure allows for easy navigation and management of different aspects of your bot project.
### 2. Creating Custom Packages
One of the strengths of General Bots is its extensibility. You can create custom packages to enhance your bot's capabilities:
- **.gbkb (Knowledge Base packages)**: Store and manage your bot's knowledge and responses.
- **.gbtheme (Theme packages)**: Customize the visual appearance of your bot interface.
- **.gbapp (Application packages)**: Add new features and functionalities to your bot.
Each package type has its own structure and purpose, which we'll explore in depth in their respective chapters.
### 3. API Reference
For detailed information on working with each package type, refer to the following chapters:
- Chapter 3: gbkb Reference - Learn how to create and manage knowledge bases
- Chapter 4: gbtheme Reference - Discover the theming capabilities of General Bots
- Chapter 5: gbdialog Reference - Master the art of creating dynamic conversations
- Chapter 6: gbapp Reference - Explore the full potential of bot applications
- Chapter 7: gbot Reference - Understand the core functionalities of your bot
These chapters provide comprehensive API documentation, usage examples, and best practices for each package type.
### 4. Testing
We strongly encourage writing unit tests for your custom packages to ensure reliability and ease of maintenance. To run tests, use the following command:
```bash
npm run test
```
This command executes the test suites located in the `tests/` directory, allowing you to verify the functionality of your bot components.
### 5. Deployment
When you're ready to deploy your bot to a production environment, the `npm run build` command creates an optimized production build of your bot server.
## Advanced Topics
As you become more familiar with General Bots, you may want to explore these advanced topics:
- **Scalability**: Chapter 9 - Services delves into horizontal scaling options, allowing your bot to handle increased load and user interactions efficiently.
- **Performance Tuning**: Chapter 8 - Tooling offers insights and techniques for optimizing your bot's performance, ensuring smooth operation even under demanding conditions.
- **Security Best Practices**: Chapter 10 - Contributing outlines important security guidelines to keep your bot and its data protected.
These advanced topics will help you take your General Bots implementation to the next level, creating robust, scalable, and secure bot solutions.
## Community and Support
Join our vibrant community of bot developers:
- **GitHub Issues**: For bug reports and feature requests, visit our [issue tracker](https://github.com/GeneralBots/BotServer/issues). Here, you can report problems, suggest improvements, or even contribute code fixes.
## Contributing
We welcome contributions from developers of all skill levels! Whether you're fixing a bug, adding a feature, or improving documentation, your input is valuable. Please read our [Contributing Guide](docs/chapter-10-contributing) for details on our code of conduct and the process for submitting pull requests.
Remember, the General Bots platform is designed to be flexible and extensible. We encourage you to explore its capabilities, experiment with new ideas, and contribute to making it even better. Your creativity and expertise can help shape the future of conversational AI!

View file

@ -1,43 +0,0 @@
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import Heading from '@theme/Heading';
import styles from './index.module.css';
function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min
</Link>
</div>
</div>
</header>
);
}
export default function Home(): JSX.Element {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
</Layout>
);
}

View file

@ -1,7 +0,0 @@
---
title: Markdown page example
---
# Markdown page example
You don't need React to write simple standalone pages.