Set temp directory in tokenizer
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3582743. -->
Reported by: [jan kellermann](https://www.drupal.org/user/371731)
Related to !1398
>>>
<p>[Tracker]<br>
<strong>Update Summary: </strong>[One-line status update for stakeholders]<br>
<strong>Short Description: </strong>[One-line issue summary for stakeholders]<br>
<strong>Check-in Date: </strong>MM/DD/YYYY<br>
<em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br>
[/Tracker]</p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The tokenizer uses Yethee\Tiktoken\Encoder which creates temp files. If no temp dir is given, /tmp is uses (instead of reading this from PHP settings). But you can set the temp directory programmicaly.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4>
<p>Please provide information like AI modules enabled, which AI provider, browser, etc.</p>
<p>Use the Tokenizer in an environment with custom temp directory.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Set temp dir for Yethee\Tiktoken\Encoder.</p>
issue