{"id":17487522,"url":"https://github.com/holoviz-topics/panel-chat-examples","last_synced_at":"2025-04-04T06:08:57.741Z","repository":{"id":189868663,"uuid":"681399728","full_name":"holoviz-topics/panel-chat-examples","owner":"holoviz-topics","description":"Examples of Chat Bots using Panels chat features: Traditional, LLMs, AI Agents, LangChain, OpenAI etc","archived":false,"fork":false,"pushed_at":"2024-10-04T23:44:25.000Z","size":89268,"stargazers_count":107,"open_issues_count":33,"forks_count":34,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-29T10:00:34.768Z","etag":null,"topics":["chat","gpt","llama","mistral","openai","panel","python"],"latest_commit_sha":null,"homepage":"https://holoviz-topics.github.io/panel-chat-examples/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/holoviz-topics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-21T23:59:40.000Z","updated_at":"2024-10-23T18:23:17.000Z","dependencies_parsed_at":"2023-10-15T17:00:48.492Z","dependency_job_id":"e0ccf238-8a6a-4cd3-a94c-26db3856d07b","html_url":"https://github.com/holoviz-topics/panel-chat-examples","commit_stats":{"total_commits":265,"total_committers":7,"mean_commits":"37.857142857142854","dds":0.5471698113207547,"last_synced_commit":"0c6ed63734bd3ed70022fc39dc27d44bc4449fee"},"previous_names":["ahuang11/panel-chat-examples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holoviz-topics%2Fpanel-chat-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holoviz-topics%2Fpanel-chat-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holoviz-topics%2Fpanel-chat-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holoviz-topics%2Fpanel-chat-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holoviz-topics","download_url":"https://codeload.github.com/holoviz-topics/panel-chat-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128751,"owners_count":20888235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","gpt","llama","mistral","openai","panel","python"],"created_at":"2024-10-19T03:04:55.098Z","updated_at":"2025-04-04T06:08:57.721Z","avatar_url":"https://github.com/holoviz-topics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Panel Chat Examples\n\n[![build](https://github.com/holoviz-topics/panel-chat-examples/workflows/Build/badge.svg)](https://github.com/holoviz-topics/panel-chat-examples/actions)\n\nExamples using [Panel](https://panel.holoviz.org/) and its [Chat Components](https://panel.holoviz.org/reference/index.html#chat); Panels chat components are *multi modal* and supports [LangChain](https://python.langchain.com/docs/get_started/introduction), [OpenAI](https://openai.com/blog/chatgpt), [Mistral](https://www.google.com/url?sa=t\u0026rct=j\u0026q=\u0026esrc=s\u0026source=web\u0026cd=\u0026ved=2ahUKEwjZtP35yvSBAxU00wIHHerUDZAQFnoECBEQAQ\u0026url=https%3A%2F%2Fdocs.mistral.ai%2F\u0026usg=AOvVaw2qpx09O_zOzSksgjBKiJY_\u0026opi=89978449), [Llama](https://ai.meta.com/llama/), etc.\n\n**Documentation**: \u003ca href=\"https://holoviz-topics.github.io/panel-chat-examples/\" target=\"_blank\"\u003eholoviz-topics.github.io/panel-chat-examples/\u003c/a\u003e\n\nhttps://github.com/holoviz-topics/panel-chat-examples/assets/42288570/cdb78a39-b98c-44e3-886e-29de6a079bde\n\nPanels Chat Components are available with `pip install \"panel\u003e=1.3.0\"`; most examples require `pip install \"panel\u003e=1.4.0\"`.\n\nMore unmaintained examples can be found in [GitHub issues](https://github.com/holoviz-topics/panel-chat-examples/issues) and [HoloViz Discourse](https://discourse.holoviz.org/)\n\n## Quick Start\n\nIt's super easy to get started with Panel chat components.\n\n1. Setup imports\n2. Define a function to dictate what to do with the input message\n3. Define a servable widget with `callback=response_callback`\n\n```python\n# 1.)\nimport panel as pn\npn.extension()\n\n# 2.)\ndef response_callback(input_message: str, input_user: str, instance: pn.chat.ChatInterface):\n    # choose your favorite LLM API to respond to the input_message\n    ...\n    response_message = f\"Echoing your input: {input_message}\"\n    return response_message\n\n# 3.)\npn.widgets.ChatInterface(callback=response_callback).servable()\n```\n\n## Exploration\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/holoviz-topics/panel-chat-examples?quickstart=1)\n\n## Installation\n\nTo install and serve all examples:\n\n```bash\ngit clone https://github.com/holoviz-topics/panel-chat-examples\ncd panel-chat-examples\npip install -e \".[all]\"  # or instead of `all`, just `openai`, `mistralai`, `langchain`, `llamaindex`, `llamacpp`\n# Optionally set the OPENAI_API_KEY environment variable\npanel serve docs/examples/**/*.py --static-dirs thumbnails=docs/assets/thumbnails --autoreload\n```\n\nThen open [http://localhost:5006](http://localhost:5006) in your browser.\n\n![Panel Index Page](https://raw.githubusercontent.com/holoviz-topics/panel-chat-examples/main/assets/images/panel-chat-examples-index-page.png)\n\n## Contributing\n\nWe would ❤️ to collaborate with you. Check out the [DEVELOPER GUIDE](https://github.com/holoviz-topics/panel-chat-examples/blob/main/DEVELOPER_GUIDE.md) for to get started.\n\n## License\n\nThis project is licensed under the terms of the [MIT license](https://github.com/holoviz-topics/panel-chat-examples/blob/main/LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholoviz-topics%2Fpanel-chat-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholoviz-topics%2Fpanel-chat-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholoviz-topics%2Fpanel-chat-examples/lists"}