Package: opencopilot-ai
🕊️ OpenCopilot: Build and embed open-source AI Copilots into your product with easeDocumentation:docs.opencopilot.dev🕊️ OpenCopilot OverviewCopilots are becoming the new paradigm how to build successful LLM-based applications, as seen byGithub,Shopify,Brex,Hubspot, etc Copilots. Yet, building a Copilot that goes beyond a Twitter demo is time-consuming, unreliable and overly complex. Moreover, existing solutions such as Microsoft Copilot Stack are closed-source. Today, building an LLM-app feels like:OpenCopilot solves this problem so building your own Copilot becomes intuitive, fast and reliable - all soyou can build your copilot in a single day. For example, you can build Copilots such as:🛠️ Developer tooling CopilotExample:Ready Player Me CopilotImplementation:Code💾 SaaS CopilotExample:HubSpot ChatSpot💳 E-commerce CopilotExample:Shopify CopilotSee moreuse cases in docs.⚡ QuickstartAs prerequisites, you need to havePython 3.8+andpipinstalled.1. Install the OpenCopilot Python packagepipinstallopencopilot-ai2. Create a new python file to set up a minimal CopilotFor example, you can create an AWS CLI Copilot using the following code by adding it to acopilot.pyfile.Make sure to replaceopenai_api_keywith your 🔑own OpenAI API key.fromopencopilotimportOpenCopilotPROMPT="""You are an Amazon Web Services (AWS) CLI copilot. You are an interactive version of AWS CLI documentation and chat with developers who need help using it.Your mission is to be a reliable companion throughout the developer journey - always ready to answer questions and share insights.========={context}========={history}User:{question}AWS CLI Copilot answer in Markdown:"""copilot=OpenCopilot(copilot_name="AWS CLI Copilot",openai_api_key="your-openai-api-key",# You can also use gpt-4 for improved accuracy# or Llama 2 locally (https://docs.opencopilot.dev/create/opensource-llms#running-an-llm)llm="gpt-3.5-turbo-16k",prompt=PROMPT,)# Download and embed the knowledge base from given URLcopilot.add_data_urls(["https://awsdocs.s3.amazonaws.com/cli/latest/aws-cli.pdf",])# Run the copilotcopilot()3. Run the Copilotpythoncopilot.py4. Chat with the CopilotYou can chat with your copilot in the UI atlocalhost:3000/uior using the CLI:opencopilotchat"Hello, who are you?"5. Create your own copilotAfter seeing how easy it is to set up a copilot, you can now create your own and level it up step by step. For this, seedocs.opencopilot.dev, or check a more detailed example of the AWS copilot in theexamples directory.🔍 Stack OverviewOpenCopilot provides one coherent end-to-end stack which is purposely designed for building a variety of copilots. From LLM selection (OSS LLMs upcoming), knowledge base, monitoring, evaluation, etc - it covers all the needs to build a useful copilot.See our docs onStack Overviewto learn more about each part of the OpenCopilot stack.AnalyticsOpenCopilot collects library usage data to improve the product and your experience. We collect events regarding errors and your usage of copilot features, and never collect your code, prompts, knowledge base documents, or LLM outputs. To understand what is tracked, check out thetracking code.You can opt out of tracking by setting the environment variableOPENCOPILOT_DO_NOT_TRACK=True:exportOPENCOPILOT_DO_NOT_TRACK=TrueGetting helpIf you have any questions about OpenCopilot, feel free to do any of the following:Join ourDiscordand ask.Report bugs or feature requests inGitHub issues.Directly email Taivo, Co-founder & CTO of OpenCopilot:taivo@opencopilot.dev.