Learn
Motor Sınıfı
TextGenerator

*Bu içerik, yapay zekâ (beta) kullanılarak çevrildi ve hatalar içerebilir. Sayfayı İngilizce görüntülemek için buraya tıkla.


Özet
Devralınan Üyeler
Kod Örnekleri
local Workspace = game:GetService("Workspace")
local textGenerator = Instance.new("TextGenerator")
textGenerator.Parent = Workspace
textGenerator.SystemPrompt = "Sen sanal bir dünyada yardımcı bir NPC'sin."
textGenerator.Temperature = 0.8
textGenerator.TopP = 0.6
textGenerator.Seed = 7
local function getResponse(userInput)
local request = {
UserPrompt = userInput,
MaxTokens = 50
}
local success, response = pcall(function()
return textGenerator:GenerateTextAsync(request)
end)
if success then
if response then
print("Üretilen Metin: " .. response.GeneratedText)
print("Bağlam Jetonu: " .. response.ContextToken)
print("Model: " .. response.Model)
return response
end
else
warn("Metin üretimi başarısız oldu: " .. tostring(response))
end
return nil
end
getResponse("Bana ilginç bir şey söyle.")

API Referansı
Özellikler
Seed
Paralel oku
Capabilities: Basic
TextGenerator.Seed:number

SystemPrompt
Paralel oku
Capabilities: Basic
TextGenerator.SystemPrompt:string

Temperature
Paralel oku
Capabilities: Basic
TextGenerator.Temperature:number

TopP
Paralel oku
Capabilities: Basic
TextGenerator.TopP:number

Yöntemler
GenerateTextAsync
Bekletir
Capabilities: Basic
TextGenerator:GenerateTextAsync(request:Dictionary):Dictionary
Parametreler
request:Dictionary
Dönüşler

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.