13
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ChatGPT と Azure OpenAI Service のそれぞれの新機能に関する情報のメモなど(Custom Instructions、Azure版 Function calling)

Last updated at Posted at 2023-07-21

はじめに

この記事は、つい最近提供が開始された以下 2つの内容に関する情報を少し調べて、出てきた情報を軽くまとめてみたというものです。

新しく提供され始めた 2つの内容

取り扱う 2つの内容は、具体的には以下の通りです。

  1. OpenAI の ChatGPT の「Custom Instructions」
    • ChatGPT に対して、「ユーザーに関する前提」・「どんな返答をしてほしいか」をあらかじめ設定しておく機能
  2. Azure OpenAI Service の Function calling
    • OpenAI の ChatGPT の API では既に提供されていた「Function calling の Azure版」

Custom Instructions と Azure版 Function calling

公式の発表

上記の 2つについて、公式の記事をまずは掲載してみます。

OpenAI の ChatGPT の「Custom Instructions」

OpenAI の「Custom Instructions」に関する公式記事はこちらです。

●Custom instructions for ChatGPT
 https://openai.com/blog/custom-instructions-for-chatgpt

Custom instructions でできることは、

以下に提供開始タイミングについて書かれた部分を抜粋してみます。
ざっくりとした内容としては、「現在、既に ChatGPT Plusユーザー向けにはベータ版を展開済みで、その他のユーザーにも今後展開予定」となっているようです。
提供開始について

Azure OpenAI Service の Function calling

次に、Azure OpenAI Service の Function calling に関する公式記事です。

●Function calling is now available in Azure OpenAI Service - Microsoft Community Hub
 https://techcommunity.microsoft.com/t5/azure-ai-services-blog/function-calling-is-now-available-in-azure-openai-service/ba-p/3879241

以下に提供開始タイミングに関する内容が含まれた部分を抜粋してみます。
ざっくりとした内容としては、「最新の 0613 バージョンの gpt-35-turbo と gpt-4 で利用可能」となっているようです。
※ ただし、「Azure OpenAI Service」を利用できる状態になっていることが前提です(「Azure OpenAI Service」の利用申請を通している必要あり)
提供開始について

使い方に関する情報など

Custom Instructions

ChatGPT Plus のユーザーであれば、Custom Instructions をすぐに使うことができます。

ただし、以下の「Setting」の「Beta features」で、Custom Instructions を有効化する必要があります。
設定を ON にする
そうすると、以下のような説明が出てきました。
機能に関する説明

その後、もう一手間必要です。
再度、「Setting」を開いてみると、「Custom Instructions」という項目が増えています。それを選択しましょう。
設定を再度開く

そうすると以下の画面が出てくるので、ここで「Custom Instructions」の設定を書きこめば OK です。設定を書きこむテキストボックスは 2箇所あります。
Custom Instructions の画面

ここにどんな内容を入力すれば良いかなどは、既に記事を書かれた方がいらっしゃるので、その記事の「入力欄の違い」という部分を見てみてください。

また、試して記事を書かれている方が他にもいらっしゃるので、それもいくつかリンクを掲載しておきます。

Azure版 Function calling

次に、Azure OpenAI Service の Function calling です。

こちらは、利用手順が書かれた Microsoft公式の記事へのリンクです。
●Azure OpenAI Service で関数呼び出しを使用する方法 - Azure OpenAI Service | Microsoft Learn
 https://learn.microsoft.com/ja-jp/azure/ai-services/openai/how-to/function-calling

上記の記事では、Python を使った例が紹介されています。
ちなみに API の呼び出しでは、「API バージョン 2023-07-01-preview」で「gpt-35-turbo、gpt-35-turbo-16k、gpt-4、gpt-4-32k のバージョン 0613」のいずれかと組み合わせて使う、という形になるようです。
チャット入力候補 API での関数の使用

またこれに関して、GitHub上のリポジトリ「Azure-Samples」の「openai」の中の「Basic_Samples」以下に、↓この「Functions」が追加されているようです。
●openai/Basic_Samples/Functions at main · Azure-Samples/openai
 https://github.com/Azure-Samples/openai/tree/main/Basic_Samples/Functions

そして、既に試して記事を書かれた方がいらっしゃるので、そのリンクを掲載しておきます。

13
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?