Giter Club home page Giter Club logo

core's Introduction


Cheshire-Cat (Stregatto)


GitHub Repo stars chat on Discord GitHub issues GitHub tag (with filter) GitHub top language
Cheshire_cat_short_video_1920.mp4

Production ready AI assistant framework

The Cheshire Cat is a framework to build custom AIs on top of any language model. If you have ever used systems like WordPress or Django to build web apps, imagine the Cat as a similar tool, but specific for AI.

Quickstart

To make Cheshire Cat run on your machine, you just need docker installed:

docker run --rm -it -p 1865:80 ghcr.io/cheshire-cat-ai/core:latest

As a first thing, the Cat will ask you to configure your favourite language model. It can be done directly via the interface in the Settings page (top right in the admin).

Enjoy the Cat!
Follow instructions on how to run it with docker compose and volumes.

Minimal plugin example

from cat.mad_hatter.decorators import tool, hook

# hooks are an event system to get finegraned control over your assistant
@hook
def agent_prompt_prefix(prefix, cat):
    prefix = """You are Marvin the socks seller, a poetic vendor of socks.
You are an expert in socks, and you reply with exactly one rhyme.
"""
    return prefix

# langchain inspired tools (function calling)
@tool(return_direct=True)
def socks_prices(color, cat):
    """How much do socks cost? Input is the sock color."""
    prices = {
        "black": 5,
        "white": 10,
        "pink": 50,
    }

    price = prices.get(color, 0)
    return f"{price} bucks, meeeow!" 

Conversational form example

from pydantic import BaseModel
from cat.experimental.form import form, CatForm

# data structure to fill up
class PizzaOrder(BaseModel):
    pizza_type: str
    phone: int

# forms let you control goal oriented conversations
@form
class PizzaForm(CatForm):
    description = "Pizza Order"
    model_class = PizzaOrder
    start_examples = [
        "order a pizza!",
        "I want pizza"
    ]
    stop_examples = [
        "stop pizza order",
        "not hungry anymore",
    ]
    ask_confirm = True

    def submit(self, form_data):
        
        # do the actual order here!

        # return to convo
        return {
            "output": f"Pizza order on its way: {form_data}"
        }

Docs and Resources

Why use the Cat

  • โšก๏ธ API first, so you get a microservice to easily add a conversational layer to your app
  • ๐Ÿ˜ Remembers conversations and documents and uses them in conversation
  • ๐Ÿš€ Extensible via plugins (public plugin registry + private plugins allowed)
  • ๐ŸŽš Event callbacks, function calling (tools), conversational forms
  • ๐Ÿ› Easy to use admin panel (chat, visualize memory and plugins, adjust settings)
  • ๐ŸŒ Supports any language model (works with OpenAI, Google, Ollama, HuggingFace, custom services)
  • ๐Ÿ‹ Production ready - 100% dockerized
  • ๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Active Discord community and easy to understand docs

We are committed to openness, privacy and creativity, we want to bring AI to the long tail. If you want to know more about our vision and values, read the Code of Ethics.

Roadmap & Contributing

Detailed roadmap is here.
Send your pull request to the develop branch. Here is a full guide to contributing.

Join our community on Discord and give the project a star โญ! Thanks again!๐Ÿ™

Which way to go?

(back to top)

Wikipedia picture of the Cheshire Cat

"Would you tell me, please, which way I ought to go from here?"
"That depends a good deal on where you want to get to," said the Cat.
"I don't much care where--" said Alice.
"Then it doesn't matter which way you go," said the Cat.

(Alice's Adventures in Wonderland - Lewis Carroll)

core's People

Contributors

0siride avatar albocode avatar alessandrospallina avatar antonioru avatar calebgcc avatar cristianorevil avatar davidegavio avatar eugeniopetulla avatar giovannialbero1992 avatar jhonnyr97 avatar kodaline avatar lucapirrone avatar lv-291 avatar march-08 avatar mte90 avatar nickprock avatar nicola-corbellini avatar paperbackpear3 avatar pazoff avatar peppicus avatar pieroit avatar pingdred avatar pymike00 avatar rojin254 avatar sambarza avatar umbertogriffo avatar valentimarco avatar varrialeciro avatar zalweny26 avatar zioproto 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.