元編程參考文件

OpenAI(舊版)

26 個節點

本頁內容 26

啟用跟蹤

函數

此節點沒有文件說明。

簽名
啟用跟蹤() -> 真否
bool EnableTrace()

返回

結果真否
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

跟蹤計數

函數

此節點沒有文件說明。

簽名
跟蹤計數() -> 整數
int TraceCounter()

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

跟蹤會話時間

函數

此節點沒有文件說明。

簽名
跟蹤會話時間() -> 時間日期
DateTime TracerSessionDataTime()

返回

結果時間日期
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

新增跟蹤記錄

函數

此節點沒有文件說明。

簽名
新增跟蹤記錄(內容: (文字, 文字))
void AddTrace((string, string) content)

參數

名稱型別預設值說明
內容(文字, 文字)—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

向 ChatGPT 詢問資料

函數

Asks ChatGPT a question about structured data provided in CSV format.

簽名
向 ChatGPT 詢問資料 -> 文字
    問題: 文字
    CSV 資料: 文字
    API 令牌: 文字
string AskChatGPTAboutData(
    string question,
    string dataCSV,
    string apiToken)

參數

名稱型別預設值說明
問題文字—The question to ask.
CSV 資料文字—The structured data in CSV format.
API 令牌文字—The API token for authentication.

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

向 ChatGPT 詢問影像

函數

Asks ChatGPT a question about an image reference.

簽名
向 ChatGPT 詢問影像 -> 文字
    問題: 文字
    影像引用: 文字
    API 令牌: 文字
string AskChatGPTAboutImage(
    string question,
    string imageReference,
    string apiToken)

參數

名稱型別預設值說明
問題文字—The question to ask.
影像引用文字—The reference to an image (e.g., URL or file path).
API 令牌文字—The API token for authentication.

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

強制拆分訊息

函數

Breaks up a message into smaller parts based on token size constraints.
Given an original message and allowable max window size, break it down by token count.

簽名
強制拆分訊息 -> IEnumerable<文字>
    片段: 文字
    模型: 文字
    可用上下文令牌數: 整數
IEnumerable<string> BreakupMessageBruteForce(
    string piece,
    string model,
    int availableContextTokenSize)

參數

名稱型別預設值說明
片段文字—The message piece to break down.
模型文字—The OpenAI model.
可用上下文令牌數整數—The maximum number of tokens available per segment.

返回

結果IEnumerable<文字>
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

ChatGPT 補全

函數

過載 1/7

簽名
ChatGPT 補全(查詢: 文字, 配置: OpenAIConfiguration) -> 文字
string ChatGPTComplete(
    string query,
    OpenAIConfiguration configuration)

Generates a completion using ChatGPT.

參數

名稱型別預設值說明
查詢文字—The user query to be processed.
配置OpenAIConfiguration—The OpenAI configuration settings, including model, API token, and token size limit..

返回

結果文字

過載 2/7

簽名
ChatGPT 補全 -> 文字
    查詢: 文字
    回覆令牌數上限: 整數
    配置: OpenAIConfiguration
string ChatGPTComplete(
    string query,
    int replyTokenSizeLimit,
    OpenAIConfiguration configuration)

Generates a completion using ChatGPT.

參數

名稱型別預設值說明
查詢文字—The user query to be processed.
回覆令牌數上限整數—
配置OpenAIConfiguration—The OpenAI configuration settings, including model, API token, and token size limit..

返回

結果文字

過載 3/7

簽名
ChatGPT 補全 -> 文字
    系統提示: 文字
    查詢: 文字
    配置: OpenAIConfiguration
string ChatGPTComplete(
    string system,
    string query,
    OpenAIConfiguration configuration)

Generates a completion using ChatGPT with a system message.

參數

名稱型別預設值說明
系統提示文字—The system message.
查詢文字—The user query.
配置OpenAIConfiguration—The OpenAI configuration settings.

返回

結果文字

過載 4/7

簽名
ChatGPT 補全 -> 文字
    系統提示: 文字
    查詢: 文字
    回覆令牌數上限: 可選整數
    配置: OpenAIConfiguration
string ChatGPTComplete(
    string system,
    string query,
    int? replyTokenSizeLimit,
    OpenAIConfiguration configuration)

Generates a completion using ChatGPT with a system message.

參數

名稱型別預設值說明
系統提示文字—The system message.
查詢文字—The user query.
回覆令牌數上限可選整數—Limit of reply's token size (length).
配置OpenAIConfiguration—The OpenAI configuration settings.

返回

結果文字

過載 5/7

簽名
ChatGPT 補全 -> 文字
    系統提示: 文字
    訊息: Chat Message 列表
    配置: OpenAIConfiguration
    回覆令牌數上限: 可選整數
string ChatGPTComplete(
    string system,
    List<ChatMessage> messages,
    OpenAIConfiguration configuration,
    int? replyTokenSizeLimit = 4000)

Generates a completion using ChatGPT with a system message and a list of messages.

參數

名稱型別預設值說明
系統提示文字—The system message.
訊息Chat Message 列表—The list of messages exchanged in the conversation.
配置OpenAIConfiguration—The OpenAI configuration settings.
回覆令牌數上限可選整數4000

返回

結果文字

過載 6/7

簽名
ChatGPT 補全 -> 文字
    系統提示: 文字
    訊息: Chat Message 列表
    工具: 文字
    配置: OpenAIConfiguration
    回覆令牌數上限: 可選整數
string ChatGPTComplete(
    string system,
    List<ChatMessage> messages,
    string tools,
    OpenAIConfiguration configuration,
    int? replyTokenSizeLimit = 4000)

Generates a completion using ChatGPT with additional tool options.

參數

名稱型別預設值說明
系統提示文字—The system message.
訊息Chat Message 列表—The list of messages exchanged in the conversation.
工具文字—The tools used for additional processing.
配置OpenAIConfiguration—The OpenAI configuration settings.
回覆令牌數上限可選整數4000

返回

結果文字

過載 7/7

簽名
ChatGPT 補全 -> (結果: 文字, 訊息令牌數: 整數)
    系統提示: 文字
    使用者提問: 文字
    模型: OpenAIConfiguration.OpenAIModel
    超出額度時中止: 真否
string ChatGPTComplete(
    string system,
    string userQuery,
    OpenAIConfiguration.OpenAIModel model,
    out int messageTokenCount,
    bool abortIfExceedAllowance = true)

Complete using automatic configurations for specific model.

參數

名稱型別預設值說明
系統提示文字—The system message.
使用者提問文字—The user query.
模型OpenAIConfiguration.OpenAIModel—The OpenAI model configuration.
超出額度時中止真否TrueIf true, aborts if the token count exceeds the allowed limit.

返回

結果文字
訊息令牌數整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

配置 OpenAI

函數

Configures the OpenAI API by providing the necessary API key and model selection.

簽名
配置 OpenAI -> OpenAIConfiguration
    API 金鑰: 文字
    模型: OpenAIConfiguration.OpenAIModelEnum
    服務地址: 文字
OpenAIConfiguration ConfigureOpenAI(
    string apiKey,
    OpenAIConfiguration.OpenAIModelEnum model = OpenAIModelEnum.OpenAIo3Mini,
    string serviceAddress = "https://api.openai.com/v1")

參數

名稱型別預設值說明
API 金鑰文字—The API key used to authenticate with the OpenAI API.
模型OpenAIConfiguration.OpenAIModelEnumOpenAI o3-miniThe OpenAI model to use for generating the completion. Defaults to OpenAIo3Mini.
服務地址文字https://api.openai.com/v1Endpoint for Chat Completion.

返回

結果OpenAIConfiguration
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

生成音訊補全

函數

Like text completion, but also generates an audio version.

簽名
生成音訊補全 -> 可選 (位元組陣列, 文字)
    系統提示: 文字
    文字: 文字
    配置: OpenAIConfiguration
(byte[], string)? GenerateAudioCompletion(
    string system,
    string text,
    OpenAIConfiguration configuration)

參數

名稱型別預設值說明
系統提示文字—
文字文字—
配置OpenAIConfiguration—

返回

結果可選 (位元組陣列, 文字)
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

生成回覆

函數

此節點沒有文件說明。

簽名
生成回覆 -> LegacyOpenAIHelper.ResponseReply
    之前的對話: 文字
    系統提示: 文字
    使用者提問: 文字
    配置: OpenAIConfiguration
    函數: FunctionalNodeDescription 陣列
    溫度: 數字
LegacyOpenAIHelper.ResponseReply GenerateResponse(
    string previousConversation,
    string system,
    string userQuery,
    OpenAIConfiguration configuration,
    FunctionalNodeDescription[] functions,
    double temperature = 1)

參數

名稱型別預設值說明
之前的對話文字—
系統提示文字—
使用者提問文字—
配置OpenAIConfiguration—
函數FunctionalNodeDescription 陣列—
溫度數字1

返回

結果LegacyOpenAIHelper.ResponseReply
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

取得 GPT-5 nano

函數

此節點沒有文件說明。

簽名
取得 GPT-5 nano() -> OpenAIConfiguration.OpenAIModel
OpenAIConfiguration.OpenAIModel GPT5Nano()

返回

結果OpenAIConfiguration.OpenAIModel
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

取得 GPT-3.5 Turbo

函數

此節點沒有文件說明。

簽名
取得 GPT-3.5 Turbo() -> OpenAIConfiguration.OpenAIModel
OpenAIConfiguration.OpenAIModel OpenAI3_5Turbo()

返回

結果OpenAIConfiguration.OpenAIModel
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

取得 GPT-4o

函數

此節點沒有文件說明。

簽名
取得 GPT-4o() -> OpenAIConfiguration.OpenAIModel
OpenAIConfiguration.OpenAIModel OpenAI4o()

返回

結果OpenAIConfiguration.OpenAIModel
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

取得 GPT-4o mini

函數

此節點沒有文件說明。

簽名
取得 GPT-4o mini() -> OpenAIConfiguration.OpenAIModel
OpenAIConfiguration.OpenAIModel OpenAI4oMini()

返回

結果OpenAIConfiguration.OpenAIModel
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

取得 OpenAI o1

函數

此節點沒有文件說明。

簽名
取得 OpenAI o1() -> OpenAIConfiguration.OpenAIModel
OpenAIConfiguration.OpenAIModel OpenAIo1()

返回

結果OpenAIConfiguration.OpenAIModel
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

取得 OpenAI o3-mini

函數

此節點沒有文件說明。

簽名
取得 OpenAI o3-mini() -> OpenAIConfiguration.OpenAIModel
OpenAIConfiguration.OpenAIModel OpenAIo3Mini()

返回

結果OpenAIConfiguration.OpenAIModel
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

取得嵌入向量

函數

Retrieves an embedding representation of the given content.

簽名
取得嵌入向量(內容: 文字, 配置: OpenAIConfiguration) -> 數字陣列
double[] GetEmbedding(
    string content,
    OpenAIConfiguration configuration)

參數

名稱型別預設值說明
內容文字—The input content.
配置OpenAIConfiguration—The OpenAI configuration settings.

返回

結果數字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

取得令牌數

函數

Gets the token count for a given message and model.

簽名
取得令牌數(訊息: 文字, 模型名稱: 文字) -> 整數
int GetTokenCount(string message, string modelName)

參數

名稱型別預設值說明
訊息文字—The message to analyze.
模型名稱文字—The name of the OpenAI model.

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

內容審核標記

函數

Use OpeNAI moderation to decide whether some content contains flagged information.

簽名
內容審核標記(內容: 文字, 配置: OpenAIConfiguration) -> 可選真否
bool? ModerateFlag(
    string content,
    OpenAIConfiguration configuration)

參數

名稱型別預設值說明
內容文字—The content to check.
配置OpenAIConfiguration—The OpenAI configuration settings.

返回

結果可選真否
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

文字轉語音

函數

Synthesises speech and returns it as a 44.1 kHz stereo segment.

簽名
文字轉語音 -> StandardAudioSegment
    文字: 文字
    配置: OpenAIConfiguration
StandardAudioSegment TextToSpeech(
    string text,
    OpenAIConfiguration configuration)

參數

名稱型別預設值說明
文字文字—
配置OpenAIConfiguration—

返回

結果StandardAudioSegment
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

文字轉原始語音

函數

Simple text-to-speech. No tone reflection etc. For advanced use, do GenerateAudio.

簽名
文字轉原始語音 -> 位元組陣列
    文字: 文字
    配置: OpenAIConfiguration
byte[] TextToSpeechRaw(
    string text,
    OpenAIConfiguration configuration)

參數

名稱型別預設值說明
文字文字—
配置OpenAIConfiguration—

返回

結果位元組陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

轉寫

函數

過載 1/3

簽名
轉寫 -> 文字
    片段: StandardAudioSegment
    配置: OpenAIConfiguration
string Transcribe(
    StandardAudioSegment segment,
    OpenAIConfiguration configuration)

Transcribes a 44.1 kHz stereo clip via Whisper.

參數

名稱型別預設值說明
片段StandardAudioSegment—
配置OpenAIConfiguration—

返回

結果文字

過載 2/3

簽名
轉寫 -> 文字
    片段: StandardAudioSegment
    最大分塊大小: 數字
    配置: OpenAIConfiguration
string Transcribe(
    StandardAudioSegment segment,
    double maxChunkSize,
    OpenAIConfiguration configuration)

Splits a long clip into ≤ Max Chunk Size s pieces before sending to Whisper.

參數

名稱型別預設值說明
片段StandardAudioSegment—
最大分塊大小數字—The OpenAI API can handle at most this large chunk at a time - we will internally slice the segment to fit within the chunks and aggregate final transcription.
配置OpenAIConfiguration—

返回

結果文字

過載 3/3

簽名
轉寫 -> 文字
    分段數: StandardAudioSegment 陣列
    最大分塊大小: 數字
    配置: OpenAIConfiguration
string Transcribe(
    StandardAudioSegment[] segments,
    double maxChunkSize,
    OpenAIConfiguration configuration)

Batch‑transcribes multiple clips, chunking each one when necessary.

參數

名稱型別預設值說明
分段數StandardAudioSegment 陣列—
最大分塊大小數字—
配置OpenAIConfiguration—

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

轉寫資料夾中的音訊

函數

Transcribe with automatic chunking.

簽名
轉寫資料夾中的音訊 -> 文字陣列
    資料夾路徑: 文字
    配置: OpenAIConfiguration
string[] TranscribeFolderAudios(
    string folderPath,
    OpenAIConfiguration configuration)

參數

名稱型別預設值說明
資料夾路徑文字—
配置OpenAIConfiguration—

返回

結果文字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

使用電腦

函數

此節點沒有文件說明。

簽名
使用電腦 -> LegacyOpenAIHelper.ResponseReply
    之前的對話: 文字
    系統提示: 文字
    使用者提問: 文字
    配置: OpenAIConfiguration
    本地函數: FunctionalNodeDescription 陣列
LegacyOpenAIHelper.ResponseReply UseComputer(
    string previousConversation,
    string system,
    string userQuery,
    OpenAIConfiguration configuration,
    FunctionalNodeDescription[] localFunctions)

參數

名稱型別預設值說明
之前的對話文字—
系統提示文字—
使用者提問文字—
配置OpenAIConfiguration—
本地函數FunctionalNodeDescription 陣列—

返回

結果LegacyOpenAIHelper.ResponseReply
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI

使用電腦截圖

函數

Only used for reply. Must use UseComputer to start usage first.

簽名
使用電腦截圖 -> LegacyOpenAIHelper.ResponseReply
    之前的對話: 文字
    呼叫 ID: 文字
    Base64 影像: 文字
    螢幕寬度: 整數
    螢幕高度: 整數
    配置: OpenAIConfiguration
LegacyOpenAIHelper.ResponseReply UseComputerScreenshot(
    string previousConversation,
    string callID,
    string base64Image,
    int screenWidth,
    int screenHeight,
    OpenAIConfiguration configuration)

參數

名稱型別預設值說明
之前的對話文字—
呼叫 ID文字—
Base64 影像文字—
螢幕寬度整數—
螢幕高度整數—
配置OpenAIConfiguration—

返回

結果LegacyOpenAIHelper.ResponseReply
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
OpenAI(舊版)
所屬包
生成式 AI