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

How does ChatGPT consume the request? #51

Open
feargswalsh92 opened this issue Jun 8, 2023 · 1 comment
Open

How does ChatGPT consume the request? #51

feargswalsh92 opened this issue Jun 8, 2023 · 1 comment

Comments

@feargswalsh92
Copy link

I'm working on a plugin to create a calendar event with Google via the text interface. I wrote a function with the route /create-calendar-event

@app.route("/create-calendar-event", methods=['POST'])
async def create_calendar_event():
    # Get the event details from the request
    event_details = await request.get_json()
    print('event_details', event_details)

    # Authenticate and get the Google Calendar service
    service = authenticate_and_get_service()
    print('event_details', event_details)

    # Now you can use the service object to create a calendar event
    # You will need to implement the create_event function
    # This function should use the Google Calendar API to create an event with the provided details
    # create_event(service, event_details)

    return quart.Response("Event created successfully", status=200)

When I write "create calendar event" in the ChatGPT interface it successfully identifies the calendar event route as the appropriate route to call

image

but it doesn't log event details I pass in the prompt as the event_details as part of the request.

image

How does ChatGPT figure out what the request is when it identifies the correct route to associate with a prompt?

@that-one-arab
Copy link

I could not understand what your question was. Are you saying that Chat GPT is calling the correct POST route but missing the POST route's request body parameters? Or are you asking a general technical question on how Chat GPT does what it does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants