#A question in the chatgpt bot that I made with Python, I want to specify its task, behavior and name

35 messages · Page 1 of 1 (latest)

iron vigil
#

Hi, I want the bot to say the name I want, like when someone asks what is your name, or anything else.

iron vigil
hardy gate
# iron vigil what?

You can provide the name in the prompt that you give it
For example

Your name is Kaveen
You are a chatbot
Prompt: <>
iron vigil
#

ok

iron vigil
#

like this?

hardy gate
#

In one prompt

#

you shouldn't be sending multiple prompts, you're getting multiple responses and only choosing the first one

iron vigil
#
prompts = [
            "Your Name is Manager. You a Chat Bot in discord."
        ]
#

I changed the prompts, but the bot does not answer other questions

hardy gate
#

You need to programatically insert the user's question into the prompt

#
prompts = [
           f "Your Name is Manager. You a Chat Bot in discord. Prompt: {prompt}"
        ]
#

as a basic example

#

where {prompt} would be the message content that the user sent

iron vigil
#

oh thank you

hardy gate
#

and then later, you'll prbably want to save the previous messages and responses

#

to emulate a "context"/"memory"

iron vigil
hardy gate
#

Yeah it can be stored in the host, it won't use a lot of RAM since it's just text

iron vigil
#

ty

iron vigil
#

@hardy gate If I want to send those codes with syntax highlighting, what should I do so that there is no problem in the other answers?

iron vigil
#

code color

hardy gate
#

Tell GPT3 in the prompt to prefix and suffix code examples with three backticks and the markdown shortcut for the language

left heron
#

if you are using python, add py

#

tell the bot to do this

iron vigil
#

ok