fabric icon indicating copy to clipboard operation
fabric copied to clipboard

Feature/general client

Open sbehrens opened this issue 1 year ago • 8 comments

This provides a simple general client and API endpoint for simple patterns.

usage: general_client.py [-h] [-p PATTERN] [prompt]

Send a request to the API.

positional arguments:
  prompt                The prompt to send to the API

options:
  -h, --help            show this help message and exit
  -p PATTERN, --pattern PATTERN
                        Specify the pattern to use

The general API parses the github URL for the pattern name, and then executes those associated system and user prompts. More complex patterns may require additional client or API code.

Note, I have modified the client and server IP addresses to default to localhost, enabling users to test out the tool without requiring code change. The API key which I have provided can be removed/redacted (it's a local UUID will change in production).

sbehrens avatar Jan 31 '24 17:01 sbehrens

Added a new feature for listing available patterns for the general client.

image

sbehrens avatar Jan 31 '24 18:01 sbehrens

This is spectacular stuff. We're pretty far along with a similar idea, called fabric, and we're getting close to putting it in homebrew as well. The guy working on it is Jonathan Dunn. I'm having him reach out to you and join in the convo here. Let's all sync up on the ideas and get the client added.

danielmiessler avatar Feb 01 '24 04:02 danielmiessler

hey guys! good to be here. so i made another repository to show you guys https://github.com/xssdoctor/augmented/tree/master. take whatever you need

xssdoctor avatar Feb 01 '24 11:02 xssdoctor

This repository has 2 modes, standalone and server. Standalone is similar to what I’m seeing you did and server starts a personal server with a web frontend

xssdoctor avatar Feb 01 '24 11:02 xssdoctor

its too big for discord but i uploaded to google drive https://drive.google.com/file/d/14BT3frLYIUesFxPL_twc86cTdi_ydq2y/view?usp=share_link check it out. Here's a video

xssdoctor avatar Feb 01 '24 11:02 xssdoctor

another thing about the tool is that there is a --stream mode which streams the text to the command line (or the web front end), just like on the chatgpt web site. Its pretty magical

xssdoctor avatar Feb 01 '24 14:02 xssdoctor

I want to submit to brew, but I think we should do it from this repository, not mine. So I want to see how you want to do this. The way to do this is to make a fork called something like Homebrew/homebrew-core with this special ruby script in it.

Also I think the last thing we need (from my project at least) is a way to pull new patterns from daniel's server when he writes them. It's pretty easy to implement from my side but I just need that server to be set up.

xssdoctor avatar Feb 01 '24 14:02 xssdoctor

@xssdoctor great stuff on that branch, you have a lot of features added. I'll take a look at if I see anything meaningful to add I'll submit a PR!

@danielmiessler okay to close this PR since @xssdoctor has most of these features already implemented.

sbehrens avatar Feb 01 '24 17:02 sbehrens

Great work here by Scott. Closing to merge it with what @xssdoctor is doing.

danielmiessler avatar Feb 02 '24 03:02 danielmiessler