#Help stop ChatGPT from calling functions in situations where I want it just to respond to me

11 messages · Page 1 of 1 (latest)

thorn wind
#

I've shared some code on Pastebin (/yqk8exS1), trying to get ChatGPT to perform functions from human text. My first function is to switch the model (gpt-3.5-turbo or gpt-4).

When I tell it "switch the model please", it doesn't ask which model. I want it to respond with something like "What model do you want me to switch it to?" I've appended the following instructions:

-----
If the function I want you to call is invalid or missing a parameter, do this:
1. Tell me what is wrong. Say something like "I can't do [this] because [this] doesn't exist, or I need [this], or [this] isn't valid."
2. Suggest a fix. Say "Would you like to do [this]?" or "You can use [this] or [that] instead".
3. Wait for my response.

But instead, it calls the function with no parameter, or a randomly chosen parameter. It's not aware of its current model, so it doesn't know what to switch from. I need help improving these responses.

#

I can't give the exact link because auto-mod is scary

rain ridge
#

i thought of just giving it a function to call when it needs to ask for more info 😂 like, just give it what it wants 🤷‍♀️

thorn wind
#

That might work. It's still a little annoying though, because it will make me prompt it twice which is more expensive

#

It's also annoying because I can't make it always use a function, so I have to handle the cases where it just feels like not calling a function.

#

It's... still not listening to meeeeee

#
print(request('Your role is to help the user.', [
    {'role': 'user', 'content':
'''switch the model please
-----
If the function I want you to call is invalid or missing a parameter call the request_more_info function.
DO NOT guess any parameters. I *must* explicitly tell them to you, or it needs to be very clear.'''},
], [
    {
        'name': 'model_switch',
        'description': 'Changes the current AI language model (you) to the specified one.',
        'parameters': {
            'type': 'object',
            'properties': {
                'model': {
                    'type': 'string',
                    'enum': ['gpt-3.5-turbo', 'gpt-4'],
                    'description': 'The model to switch to.'
                }
            },
            "required": ["model"]
        }
    },
    {
        'name': 'request_more_info',
        'description': 'If the function doesn\'t make sense, or is missing a required parameter, call this.',
        'parameters': {
            'type': 'object',
            'properties': {}
        }
     },
]))
#

ksdfbsgkljsdfg

thorn wind
rain ridge
#

'description': 'Changes the current AI language model (you) to the specified one.', --> 'Changes the current AI language model to the specified one, useful only in cases where the user has been super clear which language model!!!" i mean you know except more reasonable than that maybe ,, or maybe yelling at it would help idk 😂

thorn wind
#

I am considering just making it always run on gpt-4