New post

Find

Article
· Apr 1 1m read

IRISから外部のWebAPIを呼び出したとき、レスポンス内の全角文字が化ける

これは InterSystems FAQ サイトの記事です。

Content-Typeにcharset 情報が含まれていない場合、IRIS/Cachéは文字コードを判断できず文字コード変換が行われません。

 

そこで、以下のように、「自動的な文字変換を行わず、UTF-8に変換する処理を記述」することで、その指定がある無しに関わらず、対応することができます。

 

 // requestオブジェクトは以下のように生成 
 // 詳細処理は省略
 // set request=##class(%Net.HttpRequest).%New()
 // リクエスト時に、文字変換を行わないように指定
 set request.ReadRawMode=1
 do request.Send("POST",URL)

 // 受取ったデータを、UTF-8に変換してから、JSON変換
 set response = request.HttpResponse.Data
 set data = response.Read()
 set data2 = $zcvt(data,"I","UTF8")
 set response = {}.%FromJSON(data2)
 write response.%ToJSON()

長い文字列が想定される場合には、一度のReadで読み込めない可能性があるため、以下のようなコーディングを行う必要があります。

 set stream=##class(%Stream.TmpCharacter).%New()

 while 'response.AtEnd {
   set data = response.Read()
   set data2 = $zcvt(data,"I","UTF8")
   do stream.Write(data2)
 }

 set res = {}.%FromJSON(stream)
 write res.%ToJSON() 
Discussion (0)1
Log in or sign up to continue
Article
· Apr 1 1m read

IRIS-Intelligent Butler

# IRIS-Intelligent Butler
IRIS Intelligent Butler is an AI intelligent butler system built on the InterSystems IRIS data platform, aimed at providing users with comprehensive intelligent life and work assistance through data intelligence, automated decision-making, and natural interaction.
## Application scenarios
 adding services, initializing configurations, etc. are currently being enriched
## Intelligent Butler
IRIS Smart Manager utilizes the powerful data management and AI capabilities of InterSystems IRIS to create a highly personalized, automated, secure, and reliable intelligent life and work assistant. Whether it is household users, enterprises, or medical institutions, IRIS can achieve smarter and more efficient daily management.
🚀  In the future, IRIS intelligent butler will continue to evolve and become a true "digital companion"!

## How to use it

### Prerequisites
Make sure you have git and Docker desktop installed.
### Installation
#### 1.Clone/git pull the repo into any local directory
```
git clone https://github.com/RenatoJanzai/IRIS-Intelligent-Butler.git
```  
#### Open the terminal in this directory and run

```
docker-compose build
```
#### Run the IRIS container 

```
docker-compose up -d
```

1 Comment
Discussion (1)2
Log in or sign up to continue
Digest
· Apr 1

InterSystems開発者コミュニティのダイジェスト、3月 2025

3月 2025開発者コミュニティ ニュースレターへようこそ。
全体統計
24 件の新しい投稿が公開 (3月 月):
 18件の新着記事
 6の新しい発表
1 人の新メンバーが参加 (3月 月)
1,473 件の投稿が公開 (全期間)
315 人のメンバーが参加 (全期間)
トップ記事
今月のトップ作家
記事
#InterSystems IRIS
計算プロパティの使用方法1
Hiroshi Sato順
計算プロパティの使用方法2
Hiroshi Sato順
ObjectScriptを使用し、ローカルファイルを他のサーバーにアップロード(POST)する方法
Hiroshi Sato順
select count(*)の応答に時間がかかる、あるいはタイムアウトが発生する場合の対処法について
Hiroshi Sato順
ODBC経由で取得したデータが途切れる場合の対処法
Hiroshi Sato順
既存のネームスペースで、インターオペラビリティ機能を無効にする方法
Hiroshi Sato順
オンラインバックアップの保存先
Tomoko Furuzono順
CSP(REST)でのトラブルシューティングに使用できるツール
Tomoko Furuzono順
ジャーナルのON/OFFを、コマンドで操作する方法
Tomoko Furuzono順
クライアントーサーバ間の通信を暗号化する
Tomoko Furuzono順
%Net.POP3 を使用して添付ファイル付きのメールを受信する方法 --- Gmailを使用したサンプルのご紹介
Megumi Kakechi順
ORDER BY で並べ替える際の照合順を調整する
Tomoko Furuzono順
機能トラッカのメッセージについて
Tomoko Furuzono順
ジャーナルの整合性チェックやサマリの表示をコマンドで実行する方法
Tomoko Furuzono順
Iris における FastAPI アプリケーションの実行
Toshihiko Minamoto順
バージョン2025.1インストール時に指定する初期セキュリティオプションのデフォルトが「ロックダウン」に変わりました
Mihoko Iijima順
IRISのSQLでサポートされているSQLウィンドウ関数について
Tomoko Furuzono順
小数桁数を指定して切り上げ・切り捨ての処理を行う方法
Tomoko Furuzono順
お知らせ
3月, 2025Month at a GlanceInterSystems Developer Community
Article
· Mar 31 2m read

Operate the database through dialogue

Prompt

Firstly, we need to understand what prompt words are and what their functions are.

Prompt Engineering

Hint word engineering is a method specifically designed for optimizing language models.
Its goal is to guide these models to generate more accurate and targeted output text by designing and adjusting the input prompt words.

Core Functions of Prompts

  • Improve content matching: By accurately expressing your needs, AI can generate high-quality content that better meets expectations
  • Efficiency and time optimization: A clear prompt can directly obtain the desired answer, reducing the time for repeated adjustments and greatly improving efficiency.
  • Easy to program: AI can return corresponding content according to its own needs, making it easier to process

 Application Introduction

The iris-data-analysis application is actually a simple demo using prompt words,It can process the database through dialogue, using AI AgentBO.OpenAI configuration URL APIKEY 、 And the Model name, to call the AI interface.By using prompt words to prompt AI to return the required SQL, we can process and execute the SQL returned by AI to obtain the data we need.

Example

For example, I would like to know AI_Agent_DB.UserInfo  How many male users and how many female users are in the UserInfo table? I can write the prompt words like this

text

As an SQL expert, please generate appropriate SQL statements based on the following requirements:
demand:{"message"}
Please only return SQL statements without any further explanation. If creating a table, please include appropriate field types and necessary constraints.

 

 

 

AI will only return SQL in the conversation with you for subsequent operations, and also vectorize the requested message to view the similarity of the problem through vector retrieval.

and also vectorize the requested message to view the similarity of the problem through vector retrieval.

Discussion (0)1
Log in or sign up to continue
Article
· Mar 31 2m read

<METHOD DOES NOT EXIST> Errors For Record Map Objects

The complex record mapper can help you process text file data consisting of various types of records to persistent messages in IRIS. To gain a basic understanding of the complex record mapper and see an example implemented in the production, check out the learning services video below:

https://community.intersystems.com/post/video-using-complex-record-mapper

This article is going to help troubleshoot when you see <Method DOES NOT EXIST> when handling record objects. For example, when purging messages in the production, you might see errors that indicate issues when deleting certain records:
<METHOD DOES NOT EXIST>zDeleteRecords+17^User.Test.Batch.1 *%ParentRemove,User.Test.Record

Alternatively, you might see the below message in the event log when processing files using a complex record map:
<METHOD DOES NOT EXIST>updateArrayReferences+40^EnsLib.RecordMap.ComplexParent.1 *%ParentAdd,User.Test.Record

Checking the class specified in the message, you find that the method indicated after the asterisk is indeed not included in the record class. Why is the class missing these methods?

When you see this error, in the management portal, go to Interoperability>List>Record Maps, and go to the page for the record map in question ("User.Test.Record" in this case). Check the settings to see if "Allow Complex Record Mapping" or "Allow Complex Batching" is checked.

If you use a record type in a complex record map, you need to configure the simple record map to be able to use it in the complex record map. The documentation specifies that "Allow Complex Batching" is a "flag that specifies whether record map can be used in a complex record map." 

When you check the "Allow Complex Batching" setting, the record class extends EnsLib.RecordMap.ComplexChild; when you don't, the class extends only %Persistent. You need to check this option for all the records you use in the complex record map. 

In the example above, you see that the *%ParentRemove method is not defined because the EnsLib.RecordMap.ComplexChild class defines it. If the record class doesn't extend EnsLib.RecordMap.ComplexChild, it doesn't contain the %ParentRemove method. Thus, we got the error when trying to purge it.

To remedy this, check "Allow Complex Record Mapping" for the record and regenerate the class. If you check the regenerated class, you will see that it now extends the EnsLib.RecordMap.ComplexChild class. The purge should now work as expected.

Discussion (0)1
Log in or sign up to continue