Skip to content

Commit

Permalink
get GPT versions from environment
Browse files Browse the repository at this point in the history
  • Loading branch information
PandorasActorMS committed Jan 10, 2024
1 parent 897cd33 commit 0d85365
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,18 @@
Wähle eines der KI Modelle.
</details>
<select id = "GPT-Version">
<option value="gpt-4-1106-preview" token_limit="128000" selected="selected"> GPT 4 Turbo </option>
<option value="gpt-4" token_limit="8192"> GPT 4</option>
<option value="gpt-3.5-turbo" token_limit="4096"> GPT 3.5 Turbo </option>
<?php
$gpt_versions=isset($env) ? ($env["GPT_VERSIONS"]??false) : getenv("GPT_VERSIONS");
if($gpt_versions){
$string ="";
$gpt_version = explode(';', $gpt_versions);
foreach($gpt_version as $version){
$value = explode(',', $version);
$string = $string . '<option value="' . $value[0] . '"token_limit="' . $value[1] . '">' . $value[2] . '</option>';
}
echo $string;
}
?>
</select>
<p id="GPT4-Hinweis", style="color: crimson"> GPT 4 behauptet GPT 3 zu sein.</p>
</form>
Expand Down

0 comments on commit 0d85365

Please sign in to comment.