https://github.com/opencopilotdev/opencopilot Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Customer Stories + White papers, Ebooks, Webinars + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. {{ message }} opencopilotdev / opencopilot Public * Notifications * Fork 5 * Star 177 [?] Build and embed open-source AI Copilots into your product with ease opencopilot.dev License MIT license 177 stars 5 forks Activity Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Security * Insights More * Code * Issues * Pull requests * Actions * Security * Insights opencopilotdev/opencopilot This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 4 branches 2 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/o] Use Git or checkout with SVN using the web URL. [gh repo clone openco] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @JohannesTK JohannesTK Fix RPM example (#46) ... d7aa827 Aug 22, 2023 Fix RPM example (#46) d7aa827 Git stats * 122 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Adds codespell. August 22, 2023 14:55 examples Fixes RPM reqs. August 22, 2023 18:16 opencopilot Merge pull request #42 from opencopilotdev/improves-logging August 22, 2023 15:09 tests Adds prompt_file as mandatory (#31) August 22, 2023 11:37 .gitignore Removes frontend from .gitignore August 21, 2023 15:59 .pylintrc Adds pylint August 21, 2023 16:25 LICENCE.txt Fix typo August 16, 2023 11:33 README.md Fix RPM example (#46) August 22, 2023 19:33 example.py Fixes CI job. August 22, 2023 14:38 my_prompt.txt Fixes CI job. August 22, 2023 14:38 requirements.txt Bump gitpython from 3.1.31 to 3.1.32 August 22, 2023 11:44 setup.cfg Initial commit August 15, 2023 13:24 setup.py Adds v0.3.1 release August 22, 2023 15:11 template.env Merge branch 'main' into framework August 21, 2023 14:59 View code [ ] Overview Quickstart 1. Install the Python package 2. Create a minimal Copilot 3. Run the Copilot Customizing, improving, testing and deploying your Copilot Optional: front-end Getting help README.md OpenCopilot [?] OpenCopilot: Build and embed open-source AI Copilots into your product with ease Unit tests E2E tests Package version Package version Package version Documentation: docs.opencopilot.dev Overview Copilots are becoming the new paradigm how to build successful LLM-based applications, as seen by Github , Shopify, Brex, Hubspot, etc Copilots. Yet, building a Copilot that goes beyond a Twitter demo is extremely complex as it's time-consuming, unreliable and feels like a massive undertaking. Moreover, existing solutions such as Microsoft Copilot Stack are closed-source. Building an LLM-app today feels like: Author: Soham Chatterjee OpenCopilot solves this problem so building your own Copilot becomes intuitive, fast and reliable - all so you can build your copilot in a single day. For example, you can build Copilots such as: [?] Developer tooling Copilot * Example: Stripe Copilot * End-to-end example: Ready Player Me Copilot SaaS Copilot * Example: HubSpot ChatSpot E-commerce Copilot * Example: Shopify Copilot See more use cases in docs. Quickstart As prerequisites, you need to have Python 3.8+ and pip installed. 1. Install the Python package pip install opencopilot-ai 2. Create a minimal Copilot Into a Python file (for example, copilot.py), add: from opencopilot import OpenCopilot copilot = OpenCopilot( openai_api_key="your-openai-api-key", llm_model_name="gpt-4", prompt_file="my_prompt.txt" ) # Run the copilot copilot() Make sure your custom prompt file exists: in my_prompt.txt, add the following: Your are a Parrot Copilot. Your purpose is to repeat what the user says, but in a different wording. ========= {context} ========= {history} User: {question} Parrot Copilot answer in Markdown: The template variables will be filled at runtime; see our docs on Prompting if you'd like to learn more. 3. Run the Copilot python copilot.py That's it! Your minimal copilot is now running as an API service, at localhost:3000 by default You can chat with it by calling the API: curl -X 'POST' \ 'http://127.0.0.1:3000/v0/conversation/85ceff11-8072-47c8-a09a-ef846b024c04' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "inputs": "Hi! Who are you?" }' See the interactive Swagger docs for full API documentation. Customizing, improving, testing and deploying your Copilot Please see the full documentation to: * Start improving your copilot: customize your copilot by prompting , adding knowledge base, etc. * Read more about the core features and stack choices of OpenCopilot in Overview. Optional: front-end If you'd like to have a front-end for your Copilot, then you can easily deploy it. As a pre-requisite, you need to have pnpm installed. First, clone the opencopilotdev/opencopilot-frontend repository: git clone https://github.com/opencopilotdev/opencopilot-frontend Then, setup the environment variables: cd opencopilot-frontend cp .env.example .env Install the dependencies: pnpm install Run the front-end application: pnpm run dev You can now access the front-end at http://localhost:3001. Getting help If you have any questions about OpenCopilot, feel free to do any of the following: * Join our Discord and ask. * Report bugs or feature requests in GitHub issues. * Directly email Taivo, Co-founder & CTO of OpenCopilot: taivo@opencopilot.dev. About [?] Build and embed open-source AI Copilots into your product with ease opencopilot.dev Topics copilot llm llms Resources Readme License MIT license Activity Stars 177 stars Watchers 3 watching Forks 5 forks Report repository Releases 2 OpenCopilot v0.3.1 Latest Aug 22, 2023 + 1 release Used by 1 * @opencopilotdev @opencopilotdev / opencopilot Contributors 6 * @KasparPeterson * @kgrofelnik * @kristjanpeterson1 * @JohannesTK * @taivop * @dependabot[bot] Languages * Python 100.0% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.