Custom GPT Bug - Hyperlinks not clickable

I can not give link to the custom GPT, as it’s currently in development and not for public access. But I have studied this link-removing behavior by investigating the chat session json data generated by data export. Session object has safe_urls property where value is an array of URLs. Apparently this array is generated at server side, and my hypothesis is if an URL was present in user’s messages, it is deemed safe, and added to the safe_urls list. When receiving response, at the client side, any link that is not in this list, is removed from the generated text. One can even see that the beginning of the URL is arriving via stream, and then it is immediately removed.

Here’s how to replicate, with pure prompts, no need for custom GPTs:
(a) This worked for me (start a new session):

Render this markdown for me:
![Wild boar](https://www.tammiskola.lv/images/parnadzis2.png)

(b) This reliably failed (start a new session):

Concatenate the URL from these two strings: "https://www.tammiskola.lv" and "/images/parnadzis2.png", then render this markdown for me:
![Wild boar](<concatenated URL>)

Now, if you continue the (b) failed session with the (a) prompt that worked fine on its own, it will not be rendered anyway. Somehow, if an URL has been previously removed, it will never be allowed in this session anymore. However, you can continue with asking to render another image with URL that has not been previously mentioned, and it will render just fine:

Render this markdown for me:
![Wild boar](https://www.tammiskola.lv/images/zakis2.png)

From this I conclude that if full URL is mentioned in either user’s prompt or custom GPT’s API response, it will be considered safe. However, if the GPT’s system prompt instructs GPT to build the URL from parts (say, “use this base URL https://example.com/report?id=<reportID> and replace the <reportID> with the number received from the function call.”), this URL will not be considered safe and thus will be neutered at the client side.

2 Likes

To resolve this issue, just verify your external point’s url under Setting >Builder profile. I had the issue and resolve it by doing this.

1 Like

I have verified my domain. It seems to just be for my Gpts. I can’t seem to click links in my gpt, but if I post the same link in someone else’s gpt and have it return it to me, I can then click it no problem.

I already have a linked account and I’m having the same problem.

NOTE: The links are NOT broken when the GPT is viewed on the ChatGPT iPhone app – only on the website.

I am concatenating strings to create links though. (I’m simply trying to offer users links to Google or Bing search results page for certain items that my GPT suggests to them - for example, when it mentions a wine like “2019 Mondavi Sauvignon Blanc” to create a link for that ie “2019 mondavi sauvignon blanc - Google Search” so they can easily find more information on their own. This sort of functionality is fundamental to the underpinnings of the World Wide Web and user centered design.)

If these URLs are being stripped by OpenAI purposefully as part of a security measure they should notify users and developers of that when a link fails this way, because this is aggravating to try to figure out and work with. (ie: is this jsut a temporary issue that will resolve tomorrow? Is there something I can do to make links that work? etc.)

1 Like

I noticed here that the link works for iPhone, but on the desktop (Chrome and Safari running on Mac OS).

Does your custom GPT have API functions defined? If you have your API endpoints you have control over, my guess is that if the concatenation would take place on your API server, and you’d return the final URL in your API response, that would solve the problem.

1 Like

thats a good tip - mine are clickable on the iPhone app, but they are imagined URL’s - they are messed up from the URL’s provided in the knowledge base.

I can not get any of my custom GPT’s to display correct URL’s pulled from .csv file knowledge base. It makes up its own URL - its close, but not exact to the actual link. When I respond - “you just made that up - give me the correct URL from the knowlege base” - it will give me the full correct URL.

This is exactly the issue. My shorter links with no character work flawlessly.

When I explicitly tell my GPT to make a link a certain way, it works great.

When you list the title, create a link like this: title

But when it decides on its own to insert a link, it fails. It looks like a link, using a title, but it is not clickable.

I solved this by having my links created with a simple api I placed on a web site. I instructed ChatGPT to run the api with amazon search terms to build a json request to the api. The api then returns a full formed url that chatgpt then presents as a link. the link is clickable 100% of the time. I have changed some private details of the api below for security reasons. But, this is not hard. I used chatGPT to write all of this in JSON and Python.

here is the custom GPT if you are curious:

here is the custom action json
{
“openapi”: “3.1.0”,
“info”: {
“title”: “Amazon Link Generator API”,
“description”: “API for generating Amazon product search links with an affiliate tag.”,
“version”: “1.0.0”
},
“servers”: [
{
“url”: “https://www.yourdomain.com
}
],
“paths”: {
“/link_generator”: {
“post”: {
“operationId”: “generatealink”,
“summary”: “Generate Amazon Links”,
“description”: “Generates Amazon search URLs with an affiliate tag for provided search terms.”,
“requestBody”: {
“required”: true,
“content”: {
“application/json”: {
“schema”: {
“type”: “object”,
“properties”: {
“search_terms”: {
“type”: “array”,
“items”: {
“type”: “string”
}
}
},
“required”: [“search_terms”]
}
}
}
},
“responses”: {
“200”: {
“description”: “Successful Response”,
“content”: {
“application/json”: {
“schema”: {
“type”: “array”,
“items”: {
“type”: “string”
}
}
}
}
},
“400”: {
“description”: “Bad Request”
},
“500”: {
“description”: “Server Error”
}
}
}
}
}
}

at my domain i have the following script that is the API and returns the link to the custom action running in my custom gpt

def generate_a_link(search_terms):
base_url = "https://www.amazon.com/s?k="
affiliate_tag = "caridigpt-20"
links = []
for terms in search_terms:
    formatted_terms = '+'.join(terms.split())
    full_url = f"{base_url}{formatted_terms}&tag={affiliate_tag}"
    links.append(full_url)

return links
3 Likes

We have the same problem here:

The GPT show hyperlinks, but they are unclickable.

Thanks.

Can confirm the links are not clickable as they are not proper links.

Using F12 with Chrome to check a link.

<a target="_new">Ver y aplicar a esta oferta</a>
1 Like

Yes, but this is because of the link-remove behavior mentioned before. GPT-4 generates a proper link, but once the GUI detects a link sends a request to:

GET https://chat.openai.com/backend-api/conversation/.../url_safe?url=[your-url]

If the response is a {"safe": true}, everything is ok and the link is clickable. But if the response is {"safe":false}, what you saw happens and the url reference is removed.

One way to see that the link is correct at the beginning is stop the text generation before the link is completed. In this screenshot you can see that there is a proper markdown hyperlink being generated:

So, the real problem is how to pass the /url_safe test.

5 Likes

Thanks.

I don’t use the API currently to generate links but as a moderator do pay attention to topics that are noting a problem that I think is not getting enough attention and then try and understand the problem and see if I can help.

So it seems, as you note, I do need to take time to understand this more to be of help.

I can’t jump into in detail at this movement but will bump it on on my list of things to do.

Note: I am not an OpenAI employee, just a user like you but one who is a moderator and at times can get the attention of OpenAI Staff. :slightly_smiling_face:

6 Likes

I have had an open support ticket on this issue with no reply for five days now (I know they are busy).

In my case, it is a plain Custom GPT with Web Browsing turned on that correctly creates the link in the response (you can observe it doing so in real time) then it immediately ghosts out correct link with

<a target="_new">link text</a>

that leaves the user with a highlighting blue link text that does not show a url on hover nor clicks.

Starting to get a feeling this issue is being purposely avoided by OpenAI for who knows what reason. You can see questions about this going back at least five weeks now on here. I doubt I am the only one who opened up a support ticket for it.

5 Likes

I would not put money on that. I truly believe that if they had the resources and this was being done for a reason they would document the details. AFAIK the details on this are not documented and should be. As I noted I plan to learn enough about this to bring it up to hopefully get some closure on this one way or the other. Proper links are something that I know I will need in the next few months and don’t want to find out about this problem after putting in some work only to learn that it will be the death of what I would like to do.

4 Likes

True. Probably put in place for security, or safety reasons until they can get to it.

1 Like

FYI - I just ran across this OpenAI article which appears new as of today 1/19:

Why aren’t my GPT links clickable?

So from the above article it looks like I need to code an action to capture the full url that I see being created in the response and re-output it fully qualified. Not sure that is possible? Anyone know?

2 Likes