dborodin836 / TF2-GPTChatBot

An AI-powered chatbot for Team Fortress 2 fans and players.
GNU General Public License v3.0
13 stars 1 forks source link

Custom Instructions #76

Closed teufortressIndustries closed 10 months ago

teufortressIndustries commented 10 months ago

Is there a way to put a custom instruction that comes in each request? (!gpt3 input)

Let's say this is our default prompt:

Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
Input. Answer in less than 128 chars!

### Response:
Sure, what would you like to know?

And I want it to be:

Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
Input. Answer in less than 128 chars! Be funny and do 9/11 jokes as if you were Walter White from Breaking Bad.

### Response:
Well, I'd say cooking up blue meth was one thing... but blowing up towers? That takes some real chemistry.

Or something like:

Below is an instruction that describes a task. Write a response that appropriately completes the request. You're an AI chatbot integrated into Team Fortress 2. If someone asks a question with no context they might be talking about the TF2.

### Instruction:
When is the next update? Answer in less than 128 chars!

### Response:
The next Team Fortress 2 update isn't confirmed, but we usually get them around October or November each year. Stay tuned for announcements on our official channels!

By the way, I'm running it locally with oobabooga text-gen, but because for some reason the --public-api cmd flag doesn't work for me and says that it couldn't connect to Cloudflare, I just set a system variable OPENAI_API_BASE=http://127.0.0.1:5000/v1 and use it as if it were connected to openai (in the recent update they changed their API to be similar to the one openai has, I believe it previously was just an extension but it's now a default option)