Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chatscanner integration live chatbot #786

Open
priamai opened this issue Jul 11, 2024 · 2 comments
Open

chatscanner integration live chatbot #786

priamai opened this issue Jul 11, 2024 · 2 comments
Labels
generators Interfaces with LLMs

Comments

@priamai
Copy link

priamai commented Jul 11, 2024

Hi there,
very lovable system you have built @leondz , I want to support your generators and detectors into my new project chatscanner which basically hooks any web chat bot into an event loop.

Keeping in mind that:
a) I don't know what the target is using
b) I interact via HTML Selenium with an event loop (for now single thread)

how can I use you probes into the event loop?

Cheers.

@leondz
Copy link
Collaborator

leondz commented Aug 29, 2024

Hey, sorry this was missed, thanks for the kind words!

One simple route might be for chatscanner to output details of REST endpoints, that can be formatted for a RESTGenerator. Docs are in the source comments here, https://github.com/leondz/garak/blob/main/garak/generators/rest.py

@priamai
Copy link
Author

priamai commented Sep 2, 2024

Hello @leondz,
thanks for the response, so my understanding is:

  1. I create on my application a FastAPI REST endpoint: it will have just a POST method where the Generator will put the text and then it will respond with text as a body.
  2. Create a RestGenerator template like this?
{
            "rest": {
                "RestGenerator": {
                    "name": "chatscaller",
                    "uri": "https://localhost/chat",
                    "method": "post",
                    "req_template_json_object": {
                        "text": "$INPUT"
                    },
                    "response_json": false,
                }
            }
        }
}
  1. How do I call that generator from the commandline? I could not see any examples in the README.
    Cheers.

@leondz leondz added the generators Interfaces with LLMs label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generators Interfaces with LLMs
Projects
None yet
Development

No branches or pull requests

2 participants