chainlit


Namechainlit JSON
Version 1.1.202 PyPI version JSON
download
home_pagehttps://github.com/Chainlit/chainlit
SummaryBuild Conversational AI.
upload_time2024-05-22 12:08:56
maintainerNone
docs_urlNone
authorChainlit
requires_python<4.0.0,>=3.8.1
licenseApache-2.0 license
keywords llm agents gen ai chat ui chatbot ui openai copilot langchain conversational ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Welcome to Chainlit by Literal AI πŸ‘‹

[![](https://dcbadge.vercel.app/api/server/ZThrUxbAYw?style=flat)](https://discord.gg/k73SQ3FyUh)
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/chainlit_io.svg?style=social&label=Follow%20%40chainlit_io)](https://twitter.com/chainlit_io)
[![CI](https://github.com/Chainlit/chainlit/actions/workflows/ci.yaml/badge.svg)](https://github.com/Chainlit/chainlit/actions/workflows/ci.yaml)

**Build production-ready Conversational AI applications in minutes, not weeks ⚑️**

> [!NOTE]  
> You can ask Chainlit related questions to [Chainlit Help](https://help.chainlit.io/)! Also available on the Discord `@Chainlit Help`. Proudly built with Chainlit!

Chainlit is an open-source async Python framework which allows developers to build scalable Conversational AI or agentic applications.

- βœ… ChatGPT-like application
- βœ… Embedded Chatbot & Software Copilot
- βœ… Slack & Discord
- βœ… Custom frontend (build your own agentic experience)
- βœ… API Endpoint

Full documentation is available [here](https://docs.chainlit.io).

Contact us [here](https://forms.gle/BX3UNBLmTF75KgZVA) for **Enterprise Support** and to get early access to Literal AI, our product to evaluate and monitor LLM applications.

https://github.com/Chainlit/chainlit/assets/13104895/8882af90-fdfa-4b24-8200-1ee96c6c7490

## Installation

Open a terminal and run:

```bash
$ pip install chainlit
$ chainlit hello
```

If this opens the `hello app` in your browser, you're all set!

## πŸš€ Quickstart

### 🐍 Pure Python

Create a new file `demo.py` with the following code:

```python
import chainlit as cl


@cl.step
def tool():
    return "Response from the tool!"


@cl.on_message  # this function will be called every time a user inputs a message in the UI
async def main(message: cl.Message):
    """
    This function is called every time a user inputs a message in the UI.
    It sends back an intermediate response from the tool, followed by the final answer.

    Args:
        message: The user's message.

    Returns:
        None.
    """

    # Call the tool
    tool()

    # Send the final answer.
    await cl.Message(content="This is the final answer").send()
```

Now run it!

```
$ chainlit run demo.py -w
```

<img src="/images/quick-start.png" alt="Quick Start"></img>

## πŸŽ‰ Key Features and Integrations

Full documentation is available [here](https://docs.chainlit.io). Key features:

- [πŸ’¬ Multi Modal chats](https://docs.chainlit.io/advanced-features/multi-modal)
- [πŸ’­ Chain of Thought visualisation](https://docs.chainlit.io/concepts/step)
- [πŸ’Ύ Data persistence + human feedback](https://docs.chainlit.io/data-persistence/overview)
- [πŸ› In context Prompt Playground](https://docs.chainlit.io/advanced-features/prompt-playground/overview)
- [πŸ‘€ Authentication](https://docs.chainlit.io/authentication/overview)

Chainlit is compatible with all Python programs and libraries. That being said, it comes with integrations for:

- [LangChain](https://docs.chainlit.io/integrations/langchain)
- [Llama Index](https://docs.chainlit.io/integrations/llama-index)
- [Autogen](https://github.com/Chainlit/cookbook/tree/main/pyautogen)
- [OpenAI Assistant](https://github.com/Chainlit/cookbook/tree/main/openai-assistant)
- [Haystack](https://docs.chainlit.io/integrations/haystack)

## πŸ“š More Examples - Cookbook

You can find various examples of Chainlit apps [here](https://github.com/Chainlit/cookbook) that leverage tools and services such as OpenAI, Anthropiс, LangChain, LlamaIndex, ChromaDB, Pinecone and more.

Tell us what you would like to see added in Chainlit using the Github issues or on [Discord](https://discord.gg/k73SQ3FyUh).

## πŸ’ Contributing

As an open-source initiative in a rapidly evolving domain, we welcome contributions, be it through the addition of new features or the improvement of documentation.

For detailed information on how to contribute, see [here](.github/CONTRIBUTING.md).

## πŸ“ƒ License

Chainlit is open-source and licensed under the [Apache 2.0](LICENSE) license.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Chainlit/chainlit",
    "name": "chainlit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": "LLM, Agents, gen ai, chat ui, chatbot ui, openai, copilot, langchain, conversational ai",
    "author": "Chainlit",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/9f/6d/a2e6209dafd7166a282395eb4ac93d936265602ab5cf7a5c180366f4a42c/chainlit-1.1.202.tar.gz",
    "platform": null,
    "description": "# Welcome to Chainlit by Literal AI \ud83d\udc4b\n\n[![](https://dcbadge.vercel.app/api/server/ZThrUxbAYw?style=flat)](https://discord.gg/k73SQ3FyUh)\n[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/chainlit_io.svg?style=social&label=Follow%20%40chainlit_io)](https://twitter.com/chainlit_io)\n[![CI](https://github.com/Chainlit/chainlit/actions/workflows/ci.yaml/badge.svg)](https://github.com/Chainlit/chainlit/actions/workflows/ci.yaml)\n\n**Build production-ready Conversational AI applications in minutes, not weeks \u26a1\ufe0f**\n\n> [!NOTE]  \n> You can ask Chainlit related questions to [Chainlit Help](https://help.chainlit.io/)! Also available on the Discord `@Chainlit Help`. Proudly built with Chainlit!\n\nChainlit is an open-source async Python framework which allows developers to build scalable Conversational AI or agentic applications.\n\n- \u2705 ChatGPT-like application\n- \u2705 Embedded Chatbot & Software Copilot\n- \u2705 Slack & Discord\n- \u2705 Custom frontend (build your own agentic experience)\n- \u2705 API Endpoint\n\nFull documentation is available [here](https://docs.chainlit.io).\n\nContact us [here](https://forms.gle/BX3UNBLmTF75KgZVA) for **Enterprise Support** and to get early access to Literal AI, our product to evaluate and monitor LLM applications.\n\nhttps://github.com/Chainlit/chainlit/assets/13104895/8882af90-fdfa-4b24-8200-1ee96c6c7490\n\n## Installation\n\nOpen a terminal and run:\n\n```bash\n$ pip install chainlit\n$ chainlit hello\n```\n\nIf this opens the `hello app` in your browser, you're all set!\n\n## \ud83d\ude80 Quickstart\n\n### \ud83d\udc0d Pure Python\n\nCreate a new file `demo.py` with the following code:\n\n```python\nimport chainlit as cl\n\n\n@cl.step\ndef tool():\n    return \"Response from the tool!\"\n\n\n@cl.on_message  # this function will be called every time a user inputs a message in the UI\nasync def main(message: cl.Message):\n    \"\"\"\n    This function is called every time a user inputs a message in the UI.\n    It sends back an intermediate response from the tool, followed by the final answer.\n\n    Args:\n        message: The user's message.\n\n    Returns:\n        None.\n    \"\"\"\n\n    # Call the tool\n    tool()\n\n    # Send the final answer.\n    await cl.Message(content=\"This is the final answer\").send()\n```\n\nNow run it!\n\n```\n$ chainlit run demo.py -w\n```\n\n<img src=\"/images/quick-start.png\" alt=\"Quick Start\"></img>\n\n## \ud83c\udf89 Key Features and Integrations\n\nFull documentation is available [here](https://docs.chainlit.io). Key features:\n\n- [\ud83d\udcac Multi Modal chats](https://docs.chainlit.io/advanced-features/multi-modal)\n- [\ud83d\udcad Chain of Thought visualisation](https://docs.chainlit.io/concepts/step)\n- [\ud83d\udcbe Data persistence + human feedback](https://docs.chainlit.io/data-persistence/overview)\n- [\ud83d\udedd In context Prompt Playground](https://docs.chainlit.io/advanced-features/prompt-playground/overview)\n- [\ud83d\udc64 Authentication](https://docs.chainlit.io/authentication/overview)\n\nChainlit is compatible with all Python programs and libraries. That being said, it comes with integrations for:\n\n- [LangChain](https://docs.chainlit.io/integrations/langchain)\n- [Llama Index](https://docs.chainlit.io/integrations/llama-index)\n- [Autogen](https://github.com/Chainlit/cookbook/tree/main/pyautogen)\n- [OpenAI Assistant](https://github.com/Chainlit/cookbook/tree/main/openai-assistant)\n- [Haystack](https://docs.chainlit.io/integrations/haystack)\n\n## \ud83d\udcda More Examples - Cookbook\n\nYou can find various examples of Chainlit apps [here](https://github.com/Chainlit/cookbook) that leverage tools and services such as OpenAI, Anthropi\u0441, LangChain, LlamaIndex, ChromaDB, Pinecone and more.\n\nTell us what you would like to see added in Chainlit using the Github issues or on [Discord](https://discord.gg/k73SQ3FyUh).\n\n## \ud83d\udc81 Contributing\n\nAs an open-source initiative in a rapidly evolving domain, we welcome contributions, be it through the addition of new features or the improvement of documentation.\n\nFor detailed information on how to contribute, see [here](.github/CONTRIBUTING.md).\n\n## \ud83d\udcc3 License\n\nChainlit is open-source and licensed under the [Apache 2.0](LICENSE) license.\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0 license",
    "summary": "Build Conversational AI.",
    "version": "1.1.202",
    "project_urls": {
        "Homepage": "https://github.com/Chainlit/chainlit",
        "Repository": "https://github.com/Chainlit/chainlit"
    },
    "split_keywords": [
        "llm",
        " agents",
        " gen ai",
        " chat ui",
        " chatbot ui",
        " openai",
        " copilot",
        " langchain",
        " conversational ai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63e75b57c06fdc54f045e0970bf2402afc5905dc180dd52a80102edb5df292e2",
                "md5": "eddb827c7d965c581ba1417dbbd320a4",
                "sha256": "1c8972853e980b43b0272598c080414c3d437a99d74d59ece4e169eac3fe50ba"
            },
            "downloads": -1,
            "filename": "chainlit-1.1.202-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eddb827c7d965c581ba1417dbbd320a4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 4467653,
            "upload_time": "2024-05-22T12:08:54",
            "upload_time_iso_8601": "2024-05-22T12:08:54.035136Z",
            "url": "https://files.pythonhosted.org/packages/63/e7/5b57c06fdc54f045e0970bf2402afc5905dc180dd52a80102edb5df292e2/chainlit-1.1.202-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f6da2e6209dafd7166a282395eb4ac93d936265602ab5cf7a5c180366f4a42c",
                "md5": "ad0429625981ef4587a62565cecf33e8",
                "sha256": "d8c98d59d0c1335a989950c0df0c6893a7da7378f0d2514095890d17870bc95a"
            },
            "downloads": -1,
            "filename": "chainlit-1.1.202.tar.gz",
            "has_sig": false,
            "md5_digest": "ad0429625981ef4587a62565cecf33e8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 4422109,
            "upload_time": "2024-05-22T12:08:56",
            "upload_time_iso_8601": "2024-05-22T12:08:56.678014Z",
            "url": "https://files.pythonhosted.org/packages/9f/6d/a2e6209dafd7166a282395eb4ac93d936265602ab5cf7a5c180366f4a42c/chainlit-1.1.202.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-22 12:08:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Chainlit",
    "github_project": "chainlit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "chainlit"
}
        
Elapsed time: 0.32422s