Kurro Lopez · Jun 12, 2023 go to post

Why not use "System default settings"?

You can add the value of the property in this table and it is used in your production item.

Have a look iris-deploy-tools

Kurro Lopez · Jun 13, 2023 go to post

Hi,

In iris.script add the following line:

zpm "install iris-deploy-tools -v"

In TgGptProduction.cls remove the settings of Token and ApiKey

<Item Name="Telegram.InboundService" Category="" ClassName="Telegram.LongPollingService" PoolSize="1" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
    <Setting Target="Adapter" Name="SSLConfig">tg</Setting>
    <Setting Target="Host" Name="Target">GPTRouter</Setting>
</Item>
....
<Item Name="St.OpenAi.BO.Api.Connect" Category="" ClassName="St.OpenAi.BO.Api.Connect" PoolSize="1" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
    <Setting Target="Host" Name="Organization"></Setting>
    <Setting Target="Adapter" Name="SSLConfig">tg</Setting>
</Item>

In Setup.cls, extends the class to St.Tools.Deploy and modify the loop to add the default configuration.

Class shvarov.telegramgpt.Setup Extends St.Tools.Deploy
{
ClassMethod Init(TgToken As%String, GPTKey As%String) As%Status
{
    set st=$$$OKset production="shvarov.telegramgpt.i14y.TgGptProduction"for item="Telegram.InboundService","Telegram.OutboundOperation" {
        set st = ..AddDefaultSetting("*",item,,"Token",TgToken)
        quit:$$$ISERR(st)
    }
    set item="St.OpenAi.BO.Api.Connect"set st = ..AddDefaultSetting("*",item,,"ApiKey",GPTKey)
    return st
}
....
}

I hope you find it useful

Kurro Lopez · Jun 13, 2023 go to post

Sorry, I realized that your problem is how to pass the parameters when you install the component via ZPM, not how to add the value into the item.

Kurro Lopez · Dec 8, 2023 go to post

Thanks Enrico,

I'll bear in mind the next time. This is just the beginning, there are still many things to explore from OpenAI

Kurro Lopez · Dec 19, 2023 go to post

Thanks, this year has been a bit poor, but I will not give up on continuing to publish new articles and new applications.

Kurro Lopez · Dec 26, 2023 go to post

Merry christmas and happy new year... next year, we will be more in the community

Kurro Lopez · Jan 31, 2024 go to post

Thanks Pietro, 

More or less is the idea. I had already bear in mind about of library mapping.

We need to planning the migration carefully

Best regards

Kurro Lopez · Feb 2, 2024 go to post

Great job.. I was looking for a private GPT to summarize medical records for a client. With this article we can investigate how to implement this functionality without fear of publishing private data in a public cloud.

Kurro Lopez · Feb 2, 2024 go to post

Thanks for you answer.

We have solved the problem of the delay in BP, and now, the number of new instances of BS has been drastically reduced.

We are talking with the customer to upgrade the actor pool number to create a 3 new instances of the BP. The customer is worried that this increase in instances could affect memory performance, because more instances created, more memory it requires.

Kurro Lopez · Feb 7, 2024 go to post

Thanks John,

According to that solution, I need to ask to WRC an a ad-hoc fix for my IRIS instance, isn't it?

Kurro Lopez · Feb 8, 2024 go to post

Sorry, it's a mistake. Indeed, I've forgotten write the [ ], but still the error.

I've fixed the JSon in the post.

Kurro Lopez · Feb 9, 2024 go to post

It's not a bad idea, but the last value has very little chance of appearing

FOR I=1:1:100 {W $Piece("SAD,MED,TEN,BOB,RAN",",",$r(4)+1),"-" }

TEN-TEN-BOB-TEN-SAD-MED-MED-MED-MED-MED-TEN-MED-BOB-MED-MED-TEN-TEN-MED-SAD-BOB-MED-SAD-BOB-
TEN-TEN-BOB-BOB-SAD-BOB-TEN-MED-BOB-BOB-MED-TEN-MED-SAD-BOB-BOB-BOB-MED-MED-TEN-MED-TEN-MED-
TEN-BOB-MED-TEN-SAD-MED-MED-MED-BOB-SAD-SAD-MED-SAD-BOB-SAD-TEN-BOB-BOB-TEN-BOB-TEN-BOB-SAD-
SAD-TEN-MED-TEN-SAD-BOB-MED-SAD-SAD-BOB-MED-TEN-TEN-SAD-SAD-SAD-BOB-BOB-BOB-TEN-MED-BOB-BOB-
TEN-BOB-SAD-SAD-BOB-BOB-BOB-MED

SAD    20%
MED    27%
TEN    23%
BOB    30%
RAN    0%

I've tried to user other way, for example, using a GUID, get the checksum and get the module 5

Something like $Piece("SAD,MED,TEN,BOB,RAN",",",($ZCRC(##class(%SYSTEM.Util).CreateGUID(),0)#5) + 1)

for i=1:1:100 {W $Piece("SAD,MED,TEN,BOB,RAN",",",($ZCRC(##class(%SYSTEM.Util).CreateGUID(),0)#5) + 1),"-"}

TEN-SAD-BOB-MED-BOB-BOB-MED-MED-BOB-RAN-MED-BOB-RAN-MED-RAN-BOB-BOB-MED-RAN-SAD-RAN-MED-MED-
BOB-TEN-BOB-RAN-MED-TEN-TEN-TEN-SAD-BOB-MED-BOB-BOB-BOB-RAN-RAN-TEN-MED-RAN-RAN-BOB-RAN-TEN-
MED-TEN-TEN-MED-RAN-BOB-TEN-SAD-SAD-TEN-TEN-TEN-BOB-RAN-MED-SAD-MED-SAD-RAN-RAN-RAN-BOB-MED-
SAD-MED-RAN-RAN-SAD-RAN-RAN-BOB-MED-TEN-TEN-RAN-BOB-TEN-TEN-RAN-BOB-BOB-TEN-MED-SAD-SAD-BOB-
BOB-BOB-SAD-TEN-MED-TEN-BOB-SAD

SAD    13%
MED    20%
TEN    20%
BOB    25%
RAN    22%

I have best percentage to get a different value.

Kurro Lopez · Feb 9, 2024 go to post

Thanks for the article. We need to create a complex process to update information in a production and it will be a good idea for the developers.

Kurro Lopez · Feb 13, 2024 go to post

Thanks for your answers. Good idea using a global as key to unlock the loop.

Kurro Lopez · Feb 14, 2024 go to post

Hi,

It seems that is a problem with your VS Code.

Could you check that you have updated the Intersystems ObjectScript extensions?

https://marketplace.visualstudio.com/items?itemName=intersystems-commun…

When you save and compile your code, in the case of a persistent class, it adds the SQLMap, but it is retrieve in this moment.

Check your configuration, I have setted the following one:

Intersystems ObjectScript

✔ Auto Adjust Name

✔ Compile Flags: cuk

 Compile On Save

And this configuration of export in .code-workspace

"objectscript.export": {
	"folder": "src",
	"addCategory": false,
	"map": {},
	"atelier": true,
	"generated": false,
	"filter": "",
	"exactFilter": "",
	"category": "*",
	"noStorage": false,
	"dontExportIfNoChanges": false,
	"maxConcurrentConnections": 0,
	"mapped": true
}

Let me know if it works

Best Regads

Kurro Lopez · Feb 17, 2024 go to post

Hi,

Try this

do##class(myDt).Transform(dataEntry, .dataTransform)

Then you call to your BO and your content tranformed

Kurro Lopez · Mar 14, 2024 go to post

Thanks for your replay.

Indeed, there is a package using pyhton, but not all of us can have access to use Python on client servers. The idea of using only objectscript arose from the need to not be able to implement Python on those servers.

Kurro Lopez · Mar 15, 2024 go to post

Thanks for your help.

But I am trying to use a common class, all the BS are inherited from this BS.ApiBase.cls, this way I don't need to modify the rest of the productions and we can implement this feature for all of them.

Anyway, you have solved me how to get the SessionId, using the OnProcessInput