Very nice development. We already used internal ChatGPT a lot to get base code to get started and regex, but with more FME correct answers it only gets better.
Using the PythonCaller AI Assist in 2023.1
Â
If I ask:
Use arcpy to find all featureclasses and their featurecounts in a file geodatabase.
Â
It returns:
import arcpy
Â
# Set the workspace
arcpy.env.workspace = 'C:/data/mygdb.gdb'
Â
# Get a list of all feature classes in the geodatabase
feature_classes = arcpy.ListFeatureClasses()
Â
# Loop through each feature class and print its name and feature count
for fc in feature_classes:
    count = arcpy.GetCount_management(fc)
    print(f'{fc} has {count} features')
This works, but I need the result on the feature, out of the PythonCaller. So I changed my question to:
Use arcpy to find all featureclasses and their featurecounts in a file geodatabase. Return the result as a list added to the feature.
Â
Now I get:
Invalid AI response.
Â
How we solved this is:
import fme
import fmeobjects
import arcpy
Â
class FeatureProcessor(object):
Â
    def __init__(self):
        pass
Â
    def input(self, feature):
        arcpy.env.workspace = feature.getAttribute('path_windows')
Â
        feature_classes = arcpy.ListFeatureClasses()
        record_counts = Â]
        count = 0
Â
        for fc in feature_classes:
            featurecount = arcpy.GetCount_management(fc)s0]
            feature.setAttribute("record_counts" + "{" + str(count) + "}.FeatureClass",fc)
            feature.setAttribute("record_counts" + "{" + str(count) + "}.FeatureCount",featurecount)
            count = count + 1
Â
        self.pyoutput(feature)
    def close(self):
        pass
Â
    def process_group(self):
        pass
It works, but it feels hacky... It would be great if the AI assistant could generate a complete solution.
Fast tests - Great enhancement! For now PythonCaller works really good on trivial sample examples like "get part of the path", "return extensions from path" etc.
Â
Regex working good!
Â
For me, would be great to add AIto main attribute creator (not only in conditional statements)
Â
Â
Hi all,
This is great feedback, keep it coming!
Â
@nielsgerrits​ @marekszczepan1​ it sounds like you've both had similar experiences with the AI Assist in our PythonCaller, where the AI seems to work well with the more simple, generic requests but can struggle at times with those complex, more specific asks. I'll certainly bring your feedback to our internal teams working on this functionality to see if we can dig into and improve the AI-generated Python.
Â
@marekszczepan1​ Interesting suggestion on the AI integration with our attribute-handling transformers! Would you be able to expand on that idea a bit? We are definitely interested in knowing your thoughts on how we can integrate AI into other areas of the FME Platform!
For now user can use regular_expression in attribute_manager / attribute_creator with open_text_editor (for now without AI help) or in conditional value definition (only there is possible for now to help with AI)
It'll be quite good enhancement to add posibility to create regex with AI help directly from attribute_creator/attribute_manager main window
Â
Is there any way to disable ai assist? I don't want any users accidentally misusing it until such time as we can point it at our own in-house LLM.
Is there any way to disable ai assist? I don't want any users accidentally misusing it until such time as we can point it at our own in-house LLM.
OK so I installed it and looked into the settings. Looks like we can point to our own Azure OpenAI which is cool. Still interested to know if there is any way to disable the functionality if we don't want users to have access to it.
OK so I installed it and looked into the settings. Looks like we can point to our own Azure OpenAI which is cool. Still interested to know if there is any way to disable the functionality if we don't want users to have access to it.
@mgg_beca​ That's a great question about disabling the AI Assist.
Â
The service does have it's own unique URL: https://fme-ai-service.safe.com.
Â
If you need to remove access to the FME AI Assist service, the best way to do so would be to add the above URL to a firewall's Do Not Allow list. If there's an alternative form of URL filtering in place, our service URL could also be included on the blocked list of this filter.
Â
Essentially, the AI service requires internet access to function. So long as the customer has some way of restricting internet traffic in place, our service could simply be added to this restriction in the same way that our other in-product URLs can be restricted or whitelisted.
Â
Please let us know if the above doesn't quite address your concerns.
For now user can use regular_expression in attribute_manager / attribute_creator with open_text_editor (for now without AI help) or in conditional value definition (only there is possible for now to help with AI)
It'll be quite good enhancement to add posibility to create regex with AI help directly from attribute_creator/attribute_manager main window
Â
@marekszczepan1​ Just so I'm fully on the same page as you, you'd like to see the AI Assist show up as a stand-alone option in the drop-down menu beside the Value column, is that correct?
@marekszczepan1​ Just so I'm fully on the same page as you, you'd like to see the AI Assist show up as a stand-alone option in the drop-down menu beside the Value column, is that correct?
yes, exactly
OK so I installed it and looked into the settings. Looks like we can point to our own Azure OpenAI which is cool. Still interested to know if there is any way to disable the functionality if we don't want users to have access to it.
Hi @natalieatsafe​ ,
Â
Thanks for that URL, that's handy to know. I would consider that a good workaround while the AI Assist feature is in Tech Preview, but once it is in production I would like you to consider having an option in the settings to disable it. Many organisations have policies restricting or banning the use of LLMs for privacy, risk or intellectual property reasons. It would be unfortunate for a FME user to breach those policies by accident.
OK so I installed it and looked into the settings. Looks like we can point to our own Azure OpenAI which is cool. Still interested to know if there is any way to disable the functionality if we don't want users to have access to it.
@natalieatsafe​ I was just told by a client that if the AI URL is blocked, it will lead to an error message shown to the user at startup of Form:
Failed to connect to 'fme-ai-service.safe.com'.
Is it possible to avoid this error message?
OK so I installed it and looked into the settings. Looks like we can point to our own Azure OpenAI which is cool. Still interested to know if there is any way to disable the functionality if we don't want users to have access to it.
@mgg_beca​ I can certainly appreciate your concerns on the matter! I'm going to create an enhancement request to have our internal teams working on this functionality take a deeper look at this idea. I'm glad you brought this point up, it always helps us out when we can get these perspectives right from our users, so thank you! I'll provide an update to this thread on how we move forward with this idea of disabling the service via setting.
Â
@david_r​ Now that's an interesting turn of events, certainly unexpected! Could you file a support case with us so that we could take a closer look at this error? Some details that would be very helpful include:
Â
- is the error blocking Form from starting up entirely, or is this an error that the user can acknowledge (click "ok") and then Form can move on with initializing?
- Could the user provide some details on how they blocked the URL (firewall block, or an alternative URL filtering service block?)
Â
This one's perplexing for sure, and worth an investigation with a support case and some more details. As always, screenshots are very welcome and encouraged! Thank you for bringing this one up to us!
OK so I installed it and looked into the settings. Looks like we can point to our own Azure OpenAI which is cool. Still interested to know if there is any way to disable the functionality if we don't want users to have access to it.
I'm not sure about the client, it's a government entity so it could be blocked a number of places and it's going to be complicated to track down. I tried blocking fme-ai-service.safe.com in my router and it worked as expected, i.e. I got no error message and everything except AI Assist worked just fine. But what would happen if calls to fme-ai-service.safe.com gave an unexpected reply, e.g. if a proxy or gateway returned some html page saying that access had been blocked?
OK so I installed it and looked into the settings. Looks like we can point to our own Azure OpenAI which is cool. Still interested to know if there is any way to disable the functionality if we don't want users to have access to it.
@david_r​ Hmm, the hope would be that if FME Form is configured to work with your proxy via the FME Options --> Network Proxy settings, then the call to the service should go through just like any other API call would. If a call to our FME AI service is being blocked by a proxy, then there's likely some whitelisting that would be needed on the proxy side. That's if I'm understanding the ask correctly of course!
@david_r​ If you are still able to pursue more information from the client on how the URL was blocked, as well as a bit on their network config, perhaps a screenshot of the error, I would like to pass these details over to our developers so they can try and reproduce the error and look to correct it. The more info the client can provide, the better! If you'd prefer to provide this info outside of a public forum, a support case would be a much better option for that.
OK so I installed it and looked into the settings. Looks like we can point to our own Azure OpenAI which is cool. Still interested to know if there is any way to disable the functionality if we don't want users to have access to it.
I can confirm that we have blocked the AI Assist server using url blacklisting, and I do not get an error on startup. when I try to open the AI Assist tool I get this error:which seems about right.
OK so I installed it and looked into the settings. Looks like we can point to our own Azure OpenAI which is cool. Still interested to know if there is any way to disable the functionality if we don't want users to have access to it.
@mgg_beca​ That does indeed look like what we'd expect to see upon blacklisting the FME AI Service URL. That's good news here. Thanks for sharing!
@david_r​ If you are still able to pursue more information from the client on how the URL was blocked, as well as a bit on their network config, perhaps a screenshot of the error, I would like to pass these details over to our developers so they can try and reproduce the error and look to correct it. The more info the client can provide, the better! If you'd prefer to provide this info outside of a public forum, a support case would be a much better option for that.
The client says that the following appears in the log window when opening a new (empty) workspace in FME 2023.1 and then leaving it alone for about 20 minutes:
However, I've not been able to reproduce it myself, even when blocking the URL, either on my machine or on the network.
The client says that the following appears in the log window when opening a new (empty) workspace in FME 2023.1 and then leaving it alone for about 20 minutes:
However, I've not been able to reproduce it myself, even when blocking the URL, either on my machine or on the network.
@david_r​ Hi David, I hope I find you well today. I just wanted to provide a little update on the error that you brought forth for your client, when disabling the AI Assist URL.
Â
Our development team has had an opportunity to investigate this one, and unfortunately were not able to reproduce it. It really sounds like the issue is very specific to your client's internal environment. As other users, including yourself, have successfully blocked the AI service URL and not encountered the error, this would likely be an error that is best remedied by the client's own IT team and an exploration of where exactly the AI service URL is being blocked.
Â
Our team has, however, made an adjustment to the error message seen when the AI Service URL is blocked, just to be a little more informative. This adjust will be available in a very near-future release of FME Form 2023.1, and can be tracked on FMEFORM-29415.
Â
If yourself or the client have any lingering questions on this one, please don't hesitate to post those! I'm happy to assist where I can.
The client says that the following appears in the log window when opening a new (empty) workspace in FME 2023.1 and then leaving it alone for about 20 minutes:
However, I've not been able to reproduce it myself, even when blocking the URL, either on my machine or on the network.
Hi Natalie, thanks for the feedback, I agree with your assessment. The message is not blocking our user in any way (it's purely cosmetic), so let's leave it be for now.
The client says that the following appears in the log window when opening a new (empty) workspace in FME 2023.1 and then leaving it alone for about 20 minutes:
However, I've not been able to reproduce it myself, even when blocking the URL, either on my machine or on the network.
@natalieatsafe​ For information, I was able to reproduce the behavior on my laptop when connected through a VPN that blocks all internet access. This message popped up twice in the translation log while running a workspace:
Using build 23619. There were no AI-enabled dialogs open at the time of the message, and no AI-enabled transformers in the workspace.
Again, this is only cosmetic, but could probably confuse inexperienced users into thinking something more serious going wrong.
The client says that the following appears in the log window when opening a new (empty) workspace in FME 2023.1 and then leaving it alone for about 20 minutes:
However, I've not been able to reproduce it myself, even when blocking the URL, either on my machine or on the network.
Hi @david_r​ Thanks so much for the update, that's very helpful! I've added your new details to the internal ticket filed for the error, FMEFORM-29415.
Â
It does look like there's been a fix committed to our latest official release of FME 2023. When you have the opportunity to do so, could you please try repeating your VPN test with FME Form 2023.1.1 build 23631 and see if the error message shows up again?
The client says that the following appears in the log window when opening a new (empty) workspace in FME 2023.1 and then leaving it alone for about 20 minutes:
However, I've not been able to reproduce it myself, even when blocking the URL, either on my machine or on the network.
@natalieatsafe​ It seems the issue has been fixed in build 23631 Thank you!
When using personal API key what are the valid model names? (where do we look these up?)
When I try to use `GPT-4` I'm told it's an invalid request. I have no problem using GPT-4 with other integrations (chatbotui.com and flux.paradigm.xyz for instance).
Â