#Using a port for the server url in a GPT action?

1 messages · Page 1 of 1 (latest)

flint orbit
#

I apologize for my cluelessness. This is the first openapi schema app I have done and it is for a GPT Action. I have a fastapi app using uvicorn on my local machine running on http:127.0.0.1:8000. I recognize I need to go to https://... However, I cannot add the port, it has to be https://127.0.0.1 . - url: https://127.0.0.1:8000 won;t work: Server URL https://127.0.0.1:8000 is not under the root origin https://127.0.0.1; ignoring it . I am writing this GPT action to enhance my personal workflow, not for public consumption. How do i Get the URL correct for the POST and GET's? (i.e.: adding the port). Thank you. Again, perhaps this is obvious. It is new to me. Thank you.

gilded narwhalBOT
#

Hi @flint orbit. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the information provided in the extracts, it seems that you're trying to use a local server for your GPT Action. However, GPT Actions require a server that is accessible over the internet and uses HTTPS.

One way to expose your local server to the internet is by using a service like ngrok, as mentioned in this forum post (https://community.openai.com/t/538074). Ngrok provides a public URL for your local server and handles the HTTPS requirement. Here's an example command to start ngrok:

./ngrok.exe tunnel --label edge=edghts_fjsiasuhjkerwgjZMw <http://localhost:8000>

This command will create a tunnel from the ngrok server to your localhost on port 8000. The edge=edghts_fjsiasuhjkerwgjZMw part of the command would be unique to your account/endpoint. You would also need to do an authorization step in ngrok first.

Once you have the ngrok URL, you can use it in your OpenAPI schema like this:

servers:
  - url: <https://<your-ngrok-url>>

Please note that this is a workaround for development and testing purposes. For a production environment, you would typically deploy your server on a platform that provides a public HTTPS URL.

If you're still having trouble, it might be helpful to review the OpenAI documentation on Actions (https://platform.openai.com/docs/actions/introduction) for more information on how to configure GPT Actions.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@flint orbit kapa.ai is still learning and improving, please let us know how it did by reacting below

flint orbit
#

thank you. That was easy. I got the openapi schema to work. Access through ChatGPT is failing. Looking at the console, I am getting: Error with Permissions-Policy header: Unrecognized feature: 'document-domain'. Can you please help?

#

thank you @gilded narwhal . That was easy. I got the openapi schema to work. Access through ChatGPT is failing. Looking at the console, I am getting: Error with Permissions-Policy header: Unrecognized feature: 'document-domain'. Can you please help?

gilded narwhalBOT
#

Let me check the knowledge base for you. One moment! :books:

#

Sorry @flint orbit, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:

Perhaps try again in 15mins?