GithubHelp home page GithubHelp logo

vital121 / open-copilot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cyberflamego/opencopilot

0.0 0.0 0.0 16.45 MB

๐Ÿ•Š๏ธ Build and embed open-source AI Copilots into your product with ease

Home Page: https://opencopilot.dev

License: MIT License

JavaScript 0.46% Python 99.36% HTML 0.18%

open-copilot's Introduction

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

๐Ÿ•Š๏ธ OpenCopilot 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 time-consuming, unreliable and overly complex. Moreover, existing solutions such as Microsoft Copilot Stack are closed-source. Today, building an LLM-app 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

๐Ÿ’พ SaaS Copilot

๐Ÿ’ณ E-commerce Copilot

See more use cases in docs.

โšก Quickstart

As prerequisites, you need to have Python 3.8+ and pip installed.

1. Install the OpenCopilot Python package

pip install opencopilot-ai

2. Create a new python file to set up a minimal Copilot

For example, you can create an AWS CLI Copilot using the following code by adding it to a copilot.py file. Make sure to replace openai_api_key with your ๐Ÿ”‘ own OpenAI API key.

from opencopilot import OpenCopilot

PROMPT = """
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 URL
copilot.add_data_urls(
    [
        "https://awsdocs.s3.amazonaws.com/cli/latest/aws-cli.pdf",
    ]
)

# Run the copilot
copilot()

3. Run the Copilot

python copilot.py

4. Chat with the Copilot

You can chat with your copilot in the UI at localhost:3000/ui or using the CLI:

opencopilot chat "Hello, who are you?"

5. Create your own copilot

After 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, see docs.opencopilot.dev, or check a more detailed example of the AWS copilot in the examples directory.

๐Ÿ“– Examples

We provide a variety of examples to showcase different functionalities and implementations of OpenCopilot. Check out the examples directory or see the detailed README in the examples directory for a comprehensive overview.

๐Ÿ” Stack Overview

OpenCopilot 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.

opencopilot_stack

See our docs on Stack Overview to learn more about each part of the OpenCopilot stack.

Analytics

OpenCopilot 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 the tracking code.

You can opt out of tracking by setting the environment variable OPENCOPILOT_DO_NOT_TRACK=True:

export OPENCOPILOT_DO_NOT_TRACK=True

Getting help

If you have any questions about OpenCopilot, feel free to do any of the following:

open-copilot's People

Contributors

kasparpeterson avatar kristjanpeterson1 avatar kgrofelnik avatar taivop avatar karlkallas avatar johannestk avatar taivokasper avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.