prompt/prompt-model/ai.koog.prompt.dsl/-prompt/-l-l-m-params-update-context/index.html (221 lines of code) (raw):
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<title>LLMParamsUpdateContext</title>
<link href="../../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../../../";</script>
<script>document.documentElement.classList.replace("no-js", "js");</script>
<script>const storage = localStorage.getItem("dokka-dark-mode")
if (storage == null) {
const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
if (osDarkSchemePreferred === true) {
document.getElementsByTagName("html")[0].classList.add("theme-dark")
}
} else {
const savedDarkMode = JSON.parse(storage)
if (savedDarkMode === true) {
document.getElementsByTagName("html")[0].classList.add("theme-dark")
}
}
</script>
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async></script>
<script type="text/javascript" src="../../../../../scripts/sourceset_dependencies.js" async></script>
<link href="../../../../../styles/style.css" rel="Stylesheet">
<link href="../../../../../styles/main.css" rel="Stylesheet">
<link href="../../../../../styles/prism.css" rel="Stylesheet">
<link href="../../../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../../../ui-kit/ui-kit.min.css" rel="Stylesheet">
<script type="text/javascript" src="../../../../../scripts/safe-local-storage_blocking.js"></script>
<script type="text/javascript" src="../../../../../scripts/navigation-loader.js" async></script>
<script type="text/javascript" src="../../../../../scripts/platform-content-handler.js" async></script>
<script type="text/javascript" src="../../../../../scripts/main.js" defer></script>
<script type="text/javascript" src="../../../../../scripts/prism.js" async></script>
<script type="text/javascript" src="../../../../../ui-kit/ui-kit.min.js" defer></script></head>
<body>
<div class="root">
<header class="navigation theme-dark" id="navigation-wrapper" role="banner">
<a class="library-name--link" href="../../../../../index.html" tabindex="1">
koog
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">0.6.0-SNAPSHOT
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
<button class="platform-tag platform-selector common-like" data-active="" aria-pressed="true" data-filter=":prompt:prompt-model/commonMain">common</button>
<div class="dropdown filter-section--dropdown" data-role="dropdown" id="filter-section-dropdown">
<button class="button button_dropdown filter-section--dropdown-toggle" role="combobox" data-role="dropdown-toggle" aria-controls="platform-tags-listbox" aria-haspopup="listbox" aria-expanded="false" aria-label="Toggle source sets"></button>
<ul role="listbox" id="platform-tags-listbox" class="dropdown--list" data-role="dropdown-listbox" aria-label="Target filter">
<div class="dropdown--header"><span>Target filter</span>
<button class="button" data-role="dropdown-toggle" aria-label="Close target filter">
<i class="ui-kit-icon ui-kit-icon_cross"></i>
</button>
</div>
<li role="option" class="dropdown--option platform-selector-option common-like" tabindex="0">
<label class="checkbox">
<input type="checkbox" class="checkbox--input" id=":prompt:prompt-model/commonMain" data-filter=":prompt:prompt-model/commonMain">
<span class="checkbox--icon"></span>
common
</label>
</li>
</ul>
<div class="dropdown--overlay"></div>
</div>
</ul>
<button class="navigation-controls--btn navigation-controls--btn_theme" id="theme-toggle-button" type="button">Switch theme
</button>
<div class="navigation-controls--btn navigation-controls--btn_search" id="searchBar" role="button">Search in
API
</div>
</div>
</header>
<div id="container">
<nav id="leftColumn" class="sidebar" data-item-type="SECTION" data-item-config="{"defaultSize": 280, "minSize": 200, "maxSize": 400}">
<a class="toc--skip-link" href="#main">Skip to content</a>
<div class="dropdown theme-dark_mobile" data-role="dropdown" id="toc-dropdown">
<ul role="listbox" id="toc-listbox" class="dropdown--list dropdown--list_toc-list" data-role="dropdown-listbox" aria-label="Table of contents">
<div class="dropdown--header">
<span>
koog
</span>
<button class="button" data-role="dropdown-toggle" aria-label="Close table of contents">
<i class="ui-kit-icon ui-kit-icon_cross"></i>
</button>
</div>
<div class="sidebar--inner" id="sideMenu"></div>
</ul>
<div class="dropdown--overlay"></div>
</div>
</nav>
<div id="resizer" class="resizer" data-item-type="BAR"></div>
<div id="main" data-item-type="SECTION" role="main">
<div class="main-content" data-page-type="classlike" id="content" pageids="prompt-model::ai.koog.prompt.dsl/Prompt.LLMParamsUpdateContext///PointingToDeclaration//1262518863">
<div class="breadcrumbs"><a href="../../../index.html">prompt-model</a><span class="delimiter">/</span><a href="../../index.html">ai.koog.prompt.dsl</a><span class="delimiter">/</span><a href="../index.html">Prompt</a><span class="delimiter">/</span><span class="current">LLMParamsUpdateContext</span></div>
<div class="cover ">
<h1 class="cover"><span>LLMParams</span><wbr><span>Update</span><wbr><span><span>Context</span></span></h1>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":prompt:prompt-model/commonMain"><div class="symbol monospace"><span class="token keyword">class </span><a href="index.html">LLMParamsUpdateContext</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/JetBrains/koog/tree/main/prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/Prompt.kt#L144">source</a>)</span></span></div><p class="paragraph">Represents a mutable context for updating the parameters of an LLM (Language Learning Model). The class is used internally to facilitate changes to various configurations, such as temperature, speculation, schema, and tool choice, before converting back to an immutable <code class="lang-kotlin">LLMParams</code> instance.</p></div></div>
</div>
<div class="tabbedcontent">
<div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="CONSTRUCTOR,TYPE,PROPERTY,FUNCTION">Members</button></div>
<div class="tabs-section-body">
<div data-togglable="PROPERTY">
<h2 class="tableheader">Properties</h2>
<div class="table"><a data-name="327489754%2FProperties%2F1262518863" anchor-label="schema" id="327489754%2FProperties%2F1262518863" data-filterable-set=":prompt:prompt-model/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":prompt:prompt-model/commonMain" data-filterable-set=":prompt:prompt-model/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="schema.html"><span><span>schema</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="327489754%2FProperties%2F1262518863"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":prompt:prompt-model/commonMain"><div class="symbol monospace"><span class="token keyword">var </span><a href="schema.html">schema</a><span class="token operator">: </span><a href="../../../ai.koog.prompt.params/-l-l-m-params/-schema/index.html">LLMParams.Schema</a><span class="token operator">?</span></div><div class="brief "><p class="paragraph">A schema configuration that describes the structure of the output. This can include JSON-based schema definitions for fine-tuned output generation. This property is mutable for schema updates.</p></div></div></div>
</div>
</div>
</div>
</div>
<a data-name="-1625162340%2FProperties%2F1262518863" anchor-label="speculation" id="-1625162340%2FProperties%2F1262518863" data-filterable-set=":prompt:prompt-model/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":prompt:prompt-model/commonMain" data-filterable-set=":prompt:prompt-model/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="speculation.html"><span><span>speculation</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1625162340%2FProperties%2F1262518863"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":prompt:prompt-model/commonMain"><div class="symbol monospace"><span class="token keyword">var </span><a href="speculation.html">speculation</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span></div><div class="brief "><p class="paragraph">A speculative configuration string that influences model behavior, designed to enhance result speed and accuracy. This property is mutable for modifying the speculation setting.</p></div></div></div>
</div>
</div>
</div>
</div>
<a data-name="-728762389%2FProperties%2F1262518863" anchor-label="temperature" id="-728762389%2FProperties%2F1262518863" data-filterable-set=":prompt:prompt-model/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":prompt:prompt-model/commonMain" data-filterable-set=":prompt:prompt-model/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="temperature.html"><span><span>temperature</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-728762389%2FProperties%2F1262518863"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":prompt:prompt-model/commonMain"><div class="symbol monospace"><span class="token keyword">var </span><a href="temperature.html">temperature</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html">Double</a><span class="token operator">?</span></div><div class="brief "><p class="paragraph">The temperature value that adjusts randomness in the model's output. Higher values produce diverse results, while lower values yield deterministic responses. This property is mutable to allow updates during the context's lifecycle.</p></div></div></div>
</div>
</div>
</div>
</div>
<a data-name="-2132259550%2FProperties%2F1262518863" anchor-label="toolChoice" id="-2132259550%2FProperties%2F1262518863" data-filterable-set=":prompt:prompt-model/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":prompt:prompt-model/commonMain" data-filterable-set=":prompt:prompt-model/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="tool-choice.html"><span>tool</span><wbr><span><span>Choice</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-2132259550%2FProperties%2F1262518863"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":prompt:prompt-model/commonMain"><div class="symbol monospace"><span class="token keyword">var </span><a href="tool-choice.html">toolChoice</a><span class="token operator">: </span><a href="../../../ai.koog.prompt.params/-l-l-m-params/-tool-choice/index.html">LLMParams.ToolChoice</a><span class="token operator">?</span></div><div class="brief "><p class="paragraph">Defines the behavior of the LLM regarding tool usage, allowing choices such as automatic tool invocations or restricted tool interactions. This property is mutable to enable reconfiguration.</p></div></div></div>
</div>
</div>
</div>
</div>
<a data-name="1179129200%2FProperties%2F1262518863" anchor-label="user" id="1179129200%2FProperties%2F1262518863" data-filterable-set=":prompt:prompt-model/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":prompt:prompt-model/commonMain" data-filterable-set=":prompt:prompt-model/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="user.html"><span><span>user</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1179129200%2FProperties%2F1262518863"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":prompt:prompt-model/commonMain"><div class="symbol monospace"><span class="token keyword">var </span><a href="user.html">user</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span></div><div class="brief "><p class="paragraph">An optional user identifier that can be used for tracking or personalization purposes. This property is mutable to allow updates to the user context.</p></div></div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div data-togglable="FUNCTION">
<h2 class="tableheader">Functions</h2>
<div class="table"><a data-name="1346730778%2FFunctions%2F1262518863" anchor-label="toParams" id="1346730778%2FFunctions%2F1262518863" data-filterable-set=":prompt:prompt-model/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":prompt:prompt-model/commonMain" data-filterable-set=":prompt:prompt-model/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="to-params.html"><span>to</span><wbr><span><span>Params</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1346730778%2FFunctions%2F1262518863"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":prompt:prompt-model/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="to-params.html"><span class="token function">toParams</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../../../ai.koog.prompt.params/-l-l-m-params/index.html">LLMParams</a></div><div class="brief "><p class="paragraph">Converts the current context of parameters into an instance of <a href="../../../ai.koog.prompt.params/-l-l-m-params/index.html">LLMParams</a>.</p></div></div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="footer--container">
<a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
<div class="footer--content">
<div>
<span>Generated by </span>
<a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
Dokka
</a>
<div>Copyright © 2000-2025 JetBrains s.r.o.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>