New post

Pesquisar

Announcement
· Nov 11, 2024

ご参加ありがとうございました!:第2回 InterSystems Japan 開発者コミュニティ・ミートアップ in 東京

開発者の皆さん、こんにちは!

2回目の開催となったミートアップですが、11月8日(金)に無事、開催を終えることができました。ご参加いただきましたメンバーの皆様、ありがとうございました!

今年のミートアップでは、ワークショップを開催してみました。13時半~17時半の約4時間(!)もの間、ご持参いただいたパソコンでもくもくと進めていただいていたように思えます。

ミートアップのワークショップで使用した内容は、全て以下リポジトリに公開しております。

👉https://github.com/Intersystems-jp/meetup2024WorkShop

 


以下、写真を添えながら当日の様子を少しご紹介します。

第1部は、ワークショップを合計5種類用意いたしました。

Python入門」、「Embedded PythonでIRISデータにアクセスしよう」までは、全員一緒のタイミングで説明を聞いていただきながら、内容を確認するワークショップを行いました。

10分間の休憩を挟んだ後は、ご用意しました3種のワークショップ:「WSGI-Flask」「NiceGUI+SQL Alchemyを使ってアプリケーションをつくってみよう」「機械学習で手書き数字の識別に挑戦」のなかから好きな内容にチャレンジいただきました。

10分休憩の後から約2時間半、もしかしたら一度も席を離れず没頭されていた方もいらっしゃったのではないでしょうか!?

参加されたメンバーの皆さん、本当にもくもくとそれぞれのワークショップを試されていました。

 

 

第1部を終了する前に各テーブルの代表の方より感想を伺いました。いつもと異なる使い方を体験できた方や新しい使い方のヒントを得た方、また昨年のミートアップへもご参加いただいた方からは「ワークショップ形式を楽しめた」とのコメントをいただきました。

実は、今年のミートアップテーマを決定するまでにたくさんの議論がありました(ワークショップにするのはいいけど時間が短すぎないか?内容が薄くなりすぎないか?ワークショップよりハッカソンはどうだろう?座学のほうがいいんじゃないか?などなど)。

ですので、楽しんでいただけたと聞き、心の中でガッツポーズを決めておりました。

 

続きまして、第2部についてご紹介します。

第2部は懇親会を中心に、クイズ大会、そして、技術文書ライティングコンテスト表彰式を行いました!(ライティングコンテストの全作品はこちらのページでご覧いただけます👉https://jp.community.intersystems.com/contests/2

クイズ大会では練習問題含めて18問の出題で、インターシステムズの正しいロゴを当てるクイズから、コードサンプルをご覧いただき正解を見つける問題まで、様々な問題を出題いたしました。

クイズは早押しポイントもありますので、問題に正解するだけでなく、回答の速さも重要になってきます。見事1位となった方には、Amazonギフト券、2位、3位になった方には、インターシステムズグッズ詰め合わせをプレゼントいたしました。🎁

 

クイズの後は、コンテスト表彰式です。今年は6名の方による素晴らしい作品の投稿がありました。

今年は、見事入賞された方には、プレゼントを選んでいただく方式を選択してみました。

コンテストは来年もきっと開催いたしますので、ぜひ来年もご応募いただければと思います!

いつも使っているあの方法、これは便利だ!と思える方法、またよく見るエラーだけどこんな意味があるんだ!などなど、コミュニティメンバーに共有したい内容はコンテストに限らずいつでも投稿いただけますので、ぜひお気軽に投稿してみてください。

 

最後に、第2位部開始前に撮影した記念写真で今年のミートアップの開催紹介を終えたいと思います。

今年は、READY SET CODE Tシャツを作ってみました。

来年はどんなTシャツになるでしょうか👀

来年のミートアップですが、開催内容やTシャツデザインについて、コミュニティメンバーの皆様からも広くご意見を伺えれば👂と思っております。

ぜひお気軽にこの記事の返信欄に来年やってみたいこと、Tシャツのデザイン案などお寄せいただけると大変うれしいです。

 

ミートアップへご参加いただいた皆様、ありがとうございました。

今年参加されなかった皆様も、ぜひ来年、ミートアップでお会いしましょう!

Discussion (0)1
Log in or sign up to continue
Article
· Nov 11, 2024 4m read

第十八章 TCP 客户端 服务器通信 - 使用OPEN命令 - Supported参数

第十八章 TCP 客户端 服务器通信 - 使用OPEN命令 - Supported参数

Supported 参数

parameters 参数可以是以下格式之一:

hostname
(hostname{:port{:mode{:terminators{:ibufsiz{:obufsiz{:queuesize{:keepalivetime}}}}}}})

parameters 参数中的参数如下:

Discussion (0)1
Log in or sign up to continue
Article
· Nov 11, 2024 4m read

IrisGoogleChat con IA

 

Hola comunidad,

Quería compartir con vosotros la última aplicación que he publicado en el Open Exchange: "IrisGoogleChat".

Es una utilidad para InterSystems IRIS que permite enviar mensajes a un canal de Google Chat mediante ObjectScript. Esta aplicación provee una colección de utilidades para configurar Canales de Google Chat, crear mensajes potenciados con "estados de humor" con IA y enviarlos a un canal de Google Chat.

Para proveer un estado de humor a tus mensajes será necesario que dispongas de un API Key y un ID de organización de OpenAI Chat GPT. También deberás contar con una cuenta de pago de Google Workspace para poder configurar los webhooks que utilizaremos para enviar los mensajes al canal.

La gracias de esta App es que puedes personalizar tus aburridos mensajes de alertas (o cualquier tipo de mensaje) con estados de humor personalizados, creando mensajes divertidos (o no).

Te dejo unos ejemplos que he creado simulando distintos estados de humo para el ejemplo he simulado un error <DIVIDE 0> :

Modo Drama:

 

Modo Poema:

Modo Pasivo Agresivo:

 

¿Te gustan estos mensajes y quieres deleitarte con unos increíbles mensajes como estos en lugar de lidiar con tus aburridos mensajes actuales? Pues abróchate el cinturón porque esto empieza!.

 

 

Configurando el API de OpenAI:

El primer paso será obtener tu Api Key y tu ID de organización, para ello entra en https://platform.openai.com/api-keys y presiona el botón "Create new Secret key", elige tu proyecto y dale un nombre, para finalizar pulsa el botón "Create Secret key".

 

Aparecerá en pantalla tu clave secreta, guardala bien porque no volverá a aparecer y la vamos a necesitar mas adelante.

Para obtener el ID de organización, presiona el icono del engranaje:

Luego pulsa en "General" y apunta tu ID de Organización:

 

Segundo paso, obtener la url de tu canal de Google:

Abre la página de Google Chat: https://mail.google.com/chat/u/0/#chat/home. Ahora presiona el botón "Nuevo Chat" y después en "Crear Espacio"

 

Dale un nombre y elige un icono y pulsa en "Crear".

 

Ahora entra en el canal recién creado y pulsa en "Apps e integraciones":

 

Una vez dentro de "Webhooks" presiona "Añadir webhooks". (Si el botón aparece desactivado es porque no has iniciado sesión con una cuenta de pago de Google Workspace:

 

 

Aparecerá una ventana, dale nu nombre y copia la url porque nos hará falta luego:

 

Genial, ahora, tenemos toda la información que necesitamos para empezar a configurar IrisGoogleChat. Para hacer este paso mas sencillo os he dejado en el repositorio una clase llamada GoogleChat.Example.cls donde podrás encontrar como:

 

Configurar tu API key e ID de Organización de ChatGPT:

 //Setup Google Chat (only needed first time)
Set url    ="https://api.openai.com/v1/chat/completions"
Set apiKey ="your api key"
Set orgId  ="your org id"
Do ##class(GoogleChat.Message).SetupGoogleChat(url, apiKey, orgId)

 

Crear un estado de ánimo:

// Mod lazy (only needed first time)
Set modName="passive-agresive"
Set modPrompt="Generate an error alert message, acting with an aggressive-passive behavior with a touch of sarcastic and blaming me for it. Add a touch of humor. You are only responsible to notify. Return only the text, without emojis or titles. This is the alert message: "
Do ##class(GoogleChat.Message).SaveMod(modName, modPrompt)

 

Configurar un Canal:

Set channelName="alertChannel"
Set url="/v1/spaces/AAAAJP9Vu54/messages?key=AIzZZcDdI0hCZtE6vySjMm-WEfRq3CPzqKqqYhg&token=RKjvKvRMnmdJbuyCoyGslos0Qce23Fd-P12lZtkU777"
Set icon = "https://fonts.gstatic.com/s/e/notoemoji/14.0/1f534/32.png"
Do ##class(GoogleChat.Message).CreateChannel(channelName,url,modName,icon)

 

Y finalmente, enviar un mensaje!:

Set channel="alertChannel"
Set title="Server XX - Alert!"
Set subtitle = "Warning Alert!!"
Set message = "The task 1001 has failed - Error Divide 0"
Do ##class(GoogleChat.Message).Send(channel, title, subtitle, message)

 

Lo que el metodo Send hace es enviar el mensaje al canal aplicando el estado de ánimo asociado al mismo. Para generar el mensaje con cierto estado de ánimo el método usa el prompt para ChatGPT que hemos configurado en nuestro estado de ánimo personalizado, ejemplo:

""Generate an error alert message, acting with an aggressive-passive behavior with a touch of sarcastic and blaming me for it. Add a touch of humor. You are only responsible to notify. Return only the text, without emojis or titles. This is the alert message: " 

Puedes añadir al final un.. In Spanish para recibir el idioma en español por ejemplo, o directamente traducirlo entero:

"Genera una alerta de error, actuando con un actitud pasiva-agrevisa con un toque de sarcasmo y culpándome por ello. Añade un toque de humor. Tu eres solo responsable de notificarme. Devuelve solo el texto, sin emojis o títulos. Este es el mensaje de alerta: "

 

Como puedes ver, puedes usar este prompt como una plantilla y modificarlo un poco o incluso crear el tuyo propio y obtener el mas serio, loco, divertido o aburrido mensaje!.

El límite está en tu imaginación!.

Estoy deseando ver los increíbles estados de ánimo y mensajes que vais a crear con esta utilidad. Por favor comparte en tus comentarios tus mejores prompts así como tus mejores mensajes!.

 

Gracias por leerme!.

Discussion (0)1
Log in or sign up to continue
Article
· Nov 11, 2024 4m read

IrisGoogleChat with AI

 

Hi Community,

I want to share with you the lastest app that I have uploaded to the Open Exchange "IrisGoogleChat". 

IrisGoogleChat is a utility for InterSystems IRIS that allows seamless message integration with Google Chat using Cache ObjectScript. This application provides a set of tools to configure Google Chat Channels, create messages powered by moods generated with AI and send them to a Google Chat Channel.

In order to provide the desired mood to your messages you will need an API key and an organization ID of OpenAI Chat GPT. You must have too a paid account of Google Workspace in order to setup the webhooks that we will use.

The point of this app its that you can personalise your boring alert messages (or whatever kind of message) with a custom mood, creating funny (or not) messages.

Here you are some examples, that I have create simulating messages that could be received in an errors alert channel (in my example <DIVIDE 0> errors):

Drama Mood:

 

Like a Poem:

Passive-Agressive Mood:

 

Do you like this messages and wanted to be delighted with this such amazing alert errors instead of your boring current messages? So Fasten your belt, because this is beginning!

 

Setting up the OpenAI API configuration:

The first step will be getting our API key and our orgId, so enter in this web page: https://platform.openai.com/api-keys then press "Create new secret key" button, select your project, provide a name and then press the button "Create secret key".

 

Your secret key will appear, remember to save it because we are going to need it before.

In order to obtain your organisation ID, press the gear button

Then on "General" and note your Organisation ID

 

Second stage, getting our Google Channel url:

Open the Google Chat page: https://mail.google.com/chat/u/0/#chat/home . Now press on "New Chat" then on "Create a space"

 

Choose a name and an icon an press "Create"

Now enter on the chat and go to the section "Apps and integrations":

Once there click on "Webhooks" section and then on "Add webhooks". (If this button appears disables is because you aren't logged with a paid account of Google Workspace.

 

Give it a name and copy the url because you are going to need it later:

 

Ok, so now, we have all the info that we need to start setting up IrisGoogleChat. In order to make easier this step I have added the GoogleChat.Example class in the project, there you will find how to:

 

Setup your ChatGPT apiKey and orgId:

 //Setup Google Chat (only needed first time)
Set url    ="https://api.openai.com/v1/chat/completions"
Set apiKey ="your api key"
Set orgId  ="your org id"
Do ##class(GoogleChat.Message).SetupGoogleChat(url, apiKey, orgId)

 

Create a mood:

// Mod lazy (only needed first time)
Set modName="passive-agresive"
Set modPrompt="Generate an error alert message, acting with an aggressive-passive behavior with a touch of sarcastic and blaming me for it. Add a touch of humor. You are only responsible to notify. Return only the text, without emojis or titles. This is the alert message: "
Do ##class(GoogleChat.Message).SaveMod(modName, modPrompt)

 

Configure a Channel:

Set channelName="alertChannel"
Set url="/v1/spaces/AAAAJP9Vu54/messages?key=AIzZZcDdI0hCZtE6vySjMm-WEfRq3CPzqKqqYhg&token=RKjvKvRMnmdJbuyCoyGslos0Qce23Fd-P12lZtkU777"
Set icon = "https://fonts.gstatic.com/s/e/notoemoji/14.0/1f534/32.png"
Do ##class(GoogleChat.Message).CreateChannel(channelName,url,modName,icon)

 

And finally send a Message!:

Set channel="alertChannel"
Set title="Server XX - Alert!"
Set subtitle = "Warning Alert!!"
Set message = "The task 1001 has failed - Error Divide 0"
Do ##class(GoogleChat.Message).Send(channel, title, subtitle, message)

 

What the method Send does it's use the message to the channel "alertChannel" applying the mood that we have applied to the channel. In order to provide a mood to the message the method use the prompt for chat GPT that we have configured in our mod, example:

""Generate an error alert message, acting with an aggressive-passive behavior with a touch of sarcastic and blaming me for it. Add a touch of humor. You are only responsible to notify. Return only the text, without emojis or titles. This is the alert message: " 

As you can see you can use this prompt as a template and modify it or you can create your own prompts and get the most serious, crazy, funny or boring messages that you want. 

So the limit is in your imagination!.

I'm looking forward to seeing such amazing moods and messages are you going to create. Please post them on the comments and fell you free to share your best prompts!!.

Thanks for reading!

Discussion (0)1
Log in or sign up to continue
Question
· Nov 11, 2024

Determine a String is an SQL Reserved Word

Hello,

Is there a programmatic way (in ObjectScript) to determine if a string is an SQL reserved word (aside from using embedded SQL to try to name a property with that string and look for the error :-))?

Thank you,

Jean

2 Comments
Discussion (2)1
Log in or sign up to continue