Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Prompt Injection

OGIOS edited this page Oct 1, 2023 · 3 revisions

⚠️ This is an under testing feature, with no guarantee that it works

There's the official custom prompt api for the models, thus no needed for this.

The prompt style for each model is different from one another, collected from huggingface.

  • PromptFalcon for tiiuae/falcon-180B-chat
  • PromptLlama for codellama/CodeLlama-34b-Instruct-hf & meta-llama/Llama-2-70b-chat-hf

Better off to just use it at the beginning of each conversation

Screenshot

Screenshot_2023-09-30-21-33-09_23821

Usage

Code

import it with:

from hugchat_api.core import ListBots

ListBots.PromptFalcon   # or
ListBots.PromptLlama

Create and send to Bot.chat()

prompt = ListBots.PromptFalcon(system="...", user="...")
message: Message = bot.chat(text=prompt, ...)
...

Terminal

  1. /new to create a new conversation
  2. type /pro
  3. input system prompt
  4. input user prompt

Feel free to ask any questions or share me with your thoughts!

Clone this wiki locally