Codebot sample code

Hi,

I typed this into codebot

example of registerCognitoIdentityProviderWithConfiguration

and some of the returned code has classnames starting with T ie

// Create a new instance of the configuration with your AWS credentials
  config := new AmazonCognitoIdentityProviderConfig();
  config.RegionEndpoint := TAmazon.RegionEndpoint.USEast1;
  config.Credentials := TEnvironmentAWSCredentials.Create();

It says in an oxygene example, is there a reason its using T ?

cheers,
John

Ask ChatGPT :wink:

Ive always associated it with Delphi, is there really no way of turning it off ? Its not even consistent

TAWSConfigs.RegisterCognitoIdentityProviderWithConfiguration(providerName, config, credentials);

It just sticks it on regardless.

I just pass the question on to ChatGPT, and pass the answer back. Remember that ChatGTOP is not really an AI. It’s a search engine, and for whatever reason the input it gets leads it to find these API examples, which, I agree, look like they are for some Delphi-based APOI wrapper for AWS, and probably useless.

1 Like

Think I have an idea how to tweak this, when I ask

“example of registerCognitoIdentityProviderWithConfiguration. use .NET APIs but Oxygene language syntax”

it gives a better result. problem is, when not invoked from code, CodeBiod really doesn’t have a “known current” language or platform to use… I’ll see what I can do.

2 Likes

I’m having a blast with ChatBot. But I noticed, as you all have, some Delphisms being introduced into the code - such as the ‘Create’ method:

var employee1 := Employee.Create;

when Oxygene really uses more of the .Net syntax:

var employee1 := new Employee();
1 Like

I’ll play around to see if i can adjust the prompt to avoid this. Can you share the (kind of) questions(s) you sued to get these results, for reference?

1 Like

I didn’t save the CodeBot chat when it happened. And darn if I can illicit the same code again. Will keep trying . . in any case, have a great weekend everyone! :sunny:

1 Like

Some new CodeBot features that in just finished coming in the next build ;). including:

2 Likes