-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Create Release | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
test: | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install pip dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f my_plugin/requirements.txt ]; then pip install -r my_plugin/requirements.txt; fi | ||
- name: Publish GitHub release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# plugin-template | ||
A generic template to create a plugin for the Cheshire Cat AI. | ||
# My Plugin | ||
|
||
Write here all the useful informations about your plugin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from cat.mad_hatter.decorators import tool, hook | ||
from datetime import datetime | ||
|
||
@tool | ||
def get_the_time(tool_input, cat): | ||
"""Retrieves current time and clock. Input is always None.""" | ||
|
||
return str(datetime.now()) | ||
|
||
@hook | ||
def before_cat_sends_message(message, cat): | ||
|
||
prompt = f'Rephrase the following sentence in a grumpy way: {message["content"]}' | ||
message["content"] = cat.llm(prompt) | ||
|
||
return message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "My plugin", | ||
"version": "0.0.1", | ||
"description": "Description of my plugin.", | ||
"author_name": "Me", | ||
"author_url": "https://myportfolio.me", | ||
"plugin_url": "https://github.com/link_to_my_plugin_repository", | ||
"tags": "cat, template, example", | ||
"thumb": "my_plugin_logo.png" | ||
} |
Empty file.