docs-chat-bot


Namedocs-chat-bot JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/learnforpractice/docs-chat-bot
Summarydocs chat bot by leveraging CHATGPT
upload_time2023-04-10 03:20:38
maintainer
docs_urlNone
authorlearnforpractice
requires_python>=3.6
licenseMIT
keywords mkdocs plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            chat plugin for mkdocs

## Instalation
```bash
python3 -m pip install docs-chat-bot
```

## Usage

Add chat plugin to your mkdocs.yml file.

example:

```yaml
plugins:
    - chat
        docs_chat_endpoint: "http://localhost:7999/chat"
```

Before using the chatbot, there are three essential tasks to complete:

1. Indexing the documents
2. Running a document chatbot server

This guide will walk you through each step to ensure a seamless experience with the chatbot.

## Indexing the documents

To enable the chatbot to access and retrieve information from your documents, they must be indexed first. Indexing the documents will create a searchable data structure that allows the chatbot to quickly locate relevant information when responding to user queries.

The `indexing_docs` command is used to index a collection of documents using the OpenAI Embedding Interface. 

usage:

```bash
indexing_docs --dir [markdown document dir] --api-key [openai api key]
```

This command indexes the documents in the specified directory using the OpenAI Embedding Interface, with the following options:

1. `--dir`: Specifies the directory containing the markdown documents to be indexed.
2. `--api-key`: Sets the API key used to authenticate with the OpenAI API.

**Attention** 

Please be aware that this tool does not provide automatic document segmentation functionality. To ensure optimal usage with the ChatGPT API, it is crucial to follow the guidelines for document segmentation provided below.

Document Segmentation Guidelines
--------------------------------

1. Manual segmentation: If a Markdown file is too large, you must manually split it into smaller segments. Ensure that each segment has a gap of 100 spaces.

2. Segment length: Each document segment should not exceed 2,000 words. Exceeding this limit may result in segments that are too large to fit within the constraints of the ChatGPT API.

How to Segment Documents
------------------------

1. Open the large Markdown file in a text editor of your choice.

2. Identify a suitable point in the document to split it into smaller segments. This could be a natural break, such as a section or chapter boundary.

3. Separate the segments with 100 spaces, ensuring that each segment does not exceed the 3,000-word limit.


## Running a document chatbot server

Once your documents are indexed, you will need to set up and run a document chatbot server. The server is responsible for processing user input, searching the indexed documents, and returning appropriate responses based on the information found within the documents.

`docs_chat_bot_server --indexed-docs [indexed document] --api-key [openai API key]`

This command launches the chatbot server with the following options:

1. `--indexed-docs`: Specifies the file containing indexed documents to be used by the chatbot server for retrieving information.
2. `--api-key`: Sets the API key used to authenticate with external openai chatgpt services.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/learnforpractice/docs-chat-bot",
    "name": "docs-chat-bot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "mkdocs plugin",
    "author": "learnforpractice",
    "author_email": "learnforpractice@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/40/88/154e6b01ebebfcd28d73bd55c75c805158bdcc214261305ec0cce9452e79/docs-chat-bot-0.0.1.tar.gz",
    "platform": null,
    "description": "chat plugin for mkdocs\n\n## Instalation\n```bash\npython3 -m pip install docs-chat-bot\n```\n\n## Usage\n\nAdd chat plugin to your mkdocs.yml file.\n\nexample:\n\n```yaml\nplugins:\n    - chat\n        docs_chat_endpoint: \"http://localhost:7999/chat\"\n```\n\nBefore using the chatbot, there are three essential tasks to complete:\n\n1. Indexing the documents\n2. Running a document chatbot server\n\nThis guide will walk you through each step to ensure a seamless experience with the chatbot.\n\n## Indexing the documents\n\nTo enable the chatbot to access and retrieve information from your documents, they must be indexed first. Indexing the documents will create a searchable data structure that allows the chatbot to quickly locate relevant information when responding to user queries.\n\nThe `indexing_docs` command is used to index a collection of documents using the OpenAI Embedding Interface. \n\nusage:\n\n```bash\nindexing_docs --dir [markdown document dir] --api-key [openai api key]\n```\n\nThis command indexes the documents in the specified directory using the OpenAI Embedding Interface, with the following options:\n\n1. `--dir`: Specifies the directory containing the markdown documents to be indexed.\n2. `--api-key`: Sets the API key used to authenticate with the OpenAI API.\n\n**Attention** \n\nPlease be aware that this tool does not provide automatic document segmentation functionality. To ensure optimal usage with the ChatGPT API, it is crucial to follow the guidelines for document segmentation provided below.\n\nDocument Segmentation Guidelines\n--------------------------------\n\n1. Manual segmentation: If a Markdown file is too large, you must manually split it into smaller segments. Ensure that each segment has a gap of 100 spaces.\n\n2. Segment length: Each document segment should not exceed 2,000 words. Exceeding this limit may result in segments that are too large to fit within the constraints of the ChatGPT API.\n\nHow to Segment Documents\n------------------------\n\n1. Open the large Markdown file in a text editor of your choice.\n\n2. Identify a suitable point in the document to split it into smaller segments. This could be a natural break, such as a section or chapter boundary.\n\n3. Separate the segments with 100 spaces, ensuring that each segment does not exceed the 3,000-word limit.\n\n\n## Running a document chatbot server\n\nOnce your documents are indexed, you will need to set up and run a document chatbot server. The server is responsible for processing user input, searching the indexed documents, and returning appropriate responses based on the information found within the documents.\n\n`docs_chat_bot_server --indexed-docs [indexed document] --api-key [openai API key]`\n\nThis command launches the chatbot server with the following options:\n\n1. `--indexed-docs`: Specifies the file containing indexed documents to be used by the chatbot server for retrieving information.\n2. `--api-key`: Sets the API key used to authenticate with external openai chatgpt services.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "docs chat bot by leveraging CHATGPT",
    "version": "0.0.1",
    "split_keywords": [
        "mkdocs",
        "plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f4a10e682797584e0462fe791bc0316ae64d5f6e378523ff43e9ad6279ba271",
                "md5": "42093fa4b1d265d3cdc26747be52cc30",
                "sha256": "42c98251846010b75442101c0cff4b59458ca9eddca974cef0a4e05f6daf39a9"
            },
            "downloads": -1,
            "filename": "docs_chat_bot-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "42093fa4b1d265d3cdc26747be52cc30",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 16856,
            "upload_time": "2023-04-10T03:20:36",
            "upload_time_iso_8601": "2023-04-10T03:20:36.797571Z",
            "url": "https://files.pythonhosted.org/packages/1f/4a/10e682797584e0462fe791bc0316ae64d5f6e378523ff43e9ad6279ba271/docs_chat_bot-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4088154e6b01ebebfcd28d73bd55c75c805158bdcc214261305ec0cce9452e79",
                "md5": "ef603253443a3dd92ee91ba53fce1655",
                "sha256": "d8bdf3339f623c393fc174f4f50a6c568ce05ad284bf2c77eb315ca1acaa4a79"
            },
            "downloads": -1,
            "filename": "docs-chat-bot-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ef603253443a3dd92ee91ba53fce1655",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 9546,
            "upload_time": "2023-04-10T03:20:38",
            "upload_time_iso_8601": "2023-04-10T03:20:38.799625Z",
            "url": "https://files.pythonhosted.org/packages/40/88/154e6b01ebebfcd28d73bd55c75c805158bdcc214261305ec0cce9452e79/docs-chat-bot-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-10 03:20:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "learnforpractice",
    "github_project": "docs-chat-bot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "docs-chat-bot"
}
        
Elapsed time: 0.06007s