dialogic-ai


Namedialogic-ai JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/endybits/dialogic-ai
SummaryA Python package designed to manage complex, threaded conversations with branching capabilities, much like version control systems manage code branches.
upload_time2024-09-02 04:13:25
maintainerNone
docs_urlNone
authorEndy Bermudez Rodriguez
requires_python>=3.8
licenseMIT
keywords conversational ai chat chatbot threaded conversations ai nlp branching dialogues dialogicai dialogic-ai
VCS
bugtrack_url
requirements pytest black setuptools wheell twine
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # πŸŽ‰ DialogicAI

**DialogicAI** is a Python package designed to manage complex, threaded conversations with branching capabilities, much like version control systems manage code branches. Whether you're building an AI chatbot, a customer support system, or any application that requires structured conversations, DialogicAI provides the tools to seamlessly manage multiple conversation threads, switch between branches, and keep track of message history.

## πŸš€ Installation

You can install DialogicAI directly from PyPI using pip:

```bash
pip install dialogic-ai
```

## πŸƒβ€β™‚οΈ Quick Start

Here’s a quick example to get you started with DialogicAI:

```python
from dialogicai.core import DialogicAI

# Initialize the DialogicAI instance
dialogicAI = DialogicAI()

# Add some messages
dialogicAI.add_message({"content": "Hello, how are you?", "role": "user"})
dialogicAI.add_message({"content": "I'm doing well, thank you! How can I assist you today?", "role": "assistant"})

# Branch the conversation
dialogicAI.add_message({
    "content": "Can you tell me a joke?", 
    "role": "user",
    "metadata": {"branches": ["joke"]}
})

# Convert the thread to a list of dictionaries
conversation = dialogicAI.thread_to_list()
print(conversation)
```


## πŸ› οΈ Main Methods

DialogicAI provides a set of powerful methods to help you manage conversation threads with ease. Here are some of the key methods:

### βž• `add_message(message)`
This method adds a new message to the current conversation thread.

- **Parameters**: 
  - **message** (dict): A dictionary containing the message's `content`, `role`, and optional `metadata` (such as branches).
  
- **Usage Example**:
  ```python
  dialogicAI.add_message({"content": "Hello, how are you?", "role": "user"})
  ```


### πŸ”„ `change_branch(branch)`
Switches the current conversation to a different branch, allowing you to manage multiple threads seamlessly.

- **Parameters**:
  - **branch** (str): The name of the branch you wish to switch to.
  
- **Usage Example**:
  ```python
  dialogicAI.change_branch("joke")
  ```


### πŸ“© `get_last_message()`
Retrieves the last message in the current branch, making it easy to continue a conversation or review the last interaction.

- **Returns**:
  - **NodeMessage**: The last message object in the current branch.
  
- **Usage Example**:
  ```python
  last_message = dialogicAI.get_last_message()
  print(last_message.content)
  ```

### πŸ“ `thread_to_list()`
Converts the entire conversation thread into a list of dictionaries, making it straightforward to serialize or inspect the conversation history.

- **Returns**:
  - **list**: A list of dictionaries, each representing a message in the thread.
  
- **Usage Example**:
  ```python
  conversation_list = dialogicAI.thread_to_list()
  print(conversation_list)
  ```

## 🀝 Contributions

We welcome contributions from the community! If you have ideas for new features, find bugs, or want to enhance the code, feel free to get involved. Here’s how you can contribute:

1. 🍴 **Fork the repository**: Create your own copy of the project.
2. 🌿 **Create a new branch**: Use `git checkout -b feature-branch` to start working on a new feature or bug fix.
3. πŸ’» **Commit your changes**: Once your changes are ready, commit them with a meaningful message (`git commit -am 'Add new feature'`).
4. πŸ“€ **Push to the branch**: Push your changes to your GitHub repository with `git push origin feature-branch`.
5. πŸ”„ **Open a Pull Request**: Submit your changes for review, and if approved, they’ll be merged into the project!

### πŸ“ Coding Standards
- We use **Black** for code formatting to ensure consistency across the codebase.
- All contributions should include relevant **pytest** tests to maintain code quality.

---

## πŸ“¬ Contact

I’m an AI Engineer with a passion for developing flawless products. Feel free to reach out if you have any questions, ideas, or just want to connect:

- **πŸ‘€ Name**: Endy Bermudez Rodriguez  
- **πŸ“§ Email**: [endyb.dev@gmail.com](mailto:endyb.dev@gmail.com)  
- **πŸ™ GitHub**: [Check out my projects @endybits](https://github.com/endybits)  
- **πŸ’Ό LinkedIn**: [Connect with me on LinkedIn](https://www.linkedin.com/in/endyb/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/endybits/dialogic-ai",
    "name": "dialogic-ai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "conversational AI, chat, chatbot, threaded conversations, AI, NLP, branching dialogues, dialogicai, dialogic-ai",
    "author": "Endy Bermudez Rodriguez",
    "author_email": "endyb.dev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/80/54/d8c23199d603a8d6acdc04c43ba235d6606df420f25e48e44b69aaedfb87/dialogic_ai-0.0.5.tar.gz",
    "platform": null,
    "description": "# \ud83c\udf89 DialogicAI\n\n**DialogicAI** is a Python package designed to manage complex, threaded conversations with branching capabilities, much like version control systems manage code branches. Whether you're building an AI chatbot, a customer support system, or any application that requires structured conversations, DialogicAI provides the tools to seamlessly manage multiple conversation threads, switch between branches, and keep track of message history.\n\n## \ud83d\ude80 Installation\n\nYou can install DialogicAI directly from PyPI using pip:\n\n```bash\npip install dialogic-ai\n```\n\n## \ud83c\udfc3\u200d\u2642\ufe0f Quick Start\n\nHere\u2019s a quick example to get you started with DialogicAI:\n\n```python\nfrom dialogicai.core import DialogicAI\n\n# Initialize the DialogicAI instance\ndialogicAI = DialogicAI()\n\n# Add some messages\ndialogicAI.add_message({\"content\": \"Hello, how are you?\", \"role\": \"user\"})\ndialogicAI.add_message({\"content\": \"I'm doing well, thank you! How can I assist you today?\", \"role\": \"assistant\"})\n\n# Branch the conversation\ndialogicAI.add_message({\n    \"content\": \"Can you tell me a joke?\", \n    \"role\": \"user\",\n    \"metadata\": {\"branches\": [\"joke\"]}\n})\n\n# Convert the thread to a list of dictionaries\nconversation = dialogicAI.thread_to_list()\nprint(conversation)\n```\n\n\n## \ud83d\udee0\ufe0f Main Methods\n\nDialogicAI provides a set of powerful methods to help you manage conversation threads with ease. Here are some of the key methods:\n\n### \u2795 `add_message(message)`\nThis method adds a new message to the current conversation thread.\n\n- **Parameters**: \n  - **message** (dict): A dictionary containing the message's `content`, `role`, and optional `metadata` (such as branches).\n  \n- **Usage Example**:\n  ```python\n  dialogicAI.add_message({\"content\": \"Hello, how are you?\", \"role\": \"user\"})\n  ```\n\n\n### \ud83d\udd04 `change_branch(branch)`\nSwitches the current conversation to a different branch, allowing you to manage multiple threads seamlessly.\n\n- **Parameters**:\n  - **branch** (str): The name of the branch you wish to switch to.\n  \n- **Usage Example**:\n  ```python\n  dialogicAI.change_branch(\"joke\")\n  ```\n\n\n### \ud83d\udce9 `get_last_message()`\nRetrieves the last message in the current branch, making it easy to continue a conversation or review the last interaction.\n\n- **Returns**:\n  - **NodeMessage**: The last message object in the current branch.\n  \n- **Usage Example**:\n  ```python\n  last_message = dialogicAI.get_last_message()\n  print(last_message.content)\n  ```\n\n### \ud83d\udcdd `thread_to_list()`\nConverts the entire conversation thread into a list of dictionaries, making it straightforward to serialize or inspect the conversation history.\n\n- **Returns**:\n  - **list**: A list of dictionaries, each representing a message in the thread.\n  \n- **Usage Example**:\n  ```python\n  conversation_list = dialogicAI.thread_to_list()\n  print(conversation_list)\n  ```\n\n## \ud83e\udd1d Contributions\n\nWe welcome contributions from the community! If you have ideas for new features, find bugs, or want to enhance the code, feel free to get involved. Here\u2019s how you can contribute:\n\n1. \ud83c\udf74 **Fork the repository**: Create your own copy of the project.\n2. \ud83c\udf3f **Create a new branch**: Use `git checkout -b feature-branch` to start working on a new feature or bug fix.\n3. \ud83d\udcbb **Commit your changes**: Once your changes are ready, commit them with a meaningful message (`git commit -am 'Add new feature'`).\n4. \ud83d\udce4 **Push to the branch**: Push your changes to your GitHub repository with `git push origin feature-branch`.\n5. \ud83d\udd04 **Open a Pull Request**: Submit your changes for review, and if approved, they\u2019ll be merged into the project!\n\n### \ud83d\udcd0 Coding Standards\n- We use **Black** for code formatting to ensure consistency across the codebase.\n- All contributions should include relevant **pytest** tests to maintain code quality.\n\n---\n\n## \ud83d\udcec Contact\n\nI\u2019m an AI Engineer with a passion for developing flawless products. Feel free to reach out if you have any questions, ideas, or just want to connect:\n\n- **\ud83d\udc64 Name**: Endy Bermudez Rodriguez  \n- **\ud83d\udce7 Email**: [endyb.dev@gmail.com](mailto:endyb.dev@gmail.com)  \n- **\ud83d\udc19 GitHub**: [Check out my projects @endybits](https://github.com/endybits)  \n- **\ud83d\udcbc LinkedIn**: [Connect with me on LinkedIn](https://www.linkedin.com/in/endyb/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package designed to manage complex, threaded conversations with branching capabilities, much like version control systems manage code branches.",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/endybits/dialogic-ai"
    },
    "split_keywords": [
        "conversational ai",
        " chat",
        " chatbot",
        " threaded conversations",
        " ai",
        " nlp",
        " branching dialogues",
        " dialogicai",
        " dialogic-ai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "697bebd32a0cd23f4d0840175fdc3eb787911abc3b928f91975c7a62c037aacc",
                "md5": "14516ae477a4044843a0fbd426ef8149",
                "sha256": "f3e515e8a6cc3af6338db934fe9955c2d565fa872809c56567887896b71a5825"
            },
            "downloads": -1,
            "filename": "dialogic_ai-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "14516ae477a4044843a0fbd426ef8149",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7675,
            "upload_time": "2024-09-02T04:13:24",
            "upload_time_iso_8601": "2024-09-02T04:13:24.147132Z",
            "url": "https://files.pythonhosted.org/packages/69/7b/ebd32a0cd23f4d0840175fdc3eb787911abc3b928f91975c7a62c037aacc/dialogic_ai-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8054d8c23199d603a8d6acdc04c43ba235d6606df420f25e48e44b69aaedfb87",
                "md5": "9f96586173ed15221c47115de1642509",
                "sha256": "756b95f94375c6cdc87fc4e9e7290831fc6785763cf37b8d7a0bf261ad29353b"
            },
            "downloads": -1,
            "filename": "dialogic_ai-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "9f96586173ed15221c47115de1642509",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6989,
            "upload_time": "2024-09-02T04:13:25",
            "upload_time_iso_8601": "2024-09-02T04:13:25.645752Z",
            "url": "https://files.pythonhosted.org/packages/80/54/d8c23199d603a8d6acdc04c43ba235d6606df420f25e48e44b69aaedfb87/dialogic_ai-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-02 04:13:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "endybits",
    "github_project": "dialogic-ai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "8.3.2"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    "==",
                    "24.8.0"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    "==",
                    "74.0.0"
                ]
            ]
        },
        {
            "name": "wheell",
            "specs": [
                [
                    "==",
                    "0.44.0"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": [
                [
                    "==",
                    "5.1.1"
                ]
            ]
        }
    ],
    "lcname": "dialogic-ai"
}
        
Elapsed time: 0.44323s