Android Question ChatGPT vs Copilot experience

JackKirk

Well-Known Member
Licensed User
Longtime User
This article is intense:


but it spells out in lots of detail what I am instinctively experiencing - Copilot is definitely better at code related stuff.

The only issue I am seeing is the 2000 character limit per "question" - but this just forces you to structure your queries better - and you can string queries together, e.g.:

Q1 I have this html:

html........

Q2 and this javascript:

javascript........

Q3 how can I modify these to .....

And I always find it best to keep the "how to" part as simple as feasible.
 

Daestrum

Expert
Licensed User
Longtime User
Strange, I seem to have a larger limit for characters.
1714384003918.png


Edit: Just found reference to MS increasing character limit to 8000 on CoPilot precise answers.
 
Last edited:
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
Strange, I seem to have a larger limit for characters.
I normally access Copilot via Windows Chrome - just checked again and the limit is still 2000 characters.

I then accessed it via Edge and the limit is 4000 characters.

Very cheeky!!!!

Question: how are you accessing it to get 8000 characters?
 
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
Question: how are you accessing it to get 8000 characters?
I just answered my own question - above the "Ask me anything" are 3 options which I have never paid any attention to:

Creative: 8000 (Edge), 4000 (Chrome)
Balanced (default): 4000 (Edge), 2000 (Chrome)
Precise: 8000 (Edge), 4000 (Chrome)

Always read the fine print:)
 
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
I'm currently exploring cookies under ABMaterial - here is a bit of javascript I wrote today using Copilot:

B4X:
var cookie_message1 = document.getElementById('cookie_message1');
cookie_message1.addEventListener('click', function() {

    let date = new Date();
    date.setDate(date.getDate() + 30);
    let day = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][date.getUTCDay()];
    let dateNum = String(date.getUTCDate()).padStart(2, '0');
    let month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][date.getUTCMonth()];
    let year = date.getUTCFullYear();
    let hours = String(date.getUTCHours()).padStart(2, '0');
    let minutes = String(date.getUTCMinutes()).padStart(2, '0');
    let seconds = String(date.getUTCSeconds()).padStart(2, '0');
    let formattedDate = day + ', ' + dateNum + '-' + month + '-' + year + ' ' + hours + ':' + minutes + ':' + seconds + ' UTC';
    let ticks = date.getTime();
    b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': formattedDate});

    var userAgent = window.navigator.userAgent;
    b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': userAgent});
    if (userAgent.match(/iPad|iPhone/i)) {
        // User is on iPad or iPhone
        try {
            document.cookie = 'cookietest=1';
            const isCookieEnabled = document.cookie.indexOf('cookietest=') !== -1;
            document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
            if (isCookieEnabled) {
                b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': "iOS, 1st party cookies enabled"});
            } else {
                b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': "iOS, 1st party cookies blocked"});
                return;
            }
        } catch (e) {
            b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': "iOS false"});
            return;
        }
        document.cookie = 'Cookie_iOS' + ticks + '=abcxyz/expiry=' + formattedDate + '; expires=' + formattedDate;
    } else if (userAgent.match(/Android/i)) {
        // User is on Android
        const isCookieEnabled = navigator.cookieEnabled;
        if (isCookieEnabled) {
            b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': "Android, 1st party cookies enabled"});
        } else {
            b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': "Android, 1st party cookies blocked"});
            return;
        }
        document.cookie = 'Cookie_Android' + ticks + '=abcxyz/expiry=' + formattedDate + '; expires=' + formattedDate;
    } else {
        b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': "Neither iPhone nor Android"});
    }
    b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': document.cookie});
});
var cookie_message2 = document.getElementById('cookie_message2');
cookie_message2.addEventListener('click', function() {
    var cookies = document.cookie.split(";");
    for (var i = 0; i < cookies.length; i++) {
        var cookie = cookies[i];
        var eqPos = cookie.indexOf("=");
        var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
        document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
    }
    b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': "Cookies deleted"});
    b4j_raiseEvent('${Passed_Instance_Name}_Report', {'value': document.cookie});
});

and I repeat - I don't know much about javascript - although I am finding this a very productive learning mechanism.
 
Upvote 0
Top