UiPathWikiPage – UiPath に関する Wikipedia の記事に表示される内容です。この画面では、記事の最初の段落を示す UiPathDescription 要素を作成します。
Use the UiAutomation service, along with the Open coded automation API, to open the Wikipedia landing page using the following code:
var wikiScreen= uiAutomation.Open(ObjectRepository.Descriptors.WikiMainScreen);var wikiScreen= uiAutomation.Open(ObjectRepository.Descriptors.WikiMainScreen);
Get the description about UiPath from the Wikipedia article, using the Attach and Get Text coded automation APIs. The Attach coded automation API behaves similarly to the Use Application/Browser activity, allowing you to focus on an already open Application/Browser and automate it. Use the following code:
var uipathWikiPage = uiAutomation.Attach(ObjectRepository.Descriptors.UiPathWikiPage);var uipathWikiDescription = uipathWikiPage.GetText(ObjectRepository.Descriptors.UiPathWikiPage.UiPathDescription);Log("This is the UiPath's wikipedia description: "+ uipathWikiDescription);var uipathWikiPage = uiAutomation.Attach(ObjectRepository.Descriptors.UiPathWikiPage);
var uipathWikiDescription = uipathWikiPage.GetText(ObjectRepository.Descriptors.UiPathWikiPage.UiPathDescription);
Log("This is the UiPath's wikipedia description: " + uipathWikiDescription);
OpenAI のアカウントを使用して ChatGPT に説明を送信します
api という名前の変数を作成し、提供された API キーを使用してアクセスできる OpenAI アカウントを初期化します。以下の変数を使用します。
var api =newOpenAIAPI(OpenAiApiKey);var api = new OpenAIAPI(OpenAiApiKey);
var chatResult = api.Chat.CreateChatCompletionAsync("Please rewrite the following description about UiPath: '"+ uipathWikiDescription +"', and make it longer").Result;var chatResult = api.Chat.CreateChatCompletionAsync("Please rewrite the following description about UiPath: '" + uipathWikiDescription + "', and make it longer").Result;